OSDN Git Service

95a8b7040d06764fd6908cb0314b8cc81c488de0
[pf3gnuchains/gcc-fork.git] / gcc / ChangeLog
1
2 2009-10-05  Basile Starynkevitch  <basile@starynkevitch.net>
3             Rafael Espindola  <espindola@google.com>
4
5         * gengtype.c (write_types): Moved call to write_func_for_structure
6         into seperate loops.
7
8 2009-10-05  Richard Guenther  <rguenther@suse.de>
9
10         PR lto/41281
11         * lto-cgraph.c (output_cgraph): Output toplevel asms.
12         (input_cgraph_1): Input toplevel asms.
13
14 2009-10-05  Richard Guenther  <rguenther@suse.de>
15
16         PR lto/40902
17         * lto-symtab.c (lto_compatible_attributes_p): Remove.
18         (external_aggregate_decl_p): Likewise.
19         (lto_symtab_compatible): Re-structure.  Remove dead code.
20         For variables ignore toplevel qualifiers when comparing types.
21         Issue warnings, not errors for mismatched user-alignment.
22
23 2009-10-05  Richard Guenther  <rguenther@suse.de>
24
25         PR lto/41552
26         PR lto/41487
27         * lto-symtab.c (struct lto_symtab_base_def): Remove.
28         (struct lto_symtab_identifier_def): Likewise.
29         (struct lto_symtab_decl_def): Likewise.
30         (struct lto_symtab_entry_def): New.
31         (lto_symtab_identifier_t): Rename to ...
32         (lto_symtab_entry_t): ... this.
33         (lto_symtab_decls): Remove.
34         (lto_symtab_base_hash): Rename to ...
35         (lto_symtab_entry_hash): ... this.
36         (lto_symtab_base_eq): Rename to ...
37         (lto_symtab_entry_eq): ... this.
38         (lto_symtab_base_marked_p): Rename to ...
39         (lto_symtab_entry_marked_p): ... this.
40         (lto_symtab_identifier_marked_p): Remove.
41         (lto_symtab_decl_marked_p): Likewise.
42         (lto_symtab_maybe_init_hash_tables): Rename to ...
43         (lto_symtab_maybe_init_hash_table): ... this.
44         (lto_symtab_set_resolution_and_file_data): Remove.
45         (lto_symtab_register_decl): New function.
46         (lto_symtab_get_identifier): Remove.
47         (lto_symtab_get): New function.
48         (lto_symtab_get_resolution): Adjust.
49         (lto_symtab_get_identifier_decl): Remove.
50         (lto_symtab_set_identifier_decl): Likewise.
51         (lto_symtab_merge_decl): Rename to ...
52         (lto_symtab_merge): ... this.  Rewrite.
53         (lto_symtab_merge_var): Remove.
54         (lto_symtab_merge_fn): Likewise.
55         (lto_symtab_prevailing_decl): Adjust.
56         (lto_cgraph_replace_node): New function.
57         (lto_symtab_merge_decls_2): Likewise.
58         (lto_symtab_merge_decls_1): Likewise.
59         (lto_symtab_fixup_var_decls): Likewise.
60         (lto_symtab_resolve_symbols): Likewise.
61         (lto_symtab_merge_decls): Likewise.
62         (lto_symtab_prevailing_decl): Adjust.
63         (lto_symtab_get_symtab_def): Remove.
64         (lto_symtab_get_file_data): Likewise.
65         (lto_symtab_clear_resolution): Adjust.
66         (lto_symtab_clear_resolution): Likewise.
67         * lto-cgraph.c (input_edge): Do not merge cgraph nodes here.
68         (input_cgraph_1): Likewise.
69         * lto-streamer-in.c (get_resolution): Do not provide fake
70         symbol resolutions here.
71         (deferred_global_decls): Remove.
72         (lto_register_deferred_decls_in_symtab): Likewise.
73         (lto_register_var_decl_in_symtab): Change signature, register
74         variable via lto_symtab_register_decl.
75         (lto_register_function_decl_in_symtab): Likewise.
76         (lto_read_tree): Adjust.
77         * lto-streamer.h (lto_register_deferred_decls_in_symtab): Remove.
78         (lto_symtab_merge_var): Likewise.
79         (lto_symtab_merge_fn): Likewise.
80         (lto_symtab_register_decl): Declare.
81         (lto_symtab_merge_decls): Likewise.
82
83 2009-10-05  Richard Guenther  <rguenther@suse.de>
84
85         PR tree-optimization/23821
86         * tree-vrp.c (vrp_finalize): Do not perform copy propagation.
87         * tree-ssa-dom.c (cprop_operand): Do not propagate copies into
88         simple IV increments.
89
90 2009-10-05  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
91
92         * config/arm/arm.c (arm_override_options): Really initialize
93         flag_dwarf2_cfi_asm to 0.
94
95 2009-10-05  Doug Kwan  <dougkwan@google.com>
96
97         PR rtl-optimization/41574
98         * combine.c (distribute_and_simplify_rtx): Quit if RTX mode is
99         floating point and we are not doing unsafe math optimizations.
100
101 2009-10-03  Simon Baldwin  <simonb@google.com>
102             Cary Coutant  <ccoutant@google.com>
103             Rafael Espindola  <espindola@google.com>
104             Richard Guenther  <rguenther@suse.de>
105             Jan Hubicka  <jh@suse.cz>
106             Doug Kwan <dougkwan@google.com>
107             H.J. Lu  <hongjiu.lu@intel.com> 
108             Bill Maddox  <maddox@google.com>
109             Ryan Mansfield  <rmansfield@qnx.com>
110             Diego Novillo  <dnovillo@google.com>
111             Ollie Wild  <aaw@google.com>
112             Kenneth Zadeck <zadeck@naturalbridge.com>
113
114         * lto-cgraph.c: New file.
115         * lto-compress.c: New file.
116         * lto-compress.h: New file.
117         * lto-opts.c: New file.
118         * lto-section-in.c: New file.
119         * lto-section-out.c: New file.
120         * lto-streamer-in.c: New file.
121         * lto-streamer-out.c: New file.
122         * lto-streamer.c: New file.
123         * lto-streamer.h: New file.
124         * lto-symtab.c: New file.
125         * lto-wpa-fixup.c: New file.
126         * lto-wrapper.c: New file.
127
128 2009-10-03  Simon Baldwin  <baldwin@google.com>
129             Ben Elliston  <bje@au.ibm.com>
130             Rafael Espindola  <espindola@google.com>
131             Nathan Froyd  <froydnj@codesourcery.com>
132             Jan Hubicka  <jh@suse.cz>
133             Doug Kwan  <dougkwan@google.com>
134             Diego Novillo  <dnovillo@google.com>
135             Kenneth Zadeck  <zadeck@naturalbridge.com>
136
137         * Makefile.in (enable_lto): New.
138         (site.exp): If @enable_lto@ is set to 'yes' define
139         ENABLE_LTO.
140         (LINKER_PLUGIN_API_H): Define.
141         (LTO_SYMTAB_H): Define.
142         (LTO_STREAMER_H): Define.
143         (TREE_VECTORIZER_H): Define.
144         (INCLUDES): Add LIBELFINC.
145         (OBJS-common): Add lto-cgraph.o, lto-streamer-in.o,
146         lto-streamer-out.o, lto-section-in.o, lto-section-out.o,
147         lto-symtab.o, lto-opts.o, lto-streamer.o, lto-wpa-fixup.o,
148         lto-compress.o.
149         (MOSTLYCLEANFILES): Add lto-wrapper$(exeext)
150         (native): Add lto-wrapper$(exeext)
151         (lto-compress.o, lto-cgraph.o, lto-streamer-in.o,
152         lto-streamer-out.o, lto-section-in.o, lto-section-out.o,
153         lto-symtab.o, lto-opts.o, lto-streamer.o,
154         lto-wpa-fixup.o): New rules.
155         (gimple.o): Add dependency on LTO_HEADER_H and
156         LTO_SECTION_OUT_H.
157         (varasm.o): Add dependency on tree-iterator.h.
158         (cgraph.o): Add dependency on cif-code.def.
159         (ipa-reference.o): Add dependency on LTO_STREAMER_H.
160         (ipa-pure-const.o): Likewise.
161         (GTFILES): Add lto-symtab.c.
162         (install-lto-wrapper): New.
163         * configure.ac: If 'lto' is in enable_languages, define
164         ENABLE_LTO and enable_lto.
165         If LIBELFLIBS is set, define HAVE_libelf.
166         * config.in: Regenerate.
167
168 2009-10-03  Rafael Espindola  <espindola@google.com>
169             Diego Novillo  <dnovillo@google.com>
170
171         * cgraphunit.c (ipa_passes): Prevent lto1 from calling
172         ipa_write_summaries.
173         Call execute_ipa_summary_passes for all_regular_ipa_passes and
174         all_lto_gen_passes.
175         (cgraph_optimize): Make extern.
176
177 2009-10-03  Nathan Froyd  <froydnj@codesourcery.com>
178             Kenneth Zadeck <zadeck@naturalbridge.com>
179
180         * toplev.c (in_lto_p): Declare.
181         * collect2.c (scan_prog_file): Read all the output when reading
182         information for LTO.
183         (enum lto_mode_d): Declare.
184
185 2009-10-03  Richard Guenther  <rguenther@suse.de>
186             Diego Novillo  <dnovillo@google.com>
187
188         * gimple.c: Include target.h and alias.h.
189         (gimple_types): Declare.
190         (type_hash_cache): Declare.
191         (gimple_alloc_stat): Make extern.
192         (gimple_build_eh_must_not_throw): Call
193         gimple_eh_must_not_throw_set_fndecl.
194         (struct type_pair_d): Declare.
195         (type_pair_t): Declare.
196         (type_pair_hash): New.
197         (type_pair_eq): New.
198         (lookup_type_pair): New.
199         (gimple_force_type_merge): New.
200         (compare_type_names_p): New.
201         (compare_field_offset): New.
202         (gimple_types_compatible_p): New.
203         (struct sccs): Declare.
204         (next_dfs_num): Declare.
205         (iterative_hash_gimple_type): New.
206         (visit): New.
207         (iterative_hash_type_name): New.
208         (iterative_hash_gimple_type): New.
209         (gimple_type_hash): New.
210         (gimple_type_eq): New.
211         (gimple_register_type): New.
212         (print_gimple_types_stats): New.
213         (gimple_signed_or_unsigned_type): New.
214         (gimple_unsigned_type): New.
215         (gimple_signed_type): New.
216         (gimple_get_alias_set): New.
217         (gimple_decl_printable_name): Do not use DMGL_TYPES.
218         * gimple.h (gimple_alloc, gimple_alloc_stat): Declare.
219         (gimple_force_type_merge): Declare.
220         (gimple_types_compatible_p): Declare.
221         (gimple_register_type): Declare.
222         (print_gimple_types_stats): Declare.
223         (gimple_unsigned_type): Declare.
224         (gimple_signed_type): Declare.
225         (gimple_get_alias_set): Declare.
226         (gimple_eh_must_not_throw_set_fndecl): New.
227
228 2009-10-03  Jan Hubicka  <jh@suse.cz>
229             Kenneth Zadeck <zadeck@naturalbridge.com>
230
231         * ipa-pure-const.c: Include lto-streamer.h.
232         (register_hooks): Factor out of ...
233         (generate_summary): ... here.
234         (pure_const_write_summary): New.
235         (pure_const_read_summary): New.
236         (pass_ipa_pure_const): Add pure_const_write_summary and
237         pure_const_read_summary.
238         * ipa-reference.c: Include lto-streamer.h.
239         (add_new_function): New.
240         (remove_node_data): New.
241         (duplicate_node_data): New.
242         (ipa_init): Guard against multiple calls.
243         Move hook setup from analyze_function.
244         (write_node_summary_p): New.
245         (ipa_reference_write_summary): New.
246         (ipa_reference_read_summary): New.
247         (pass_ipa_reference): Add ipa_reference_write_summary and
248         ipa_reference_read_summary.
249         * cgraph.h (cgraph_local_info): Add field lto_file_data.
250         (struct cgraph_edge): Add fields lto_stmt_uid and
251         call_stmt_cannot_inline_p.
252         (cgraph_optimize): Declare.
253         (cgraph_decide_is_function_needed): Declare.
254         (reset_inline_failed): Declare.
255         (enum LTO_cgraph_tags): Declare.
256         (LTO_cgraph_tag_names): Declare.
257         (LCC_NOT_FOUND): Define.
258
259 2009-10-03  Doug Kwan  <dougkwan@google.com>
260             Rafael Espindola  <espindola@google.com>
261             Jan Hubicka  <jh@suse.cz>
262             Diego Novillo  <dnovillo@google.com>
263             Kenneth Zadeck  <zadeck@naturalbridge.com>
264
265         * passes.c (all_regular_ipa_passes): New.
266         (all_ipa_passes): Rename to all_small_ipa_passes.
267         (init_optimization_passes): Init all_regular_ipa_passes.
268         * tree-pass.h (all_regular_ipa_passes): New.
269         (all_ipa_passes): Rename to all_small_ipa_passes.
270         * passes.c (all_lto_gen_passes): New.
271         (init_optimization_passes): Initialize all_lto_gen_passes.
272         (execute_ipa_summary_passes): Make non-static.
273         (ipa_write_summaries_1): New.
274         (ipa_write_summaries_2): New.
275         (ipa_write_summaries): New.
276         (ipa_write_summaries_of_cgraph_node_set): New.
277         (ipa_read_summaries_1): New.
278         (ipa_read_summaries): New.
279         (execute_ipa_pass_list): Call cgraph_process_new_functions.
280         (execute_regular_ipa_pass_list): Remove.
281         (init_optimization_passes): Schedule
282         pass_rebuild_cgraph_edges and pass_early_inline outside
283         of pass_all_early_optimizations.  Document reason.
284         (pass_ipa_lto_gimple_out, pass_ipa_lto_wpa_fixup,
285         pass_ipa_lto_finish_out): New pass.
286         (pass_ipa_summary_passes): Start and stop timers if the pass
287         has them.
288         (execute_all_ipa_transforms): New.
289         (execute_one_pass): Don't call execute_one_ipa_transform_pass.
290         (dump_properties, debug_properties): New.
291         * tree-optimize.c (gate_all_early_local_passes): Return
292         false if we are in lto1.
293         (tree_rest_of_compilation): Call execute_all_ipa_transforms.
294         * tree-pass.h (execute_all_ipa_transforms): Declare.
295         (pass_ipa_function_and_variable_visibility): Declare.
296         (pass_ipa_early_inline): Declare.
297         (pass_ipa_lto_gimple_out): Declare.
298         (pass_ipa_lto_wpa_fixup): Declare.
299         (pass_ipa_lto_finish_out): Declare.
300         (all_small_ipa_passes, all_regular_ipa_passes,
301         all_lto_gen_passes): Declare.
302         (execute_ipa_summary_passes): Declare.
303         (execute_all_ipa_transforms): Declare.
304         (ipa_write_summaries): Declare
305         (ipa_write_summaries_of_cgraph_node_set): Declare.
306         (ipa_read_summaries): Declare.
307
308 2009-10-03  Doug Kwan  <dougkwan@google.com>
309             Ollie Wild  <aaw@google.com>
310
311         * ipa-prop.c (ipa_propagate_indirect_call_infos): Do
312         nothing in WPA.
313
314         * collect2.c (LTO_MODE_NONE, LTO_MODE_LTO, LTO_MODE_WPA): New enums.
315         (lto_mode): New variable.
316         (maybe_run_lto_and_relink): Handle the -fwpa option.
317         (main): Handle the -fwpa option.
318         (maybe_unlink_list): New function.
319         * gcc.c (link_lto_options): Replace -flto with -fwpa.
320         * common.opt (flto): New flag.
321         * toplev.c (flag_generate_lto): Declare.
322
323 2009-10-03  Simon Baldwin  <simonb@google.com>
324
325         * common.opt (flto-compression-level): New flag.
326
327         * opts.c: Include lto-opts.h.
328         (handle_option): Call lto_register_user_option for each
329         valid option handled.
330         * (decode_options): Clear registered options before the options
331         handling loop.
332
333 2009-10-03  Cary Coutant  <ccoutant@google.com>
334
335         * collect2.c (is_elf): New function.
336         (scan_prog_file): Require LTO object to be in ELF format.
337
338 2009-10-03  Rafael Espindola  <espindola@google.com>
339
340         * gcc.c (LINK_COMMAND_SPEC): Use the -pass-through option to pass
341         libgcc to the linker.
342
343         * ipa-cp.c (cgraph_gate_cp): Return false if LTRANS is
344         running.
345
346         * collect2.c (maybe_run_lto_and_relink): Execute lto-wrapper.
347         (collect_execute): Add flags argument. Pass flags to pex_run. Update
348         all callers.
349         * collect2.h (collect_execute): Add flags argument.
350         * tlink.c (tlink_execute): Update call to collect_execute.
351         * gcc.c (main): Set the COLLECT_LTO_WRAPPER environment variable.
352         (use_linker_plugin): New.
353         (use_linker_plugin_spec_function): New.
354         (LINK_COMMAND_SPEC): Pass plugin options to the linker.
355         (linker_plugin_file_spec): New.
356         (lto_wrapper_spec): New.
357         (lto_gcc_spec): New.
358         (static_specs): Add linker_plugin_file, lto_wrapper and lto_gcc.
359         (static_spec_functions): Add use-linker-plugin.
360         (process_command): Handle -use-linker-plugin.
361         (main): Use lto_wrapper_spec instead of lto_wrapper. Set
362         linker_plugin_file_spec and lto_gcc_spec.
363         (use_linker_plugin_spec_function): New.
364
365 2009-10-03  Richard Guenther  <rguenther@suse.de>
366
367         PR lto/41547
368         PR lto/41548
369         * tree.h (is_lang_specific): Include LANG_TYPE.
370         * tree.c (find_decls_types_r): Manually add interesting parts
371         of TYPE_FIELDS.  Walk BINFO_VIRTUALS.  Do not walk TYPE_METHODS.
372
373         * gimple.c (type_pair_hash): Make symmetric.
374         (type_pair_eq): Likewise.
375         (lookup_type_pair): Increase initial hashtable size.
376         (gimple_force_type_merge): Rely on type-pair symmetry.
377         (visit): Remove excessive checking code.
378         (iterative_hash_type_name): Do not hash TYPE_NAME of
379         anonymous unions.
380         (gimple_register_type): Remove getenv calls, shrink initial
381         hashtable size.
382
383         PR middle-end/41502
384         * cgraphunit.c (ipa_passes): Do not remove bodies of extern
385         inline functions if not generating lto output.
386
387         PR lto/41379
388         * toplev.c (finalize): In WPA mode remove the asm file.
389
390 2009-10-03  Doug Kwan  <dougkwan@google.com>
391
392         * ipa-inline.c (cgraph_mark_inline): Check
393         edge->call_stmt_cannot_inline_p instead of calling
394         gimple_call_cannot_inline_p.
395         (cgraph_decide_inlining): Do nothing in WPA and LTRANS.
396         (cgraph_gate_ipa_early_inlining): Return false if
397         in_lto_p is set.
398         (inline_generate_summary): Do nothing in LTRANS.
399         * cgraph.c (initialize_inline_failed): Make sure
400         e->call_stmt exists before calling
401         gimple_call_cannot_inline_p.
402         (cgraph_create_edge): Set edge->call_stmt_cannot_inline_p.
403         (cgraph_clone_edge): Add argument STMT_UID.  Modify all
404         callers.
405         Update new_edge->lto_stmt_uid.
406         * cgraphbuild.c (reset_inline_failed): New.
407
408         * common.opt (fwpa): New flag.
409         (fltrans): New option.
410         * gcc.c (gcc_lto_option_t): New type.
411         (current_lto_option): New variable.
412         (lto_single_spec_function): Remove and is replaced by ..
413         (lto_option_spec_function): New function.
414         (LINK_COMMAND_SPEC): Use link_lto_option spec instead of just
415         passing the -flto flag.
416         (cc1_options): Separate non-LTO related parts into ..
417         (cc1_non_lto_options): Non-LTO related options shared by all FEs.
418         (lto1_options): New spec for lto FE.
419         (link_lto_options): New spec for handling LTO flags in linker.
420         (invoke_lto_single): Re-format to fit in 80 column.  Replace
421         lto-single with lto-option.
422         (static_specs): Add cc1_non_lto_options, lto1_options and
423         link_lto_options.
424         (static_spec_function): Replace lto-single with lto-option.
425         (process_command): Handle -flto, -fwpa and -fltran
426         by setting current_lto_option and not passing it to subprocess
427         unconditionally.
428
429 2009-10-03  Bill Maddox  <maddox@google.com>
430
431         Add `gcc' driver support for link-time code generation (LTO).
432
433         * collect2.c (enum pass): Add new literal PASS_LTOINFO.
434         (lto_flag, lto_objects, lto_o_file): New variables.
435         (struct lto_object, struct lto_object_list): New structures.
436         (collect_exit, handler): Remove LTO temporary output file on exit.
437         (add_lto_object): New function.
438         (maybe_run_lto_and_relink): New function. Perform link time code
439         generation and relinking for object files containing LTO information.
440         (main): Invoke maybe_run_lto_and_relink().
441         (dump_argv): New function.  For debugging, currently disabled.
442         (scan_prog_file): Add LTO information pass.
443         * gcc.c (LINK_COMMAND_SPEC): Pass `-flto' switch to linker, i.e.,
444         collect2.
445         * toplev.c (compile_file): Emit assembler directive to create
446         the `gnu_lto_v1' marker symbol when compiling with `-flto'.
447
448 2009-10-03  Diego Novillo  <dnovillo@google.com>
449
450         * c.opt: Add LTO to warn_abi and warn_psabi.
451
452         * tree.c (fld_worklist_push): Rename from PUSH.
453         Convert to static inline function.
454         Ignore language-specific nodes.
455         Update all users.
456         (find_decls_types_r): Do not traverse the subtrees of
457         language-specific nodes.
458         Do not traverse DECL_INITIAL for TYPE_DECLs.
459         * tree.h (is_lang_specific): New.
460         * langhooks.h (struct lang_hooks_for_decls): Remove
461         may_need_assembler_name_p.  Update all users.
462
463         * c-common.c (set_builtin_user_assembler_name): Move ...
464         * builtins.c (set_builtin_user_assembler_name): ... here.
465         (is_builtin_name): Add comment
466         (is_builtin_fn): New.
467         * except.c (output_ttype): Only call
468         lookup_type_for_runtime if TYPE is not a runtime type.
469
470         * passes.c (register_pass): Call position_pass on
471         all_small_ipa_passes, all_regular_ipa_passes and
472         all_lto_gen_passes.
473         * timevar.def (TV_IPA_LTO_GIMPLE_IO): Define.
474         (TV_IPA_LTO_DECL_IO): Define.
475         (TV_IPA_LTO_CGRAPH_IO): Define.
476         (TV_LTO): Define.
477         (TV_WHOPR_WPA): Define.
478         (TV_WHOPR_WPA_IO): Define.
479         (TV_WHOPR_LTRANS): Define.
480         (TV_WHOPR_WPA_FIXUP): Define.
481         (TV_WHOPR_WPA_LTRANS_EXEC): Define.
482         * tree-cfg.c (tree_node_can_be_shared): Make extern.
483         * tree-flow.h (tree_node_can_be_shared): Declare.
484         * tree-inline.c (tree_can_inline_p): Check that E has a
485         statement associated with it.
486         * tree.c (free_lang_data_in_binf): Factor out of ...
487         (free_lang_data_in_type): ... here.
488         Call RECORD_OR_UNION_TYPE_P.
489         (need_assembler_name_p): Ignore DECL if it does not have
490         TREE_PUBLIC set.
491         Call lang_hooks.decls.may_need_assembler_name_p if set.
492         (free_lang_data_in_decl): Do not clear DECL_CONTEXT for
493         CONST_DECLs.
494         (free_lang_data): Set debug_info_level to
495         DINFO_LEVEL_NONE.
496         Set write_symbols to NO_DEBUG.
497         Set debug_hooks to do_nothing_debug_hooks.
498         (gate_free_lang_data): Return true if flag_generate_lto
499         is set.
500         (walk_tree_1): Call RECORD_OR_UNION_TYPE_P.
501         * c-common.h (set_builtin_user_assembler_name): Move ...
502         * tree.h (set_builtin_user_assembler_name): ... here.
503
504         * common.opt (flto-report): New flag.
505         * opts.c (complain_wrong_lang): Do not complain if
506         running lto1.
507         * collect2.c (scan_prog_file): Send the error output of
508         'nm' to HOST_BIT_BUCKET.
509
510 2009-10-03  Ollie Wild  <aaw@google.com>
511
512         * langhooks-def.h (lhd_begin_section): New function declaration.
513         (lhd_write_section): New function declaration.
514         (lhd_end_section): New function declaration.
515         (LANG_HOOKS_BEGIN_SECTION): New macro.
516         (LANG_HOOKS_WRITE_SECTION_DATA): New macro.
517         (LANG_HOOKS_END_SECTION): New macro.
518         (LANG_HOOKS_LTO): New macro.
519         (LANG_HOOKS_INITIALIZER): Add LANG_HOOKS_LTO.
520         * langhooks.c (output.h): Add include.
521         (saved_section): New static variable.
522         (lhd_begin_section): New function.
523         (lhd_write_section_data): New function.
524         (lhd_end_section): New function.
525         * langhooks.h (struct lang_hooks_for_lto): New structure.
526         (struct lang_hooks): Add member lto.
527         * Makefile.in (langhooks.o): Add dependency on output.h.
528
529         * c-opts.c (c_common_post_options): Handle -flto and -fwhopr.
530
531 2009-10-03  Richard Guenther  <rguenther@suse.de>
532
533         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
534         Handle LTO.
535
536 2009-10-03  Simon Baldwin  <simonb@google.com>
537             Richard Guenther  <rguenther@suse.de>
538             Janis Johnson  <janis187@us.ibm.com>
539             Doug Kwan  <dougkwan@google.com>
540             Diego Novillo  <dnovillo@google.com>
541             Ramana Radhakrishnan  <ramana.r@gmail.com>
542             Ollie Wild  <aaw@google.com>
543
544         * doc/install.texi: Add documentation for libelf and --enable-lto.
545         * doc/invoke.texi: Document -fwpa, -flto, -fwhopr,
546         -fltrans, -flto-report, -flto-compression-level and
547         -use-linker-plugin.
548         * doc/sourcebuild.texi: Document use of zlib.
549         Document lto-plugin.
550         Add section for LTO Testing.
551
552 2009-10-02  Cary Coutant  <ccoutant@google.com>
553
554         Add support for comdat type sections for DWARF v4.  Merge from dwarf4
555         branch.
556         * dwarf2out.c (DWARF_TYPE_SIGNATURE_SIZE): New constant.
557         (dw_die_ref): Define vector type.
558         (enum dw_val_class): Add dw_val_class_data8.
559         (struct dw_val_struct): Add v.val_data8.
560         (comdat_type_node_ref): New type.
561         (struct die_struct): Move die_symbol into a union; add new field
562         die_type_node.  Change all uses.
563         (comdat_type_node): New type.
564         (skeleton_chain_node): New type.
565         (DWARF_COMDAT_TYPE_UNIT_HEADER_SIZE): New constant.
566         (comdat_type_list): New variable.
567         (dwarf_tag_name): Add DW_TAG_type_unit.
568         (dwarf_attr_name): Add DW_AT_signature.
569         (add_AT_data8): New function.
570         (replace_child): New function.
571         (move_all_children): New function.
572         (print_signature): New function.
573         (print_die): Print signature information; add dw_val_class_data8.
574         (attr_checksum): Support dw_val_class_data8.
575         (CHECKSUM_STRING): Redefine for DWARF-4 to include
576         trailing NULL byte.
577         (CHECKSUM_SLEB128, CHECKSUM_ULEB128): New macros.
578         (checksum_sleb128, checksum_uleb128): New functions.
579         (checksum_die_context): New function.
580         (loc_checksum_ordered): New function.
581         (attr_checksum_ordered): New function.
582         (struct checksum_attributes): New structure.
583         (collect_checksum_attributes): New function.
584         (die_checksum_ordered): New function.
585         (generate_type_signature): New function.
586         (same_dw_val_p): Add dw_val_class_data8.
587         (is_symbol_die): Use new is_declaration_die function.
588         (is_declaration_die): New function.
589         (should_move_die_to_comdat): New function.
590         (clone_die): New function.
591         (clone_tree): New function.
592         (clone_as_declaration): New function.
593         (copy_declaration_context): New function.
594         (generate_skeleton_ancestor_tree): New function.
595         (generate_skeleton_bottom_up): New function.
596         (generate_skeleton): New function.
597         (remove_child_or_replace_with_skeleton): New function.
598         (break_out_comdat_types): New function.
599         (struct decl_table_entry): New type.
600         (htab_decl_hash): New function.
601         (htab_decl_eq): New function.
602         (htab_decl_del): New function.
603         (copy_ancestor_tree): New function.
604         (copy_decls_walk): New function.
605         (copy_decls_for_unworthy_types): New function.
606         (build_abbrev_table): Don't assert on missing die_symbol when doing
607         comdat type sections.
608         (size_of_die): Use DW_FORM_sig8 for external references; Add
609         dw_val_class_data8.
610         (unmark_dies): Don't assert for unmarked dies when doing comdat
611         type sections.
612         (value_format): Support DW_FORM_sig8 and dw_val_class_data8.
613         (output_signature): New function.
614         (output_die): Likewise.
615         (output_compilation_unit_header): Mark output as DWARF version 3
616         even if generating DWARF 4.
617         (output_comdat_type_unit): New function.
618         (output_line_info): Mark output as DWARF version 3 even if generating
619         DWARF 4.
620         (dwarf2out_start_source_file): Don't do eliminate_dwarf2_dups with
621         DWARF-4.
622         (dwarf2out_end_source_file): Likewise.
623         (prune_unused_types_walk_attribs): Don't follow references into
624         comdat type sections.
625         (prune_unused_types_mark): When generating type units, do not mark
626         children of non-defining declarations of types; do mark children of
627         type entries.
628         (prune_unused_types): Process comdat type sections.
629         (htab_ct_hash): New function.
630         (htab_ct_eq): New function.
631         (dwarf2out_finish): Move types to comdat sections when using DWARF-4.
632         Add a pointer to the line table from type unit entries so
633         DW_AT_decl_file has meaning.
634         * varasm.c (default_elf_asm_named_section): Use identifier name as
635         comdat key instead of lang hook.
636
637 2009-10-02  Neil Vachharajani  <nvachhar@google.com>
638
639         * gcov-io.c (gcov_open): Open files read-only when MODE < 0
640
641 2009-10-02  Uros Bizjak  <ubizjak@gmail.com>
642
643         * config/i386/i386.md (divmod<mode>4) Macroize expander from
644         divmoddi4, divmodsi4 and divmodhi4 patterns using SWI248 macro.
645         (*divmod<mode>4): Macroize insn_and_split pattern from
646         *divmoddi4_cltd_rex64, *divmodsi4_cltd and divmodhi4 insn patterns
647         and their corresponding splitters usign SWI248 macro.  Split SImode
648         insn to generate cltd and DImode insn to generate cqto instead of
649         move+shift when optimizing for size or TARGET_USE_CLTD is in effect.
650         (*divmoddi4_nocltd_rex64, *divmodsi4_nocltd): Remove insn patterns.
651         (*divmod<mode>4_noext): Macroize insn from *divmoddi_noext_rex64 and
652         *divmodsi_noext patterns using SWI248 macro.
653         (udivmod<mode>4): Macroize expander from udivmoddi4, udivmodsi4 and
654         udivmodhi4 patterns using SWI248 macro.
655         (*udivmod<mode>4): Macroize insn_and_split pattern from
656         *udivmoddi4, udivmodsi4 and udivmodhi4 patterns and their
657         corresponding splitters using SWI248 macro.
658         (*udivmod<mode>4_noext): Macroize insn from *udivmoddi4_noext,
659         *udivmodsi4_noext and *udivmodhi_noext patterns using SWI248 macro.
660
661 2009-10-02  Eric Botcazou  <ebotcazou@adacore.com>
662
663         * stor-layout.c (layout_type) <ARRAY_TYPE>: Make sure that an array
664         of zero-sized element is zero-sized regardless of its extent.
665
666 2009-10-02  Jakub Jelinek  <jakub@redhat.com>
667
668         PR debug/40521
669         * configure.ac (HAVE_GAS_CFI_SECTIONS_DIRECTIVE): New test.
670         * configure: Regenerated.
671         * config.in: Regenerated.
672         * dwarf2out.c (dwarf2out_do_cfi_asm): Return false if
673         !HAVE_GAS_CFI_SECTIONS_DIRECTIVE and not emitting .eh_frame.
674         (dwarf2out_init): If HAVE_GAS_CFI_SECTIONS_DIRECTIVE and
675         not emitting .eh_frame, emit .cfi_sections .debug_frame
676         directive.
677
678         PR debug/41404
679         PR debug/41353
680         * cfgexpand.c (expand_debug_expr) <case STRING_CST>: Don't create
681         CONST_STRING if STRING_CST contains embedded '\0's or doesn't end with
682         '\0'.
683         (expand_debug_expr) <case VAR_DECL>: For TREE_STATIC !DECL_EXTERNAL
684         vars use DECL_RTL with resetting it back to NULL afterwards.
685         * dwarf2out.c (same_dw_val_p): For dw_val_class_addr compare with
686         rtx_equal_p instead of asserting it is a SYMBOL_REF.
687         (value_format): For dw_val_class_addr only use DW_FORM_addr if
688         the attribute type allows it, otherwise use DW_FORM_dataN.
689         (mem_loc_descriptor): Handle CONST_STRING.
690         (add_const_value_attribute): Handle CONST_STRING using add_AT_addr.
691         Handle MEM with CONST_STRING address using add_AT_string.
692         (rtl_for_decl_init): Return MEM with CONST_STRING address instead of
693         CONST_STRING for const arrays initialized with a string literal.
694         (resolve_one_addr, resolve_addr_in_expr, resolve_addr): New functions.
695         (dwarf2out_finish): Call resolve_addr.
696
697 2009-10-02  Andreas Schwab  <schwab@linux-m68k.org>
698             Maxim Kuvyrkov  <maxim@codesourcery.com>
699
700         * config/m68k/lb1sf68.asm (PICCALL): Use variable sized branch.
701
702 2009-10-02  Nick Clifton  <nickc@redhat.com>
703
704         * config/mn10300/mn10300.h (USER_LABEL_PREFIX): Define.
705         (ASM_OUTPUT_LABELREF): Use asm_fprintf and %U.
706
707 2009-10-01  Jan Hubicka  <jh@suse.cz>
708
709         * cgraph.c (cgraph_clone_node): Add redirect_callers parameter.
710         (cgraph_create_virtual_clone): Just pass redirect_callers
711         around.
712         * cgraph.h (cgraph_clone_node): Update prototype.
713         * ipa-pure-const.c (self_recursive_p): New function.
714         (propagate): Use it.
715         * ipa-inline.c (cgraph_clone_inlined_nodes,
716         cgraph_decide_recursive_inlining): Update.
717
718 2009-10-01  David Daney  <ddaney@caviumnetworks.com>
719
720         * gcc/config/mips/mips.c (mips_process_sync_loop) Emit syncw
721         instructions for TARGET_OCTEON.
722
723 2009-10-01  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
724
725         * config/arm/arm.c (arm_override_options): Turn off
726         flag_dwarf2_cfi_asm for AAPCS variants.
727
728 2009-10-01  Martin Jambor  <mjambor@suse.cz>
729
730         PR middle-end/12392
731         * tree-sra.c (convert_callers): Do not call
732         compute_inline_parameters on one caller more than once.
733
734 2009-10-01  Nick Clifton  <nickc@redhat.com>
735
736         * config/vax/netbsd-elf.h (NETBSD_CC1_AND_CC1PLUS_SPEC): Define as
737         an empty string if not already defined.
738
739 2009-10-01  Martin Jambor  <mjambor@suse.cz>
740
741         PR bootstrap/41395
742         * tree-sra.c (is_va_list_type): New function.
743         (find_var_candidates): Call is_va_list_type.
744         (find_param_candidates): Check that the type or the type pointed
745         to are not va_list types.
746
747 2009-10-01  Martin Jambor  <mjambor@suse.cz>
748
749         PR c++/41503
750         * cp/pt.c (function_parameter_expanded_from_pack_p): Return false if
751         DECL_ARTIFICIAL (param_decl) is true.
752
753 2009-09-30  Gabriel Dos Reis  <gdr@cs.tamu.edu>
754
755         * tree.h (tree_decl_common::lang_flag_8): New.
756         * c-common.c (c_common_reswords): Include "constexpr" as C++0x
757         keyword.
758         * c-common.h (RID_CONSTEXPR): New.
759
760 2009-09-30  Uros Bizjak  <ubizjak@gmail.com>
761
762         * config/alpha/alpha.c (alpha_gimplify_va_arg_1):
763         Use ref-all pointers.
764         (alpha_gimplify_va_arg): Ditto.
765
766 2009-09-30  Jakub Jelinek  <jakub@redhat.com>
767
768         PR target/41279
769         * cfgloopanal.c (num_loop_insns): Don't increment ninsns for each bb
770         before insn counting loop now that BB_END (bb) is counted.  Ensure
771         the return value isn't zero.
772
773 2009-09-30  Nick Clifton  <nickc@redhat.com>
774
775         * config.gcc (sh-symbianelf): Replace definition of extra_objs
776         with separate definitions of c_target_objs and cxx_target_objs.
777         * config/sh/t-sh: Add rules to build symbian-cxx.o, symbian-c.o
778         and symbian-base.o.
779         * config/sh/sh.c (TARGET_CXX_INPUT_EXPORT_CLASS): Use
780         sh_symbian_import_export_class.
781         * config/sh/sh-protos.h: Fix names of exported symbian functions.
782         * config/sh/symbian.c: Delete, moving code into...
783         * config/sh/symbian-base.c: ... here
784         * config/sh/symbian-c.c: ... and here
785         * config/sh/symbian-cxx.c: ... and here.
786
787 2009-09-30  Uros Bizjak  <ubizjak@gmail.com>
788
789         PR target/22093
790         * config/alpha/alpha.md (unaligned_storehi_be): Force operand
791         of plus RTX into register.
792
793 2009-09-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
794
795         * doc/install.texi: Linguistic and markup fixes.
796         (Configuration) <--disable-cpp>: Remove description.
797         <--enable-maintainer-mode>: Autotools files are affected, too.
798         <--with-sysroot>: Improve description.
799         (Building): Bump required GNU make version.
800
801 2009-09-29  Harsha Jagasia  <harsha.jagasia@amd.com>
802
803         * config.gcc (i[34567]86-*-*): Include fma4intrin.h.
804         (x86_64-*-*): Ditto.
805
806         * config/i386/fma4intrin.h: New file, provide common x86 compiler
807         intrinisics for FMA4.
808         * config/i386/cpuid.h (bit_FMA4): Define FMA4 bit.
809         * config/i386/x86intrin.h: Fix typo to SSE4A instead of SSE4a.
810         Add FMA4 check and fma4intrin.h.
811         * config/i386/i386-c.c(ix86_target_macros_internal): Check
812         ISA_FLAG for FMA4.
813         * config/i386/i386.h(TARGET_FMA4): New macro for FMA4.
814         * config/i386/i386.md (UNSPEC_FMA4_INTRINSIC): Add new UNSPEC
815         constant for FMA4 support.
816         (UNSPEC_FMA4_FMADDSUB): Ditto.
817         (UNSPEC_FMA4_FMSUBADD): Ditto.
818         * config/i386/i386.opt (-mfma4): New switch for FMA4 support.
819         * config/i386/i386-protos.h (ix86_fma4_valid_op_p): Add declaration.
820         (ix86_expand_fma4_multiple_memory): Ditto.
821         * config/i386/i386.c (OPTION_MASK_ISA_FMA4_SET): New.
822         (OPTION_MASK_ISA_FMA4_UNSET): New.
823         (OPTION_MASK_ISA_SSE4A_UNSET): Change definition to depend on FMA4.
824         (OPTION_MASK_ISA_AVX_UNSET): Change definition to depend on FMA4.
825         (ix86_handle_option): Handle -mfma4.
826         (isa_opts): Handle -mfma4.
827         (enum pta_flags): Add PTA_FMA4.
828         (override_options): Add FMA4 support.
829         (IX86_BUILTIN_VFMADDSS): New for FMA4 intrinsic.
830         (IX86_BUILTIN_VFMADDSD): Ditto.
831         (IX86_BUILTIN_VFMADDPS): Ditto.
832         (IX86_BUILTIN_VFMADDPD): Ditto.
833         (IX86_BUILTIN_VFMSUBSS): Ditto.
834         (IX86_BUILTIN_VFMSUBSD): Ditto.
835         (IX86_BUILTIN_VFMSUBPS): Ditto.
836         (IX86_BUILTIN_VFMSUBPD): Ditto.
837         (IX86_BUILTIN_VFMADDSUBPS): Ditto.
838         (IX86_BUILTIN_VFMADDSUBPD): Ditto.
839         (IX86_BUILTIN_VFMSUBADDPS): Ditto.
840         (IX86_BUILTIN_VFMSUBADDPD): Ditto.
841         (IX86_BUILTIN_VFNMADDSS): Ditto.
842         (IX86_BUILTIN_VFNMADDSD): Ditto.
843         (IX86_BUILTIN_VFNMADDPS): Ditto.
844         (IX86_BUILTIN_VFNMADDPD): Ditto.
845         (IX86_BUILTIN_VFNMSUBSS): Ditto.
846         (IX86_BUILTIN_VFNMSUBSD): Ditto.
847         (IX86_BUILTIN_VFNMSUBPS): Ditto.
848         (IX86_BUILTIN_VFNMSUBPD): Ditto.
849         (IX86_BUILTIN_VFMADDPS256): Ditto.
850         (IX86_BUILTIN_VFMADDPD256): Ditto.
851         (IX86_BUILTIN_VFMSUBPS256): Ditto.
852         (IX86_BUILTIN_VFMSUBPD256): Ditto.
853         (IX86_BUILTIN_VFMADDSUBPS256): Ditto.
854         (IX86_BUILTIN_VFMADDSUBPD256): Ditto.
855         (IX86_BUILTIN_VFMSUBADDPS256): Ditto.
856         (IX86_BUILTIN_VFMSUBADDPD256): Ditto.
857         (IX86_BUILTIN_VFNMADDPS256): Ditto.
858         (IX86_BUILTIN_VFNMADDPD256): Ditto.
859         (IX86_BUILTIN_VFNMSUBPS256): Ditto.
860         (IX86_BUILTIN_VFNMSUBPD256): Ditto.
861         (enum multi_arg_type): New enum for describing the various FMA4
862         intrinsic argument types.
863         (bdesc_multi_arg): New table for FMA4 intrinsics.
864         (ix86_init_mmx_sse_builtins): Add FMA4 intrinsic support.
865         (ix86_expand_multi_arg_builtin): New function for creating FMA4
866         intrinsics.
867         (ix86_expand_builtin): Add FMA4 intrinsic support.
868         (ix86_fma4_valid_op_p): New function to validate FMA4 3 and 4
869         operand instructions.
870         (ix86_expand_fma4_multiple_memory): New function to split the
871         second memory reference from FMA4 instructions.
872         * config/i386/sse.md (ssemodesuffixf4): New mode attribute for FMA4.
873         (ssemodesuffixf2s): Ditto.
874         (fma4_fmadd<mode>4): Add FMA4 floating point multiply/add
875         instructions.
876         (fma4_fmsub<mode>4): Ditto.
877         (fma4_fnmadd<mode>4): Ditto.
878         (fma4_fnmsub<mode>4): Ditto.
879         (fma4_vmfmadd<mode>4): Ditto.
880         (fma4_vmfmsub<mode>4): Ditto.
881         (fma4_vmfnmadd<mode>4): Ditto.
882         (fma4_vmfnmsub<mode>4): Ditto.
883         (fma4_fmadd<mode>4256): Ditto.
884         (fma4_fmsub<mode>4256): Ditto.
885         (fma4_fnmadd<mode>4256): Ditto.
886         (fma4_fnmsub<mode>4256): Ditto.
887         (fma4_fmaddsubv8sf4): Ditto.
888         (fma4_fmaddsubv4sf4): Ditto.
889         (fma4_fmaddsubv4df4): Ditto.
890         (fma4_fmaddsubv2df4): Ditto.
891         (fma4_fmsubaddv8sf4): Ditto.
892         (fma4_fmsubaddv4sf4): Ditto.
893         (fma4_fmsubaddv4df4): Ditto.
894         (fma4_fmsubaddv2df4): Ditto.
895         (fma4i_fmadd<mode>4): Add FMA4 floating point multiply/add
896         instructions for intrinsics.
897         (fma4i_fmsub<mode>4): Ditto.
898         (fma4i_fnmadd<mode>4): Ditto.
899         (fma4i_fnmsub<mode>4): Ditto.
900         (fma4i_vmfmadd<mode>4): Ditto.
901         (fma4i_vmfmsub<mode>4): Ditto.
902         (fma4i_vmfnmadd<mode>4): Ditto.
903         (fma4i_vmfnmsub<mode>4): Ditto.
904         (fma4i_fmadd<mode>4256): Ditto.
905         (fma4i_fmsub<mode>4256): Ditto.
906         (fma4i_fnmadd<mode>4256): Ditto.
907         (fma4i_fnmsub<mode>4256): Ditto.
908         (fma4i_fmaddsubv8sf4): Ditto.
909         (fma4i_fmaddsubv4sf4): Ditto.
910         (fma4i_fmaddsubv4df4): Ditto.
911         (fma4i_fmaddsubv2df4): Ditto.
912         (fma4i_fmsubaddv8sf4): Ditto.
913         (fma4i_fmsubaddv4sf4): Ditto.
914         (fma4i_fmsubaddv4df4): Ditto.
915         (fma4i_fmsubaddv2df4): Ditto.
916
917         * doc/invoke.texi (-mfma4): Add documentation.
918         * doc/extend.texi (x86 intrinsics): Add FMA4 intrinsics.
919
920 2009-09-29  Richard Henderson  <rth@redhat.com>
921
922         * tree-eh.c (unsplit_eh): Do not unsplit if there's already
923         an edge to the new destination block.
924
925 2009-09-29  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
926
927         PR target/41393
928         * pa.c (hppa_profile_hook): Use
929         make_reg_eh_region_note_nothrow_nononlocal to add REG_EH_REGION note.
930
931 2009-09-29  Steve Ellcey  <sje@cup.hp.com>
932             Alexander Monakov  <amonakov@ispras.ru>
933
934         PR target/41365
935         * config/ia64/predicates.md (not_postinc_destination_operand): New.
936         (not_postinc_memory_operand): New.
937         (not_postinc_move_operand): New.
938         * config/ia64/ia64.md (*cmovdi_internal): Disallow autoincrement.
939         (*cmovsi_internal): Ditto.
940
941 2009-09-29  Pat Haugen  <pthaugen@us.ibm.com>
942
943         * config/rs6000/rs6000.c (rs6000_issue_rate): Don't artificially
944         restrict issue_rate in first pass when scheduling for register
945         pressure.
946
947 2009-09-29  Basile Starynkevitch  <basile@starynkevitch.net>
948             Rafael Avila de Espindola  <espindola@google.com>
949
950         * gengtype.c (plugin_output): New.
951         (get_output_file_with_visibility): Return plugin_output for plugins.
952         (main): Parse and use the -P option.
953         * gty.texi: Update the command line format.
954
955 2009-09-29  Jakub Jelinek  <jakub@redhat.com>
956
957         PR debug/41438
958         * dwarf2out.c (const_ok_for_output_1, const_ok_for_output): New
959         functions.
960         (mem_loc_descriptor, loc_descriptor, add_const_value_attribute): Bail
961         out if !const_ok_for_output.
962
963         PR debug/41474
964         * dwarf2out.c (mem_loc_descriptor) <case CONCAT, case CONCATN,
965         case VAR_LOCATION>: Remove gcc_unreachable ().
966
967 2009-09-29  Harsha Jagasia  <harsha.jagasia@amd.com>
968
969         * config.gcc (i[34567]86-*-*): Remove mmintrin-common.h.
970         (x86_64-*-*): Ditto.
971         * config/i386/smmintrin.h: Move instructions in mmintrin-common.h
972         back to smmintrin.h.
973         * config/i386/cpuid.h: (bit_SSE5): Remove SSE5 bit.
974         * config/i386/x86intrin.h: Remove SSE5.
975         * config/i386/mmintrin-common.h: Delete file.
976         * doc/extend.texi (x86 intrinsics): Remove SSE5 flags and builtins.
977
978 2009-09-29  Richard Guenther  <rguenther@suse.de>
979
980         * alias.c (ao_ref_from_mem): Properly deal with off decl accesses
981         resulting from stack temporaries on STRICT_ALIGNMENT targets.
982
983 2009-09-29  Nick Clifton  <nickc@redhat.com>
984
985         * function.c (current_function_name): If there is no current
986         function just return "<none>".
987
988 2009-09-28  Sriraman Tallam  <tmsriram@google.com>
989
990         * tree-pass.h (register_pass_info): New structure.
991         (pass_positioning_ops): Move enum from gcc-plugin.h.
992         (register_pass): New function.
993         * gcc-plugin.h (plugin_pass): Delete structure.
994         (pass_positioning_ops): Delete enum.
995         * plugin.c (regsiter_pass): Delete function.
996         (position_pass): Delete function.
997         (added_pass_nodes): Delete variable.
998         (prev_added_pass_nodes): Delete variable.
999         (pass_list_node): Delete structure.
1000         * passes.c (make_pass_instance): New function.
1001         (next_pass_1): Change to call make_pass_instance.
1002         (pass_list_node): Move structure from gcc-plugin.h.
1003         (added_pass_nodes): Move variable from plugin.c.
1004         (prev_added_pass_nodes): Move variable from plugin.c.
1005         (position_pass): New function.
1006         (register_pass): New function.
1007
1008 2009-09-28  Easwaran Raman  <eraman@google.com>
1009
1010         * ifcvt.c (noce_try_abs): Recognize pattern and call
1011         expand_one_cmpl_abs_nojump.
1012         * optabs.c (expand_one_cmpl_abs_nojump): New function.
1013         * optabs.h (expand_one_cmpl_abs_nojump): Declare.
1014
1015 2009-09-28  Ian Lance Taylor  <iant@google.com>
1016
1017         PR middle-end/40500
1018         * c-opts.c (c_common_handle_option): Don't set
1019         warn_jump_misses_init for -Wall.
1020         * doc/invoke.texi (Warning Options): Update documentation.
1021
1022 2009-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1023
1024         * Makefile.in ($(out_object_file)): Depend on
1025         gt-$(basename $(notdir $(out_file))).h.
1026
1027 2009-09-28  Richard Henderson  <rth@redhat.com>
1028
1029         * except.h (struct eh_region_d): Add use_cxa_end_cleanup.
1030         * except.c (gen_eh_region): Set it.
1031         (duplicate_eh_regions_1): Copy it.
1032         * tree-eh.c (lower_resx): Use it to determine which function
1033         to call to resume.
1034
1035         * langhooks.h (struct lang_hooks): Add eh_use_cxa_end_cleanup.
1036         * langhooks-def.h (LANG_HOOKS_EH_USE_CXA_END_CLEANUP): New.
1037         * builtins.def (BUILT_IN_CXA_END_CLEANUP): New.
1038         * tree.c (build_common_builtin_nodes): Remove parameter.  Build
1039         BUILT_IN_CXA_END_CLEANUP if necessary.
1040
1041         * c-common.c (c_define_builtins): Update call to
1042         build_common_builtin_nodes.
1043
1044 2009-09-28  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1045
1046         * spu.c (get_branch_target): Return NULL for ASM_OPERANDS patterns.
1047
1048 2009-09-28  Michael Matz  <matz@suse.de>
1049
1050         * builtins.c (interclass_mathfn_icode): New helper.
1051         (expand_builtin_interclass_mathfn): Use it here, and split folding
1052         into ...
1053         (fold_builtin_interclass_mathfn): ... this new folder.
1054         (build_call_nofold_loc): New static helper.
1055         (build_call_nofold): New wrapper macro for above.
1056         (expand_builtin_int_roundingfn): Use it instead of build_call_expr.
1057         (expand_builtin_pow): Ditto.
1058         (expand_builtin_memset_args): Ditto.
1059         (expand_builtin_printf): Ditto.
1060         (expand_builtin_fprintf): Ditto.
1061         (expand_builtin_sprintf): Ditto.
1062         (expand_builtin_memory_chk): Ditto.
1063         (expand_builtin_mempcpy_args): Ditto and don't call folders.
1064         (expand_builtin_stpcpy): Ditto.
1065         (expand_builtin_strcmp): Ditto.
1066         (expand_builtin_strncmp): Ditto.
1067         (expand_builtin_strcpy): Remove FNDECL and MODE arguments.
1068         (expand_builtin_strcpy_args): Don't call folders.
1069         (expand_builtin_memcmp): Ditto.
1070         (expand_builtin_strncpy): Ditto, and use target.
1071         (expand_builtin_memcpy): Ditto.
1072         (expand_builtin_strstr, expand_builtin_strchr, expand_builtin_strrchr,
1073         expand_builtin_strpbrk, expand_builtin_memmove,
1074         expand_builtin_memmove_args, expand_builtin_bcopy,
1075         expand_builtin_memchr, expand_builtin_strcat, expand_builtin_strncat,
1076         expand_builtin_strspn, expand_builtin_strcspn,
1077         expand_builtin_fputs): Remove these.
1078         (expand_builtin): Don't call the above, change calls to other
1079         expanders that changed prototype.
1080         (fold_builtin_stpcpy): New folder split out from expand_builtin_stpcpy.
1081         (fold_builtin_1 <ISFINITE, ISINF, ISNORMAL>): Call
1082         fold_builtin_interclass_mathfn.
1083         (fold_builtin_2 <STPCPY>): Call fold_builtin_stpcpy.
1084         (fold_builtin_strcat): Add folding split from expand_builtin_strcat.
1085
1086         * fold-const.c (fold_binary_loc <NE_EXPR>): Add !exp != 0 -> !exp.
1087         * passes.c (init_optimization_passes): Move pass_fold_builtins
1088         after last phiopt pass.
1089         * tree-inline.c (fold_marked_statements): When folding builtins
1090         iterate over all instruction potentially generated.
1091         * tree-ssa-ccp.c (gimplify_and_update_call_from_tree): Declare
1092         earlier.
1093         (fold_gimple_call): Use it to always fold calls (into potentially
1094         multiple instructions).
1095         * tree-ssa-dom.c (optimize_stmt): Resolve __builtin_constant_p
1096         calls into zero at this time.
1097         * tree-ssa-propagate.c (substitute_and_fold): Ignore multiple
1098         statements generated by builtin folding.
1099
1100 2009-09-28  Nick Clifton  <nickc@redhat.com>
1101
1102         * config/m32r/m32r.c (m32r_is_insn): Return false for debugging
1103         insns.
1104
1105 2009-09-28  Duncan Sands  <baldrick@free.fr>
1106
1107         * gcc-plugin.h (PLUGIN_REGISTER_GGC_CACHES): New event.
1108         * plugin.c (plugin_event_name): Add PLUGIN_REGISTER_GGC_CACHES.
1109         (register_callback): Dispatch it.
1110         (invoke_plugin_callbacks): Incorporate in sanity check.
1111         * ggc.h (ggc_register_cache_tab): Add declaration.
1112         * ggc-common.c (ggc_register_root_tab): Simplify.
1113         (const_ggc_cache_tab_t): New typedef.
1114         (extra_cache_vec): New vector of dynamically added cache tables.
1115         (ggc_register_cache_tab): New function.
1116         (ggc_scan_cache_tab): New function.
1117         (ggc_mark_roots): Simplify dynamic roots.  Handle dynamic caches.
1118         * doc/plugins.texi: Document PLUGIN_REGISTER_GGC_CACHES.
1119
1120 2009-09-27  Richard Henderson  <rth@redhat.com>
1121
1122         * tree-ssa-ccp.c (optimize_stack_restore): Relax the conditions under
1123         which we remove __builtin_stack_restore.
1124
1125 2009-09-27  Bernd Schmidt  <bernd.schmidt@analog.com>
1126
1127         * loop-iv.c (iv_analyze_op): Use function_invariant_p, not CONSTANT_P,
1128         to test for GRD_INVARIANT.
1129         (simple_rhs_p): Anything that's function_invariant_p is fine.
1130
1131 2009-09-27  Rafael Avila de Espindola  <espindola@google.com>
1132
1133         * gengtype.c (main): Use plunge_files instead of plugin_output.
1134
1135 2009-09-27  Basile Starynkevitch  <basile@starynkevitch.net>
1136             Rafael Avila de Espindola  <espindola@google.com>
1137
1138         * gengtype.c (write_root, write_roots): Add a emit_pch argument.
1139         Don't print pch related info if it is false.
1140         (main): Don't print pch info in plugin mode.
1141
1142 2009-09-27  Eric Botcazou  <ebotcazou@adacore.com>
1143
1144         * dwarf2out.c (enum dw_val_class): Replace dw_val_class_long_long
1145         with dw_val_class_const_double.
1146         (struct dw_val_struct): Replace val_long_long with val_double and
1147         adjust for above change.
1148         (output_loc_operands): Likewise.
1149         (add_AT_long_long): Rename into...
1150         (add_AT_double): ...this.
1151         (print_die): Replace dw_val_class_long_long with
1152         dw_val_class_const_double and adjust.
1153         (attr_checksum): Likewise.
1154         (same_dw_val_p): Likewise.
1155         (size_of_die): Likewise.
1156         (value_format): Likewise.
1157         (output_die): Likewise.
1158         (loc_descriptor) <CONST_DOUBLE>: Likewise.
1159         (add_const_value_attribute) <CONST_DOUBLE>: Call add_AT_double
1160         instead of add_AT_long_long.
1161         (add_bound_info) <INTEGER_CST>: Generate the bound as an unsigned
1162         value with the precision of its type.
1163
1164 2009-09-27  Andreas Schwab  <schwab@linux-m68k.org>
1165
1166         PR c/41476
1167         * c-typeck.c (build_conditional_expr): Use the readonly and
1168         volatile flags of the operand types, not of the operands itself.
1169
1170 2009-09-27  Peter O'Gorman  <pogma@thewrittenword.com>
1171
1172         collect2.c (main): Look for -brtl before adding libraries.
1173
1174 2009-09-27  Jonathan Gray  <jsg@openbsd.org>
1175
1176         * config.gcc: Update OpenBSD targets.
1177         * config/openbsd-stdint.h: New file.
1178         * config/openbsd-libpthread.h: New file.
1179         * config/openbsd.h: Update and break out LIB_SPEC definition.
1180         * config/alpha/openbsd.h: Overhaul to reflect ELF migration.
1181         * config/i386/openbsdelf.h: Correct types.
1182         * config/m68k/openbsd.h: Likewise.
1183         * config/mips/openbsd.h: Likewise.
1184         * config/vax/openbsd.h: Likewise.
1185
1186 2009-09-27  Eric Botcazou  <ebotcazou@adacore.com>
1187
1188         * fold-const.c (maybe_lvalue_p): Return false for M(IN|AX)_EXPR.
1189         (extract_muldiv_1) <MINUS_EXPR>: Swap operands if necessary.
1190         * stor-layout.c (layout_type) <ARRAY_TYPE>: Do not take the maximum
1191         of the length and zero.
1192
1193 2009-09-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1194
1195         * Makefile.in (TOPLEV_H): Use $(INPUT_H) not input.h.
1196         (FLAGS_H): Add options.h $(REAL_H).
1197         (SEL_SCHED_IR_H): Add $(BITMAP_H) vecprim.h $(CFGLOOP_H).
1198         (TREE_VECTORIZER_H): New.
1199         (EBITMAP_H): Renamed from EBIMAP_H.
1200         (c-decl.o, c-objc-common.o, c-pretty-print.o, attribs.o, c-omp.o)
1201         (gtype-desc.o, ggc-common.o, ggc-page.o, ggc-zone.o, langhooks.o)
1202         (tree.o, tree-ssa-structalias.o, tree-ssa-ter.o, tree-ssanames.o)
1203         (tree-phinodes.o, tree-ssa-loop.o, tree-ssa-math-opts.o)
1204         (gimple-low.o, omp-low.o, sese.o, graphite-blocking.o)
1205         (graphite-clast-to-gimple.o, graphite-dependences.o)
1206         (graphite-interchange.o, graphite-poly.o, graphite-scop-detection.o)
1207         (graphite-sese-to-poly.o, tree-vect-loop.o, tree-vect-loop-manip.o)
1208         (tree-vect-patterns.o, tree-vect-slp.o, tree-vect-stmts.o)
1209         (tree-vect-data-refs.o, tree-vectorizer.o, gimple.o, tree-mudflap.o)
1210         (targhooks.o, stmt.o, emit-rtl.o, ipa.o, matrix-reorg.o, ipa-inline.o)
1211         (gcse.o, tree-ssa-ccp.o, df-byte-scan.o, vec.o, caller-save.o)
1212         (ira-build.o, ira-costs.o, ira-color.o, ira-emit.o, ira.o)
1213         (haifa-sched.o, sched-rgn.o, sel-sched.o, sel-sched-dump.o)
1214         (sel-sched-ir.o, final.o, $(out_object_file)): Dependencies
1215         updated and fixed as per above changes and per
1216         check_makefile_deps.sh output.
1217
1218         PR bootstrap/40928
1219         * configure.ac: Use $LIBS for '-ldl', not $LDFLAGS.
1220         * configure: Regenerate.
1221
1222 2009-09-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1223
1224         * doc/install.texi: Update minimum MPC version to 0.7.
1225
1226 2009-09-26  Gerald Pfeifer  <gerald@pfeifer.com>
1227
1228         * doc/install.texi (Binaries): Remove reference to the binary
1229         distribution CD-ROM from the FSF.
1230
1231 2009-09-26  Michael Matz  <matz@suse.de>
1232
1233         PR lto/40758
1234         PR middle-end/41470
1235         * tree-ssa-coalesce.c (coalesce_ssa_name): Add only SSA names
1236         that are mentioned in the body.
1237
1238 2009-09-26  Michael Matz  <matz@suse.de>
1239
1240         PR tree-optimization/41454
1241         * tree-ssa-dom (stmts_to_rescan): Remove variable.
1242         (tree_ssa_dominator_optimize): Don't allocate and free it.
1243         (dom_opt_leave_block): Don't iterate over it.
1244         (eliminate_redundant_computations): Don't return a value.
1245         (cprop_operand, cprop_into_stmt): Ditto.
1246         (optimize_stmt): Don't defer updating stmts.
1247
1248 2009-09-25  Dodji Seketeli  <dodji@redhat.com>
1249
1250         * dwarf2out.c (dwarf_tag_name, gen_generic_params_dies,
1251         generic_parameter_die, template_parameter_pack_die,
1252         gen_formal_parameter_die, gen_subprogram_die): Adjust after renaming
1253         DW_TAG_formal_parameter_pack and DW_TAG_template_parameter_pack into
1254         DW_TAG_GNU_formal_parameter_pack and DW_TAG_GNU_template_parameter_pack.
1255
1256 2009-09-25  Anatoly Sokolov  <aesok@post.ru>
1257
1258         * config/v850/v850.h (FUNCTION_VALUE): Remove.
1259         * config/v850/v850.c (v850_function_value): New function.
1260         (TARGET_FUNCTION_VALUE): Define.
1261
1262 2009-09-25  Jakub Jelinek  <jakub@redhat.com>
1263
1264         * tree-vect-stmts.c (vectorizable_call): Call
1265         mark_symbols_for_renaming after vect_finish_stmt_generation.
1266
1267         * dwarf2out.c (tls_mem_loc_descriptor): Pass 1 instead of 2
1268         to loc_descriptor_from_tree.
1269         (add_location_or_const_value_attribute): Pass 0 instead of 2
1270         for decl_by_reference_p decls.
1271
1272 2009-09-25  Richard Guenther  <rguenther@suse.de>
1273
1274         PR middle-end/41463
1275         * tree-dfa.c (get_ref_base_and_extent): Fix issue with trailing
1276         arrays again.
1277
1278 2009-09-25  Ben Elliston  <bje@au.ibm.com>
1279
1280         * doc/invoke.texi (RS/6000 and PowerPC Options): Add missing comma
1281         after `power7'.
1282
1283 2009-09-25  Alan Modra  <amodra@bigpond.net.au>
1284
1285         * config/rs6000/rs6000.md (load_toc_v4_PIC_3c): Correct POWER
1286         form of instruction.
1287
1288 2009-09-24  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1289
1290         PR middle-end/41435
1291         * fold-const.c (const_binop): Handle complex int division.
1292         * tree-complex.c (expand_complex_div_straight,
1293         expand_complex_div_wide): Update comments.
1294
1295 2009-09-24  DJ Delorie  <dj@redhat.com>
1296
1297         PR target/41456
1298         * config/m32c/m32c.h (REG_CLASS_CONTENTS): Add R13.
1299         (reg_class): Likewise.
1300         (REG_CLASS_NAMES): Likewise.
1301         * config/m32c/m32c.c (m32c_reg_class_from_constraint): Likewise.
1302
1303         * config/m32c/m32c.c (m32c_override_options): Disable -fivopts for
1304         M32C.
1305
1306 2009-09-24  Michael Meissner  <meissner@linux.vnet.ibm.com>
1307
1308         * config/rs6000/predicates.md (indexed_or_indirect_operand):
1309         Delete VSX load/store with update support.
1310         * config/rs6000/rs6000.c (rs6000_legitimate_address_p): Ditto.
1311         * config/rs6000/vsx.md (vsx_mov<mode>): Ditto.
1312         (vsx_movti): Ditto.
1313         (VSX_U): Delete.
1314         (VSbit): Ditto.
1315         (VStype_load_update): Ditto.
1316         (VStype_store_update): Ditto.
1317         (vsx_load<VSX_U:mode>_update_<P:mptrsize>): Ditto.
1318         (vsx_store<VSX_U:mode>_update_<P:mptrsize>): Ditto.
1319
1320         * config/rs6000/rs6000.h (enum rs6000_builtins): Delete VSX
1321         load/store with update builtins.
1322
1323 2009-09-24  Kai Tietz  <kai.tietz@onevision.com>
1324
1325         * libgcc2.c (L_trampoline): Prototype for getpagesize
1326         and mprotect in WINNT case.
1327
1328 2009-09-24  Anatoly Sokolov  <aesok@post.ru>
1329
1330         * config/rs6000/rs6000.h (FUNCTION_VALUE): Remove macro.
1331         * config/rs6000/rs6000-protos.h (rs6000_function_value): Remove.
1332         * config/rs6000/rs6000.c (rs6000_function_value): Make static, add
1333         'outgoing' argument.
1334         (TARGET_FUNCTION_VALUE): Define.
1335
1336 2009-09-24  Iain Sandoe  <iain.sandoe@sandoe-acoustics.co.uk>
1337
1338         * config/darwin.h (DWARF2_DEBUGGING_INFO): Define as 1.
1339
1340 2009-09-24  Iain Sandoe  <iain.sandoe@sandoe-acoustics.co.uk>
1341
1342         PR bootstrap/41405
1343         * common.opt: Initialize dwarf_strict to -1.
1344         * toplev.c (process_options): Catch unset dwarf_strict
1345         and set to 0 for all targets not overriding.
1346         * config/darwin.c (darwin_override_options): Catch unset
1347         dwarf_strict and override to 1.
1348
1349 2009-09-24  Jeff Law  <law@redhat.com>
1350
1351         * tree-into-ssa.c (rewrite_into_ssa): Free interesting_blocks.
1352
1353 2009-09-24  Richard Guenther  <rguenther@suse.de>
1354
1355         PR tree-optimization/36143
1356         PR tree-optimization/38747
1357         * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Only
1358         create VIEW_CONVERT_EXPRs for TBAA compatible accesses.
1359
1360 2009-09-24  Jakub Jelinek  <jakub@redhat.com>
1361
1362         PR bootstrap/41457
1363         * dwarf2out.c (add_const_value_attribute): For HIGH and CONST_FIXED,
1364         return false instead of gcc_unreachable ().  For CONST return the
1365         value returned by recursive call instead of always returning true.
1366         (tree_add_const_value_attribute): Return the value returned by
1367         add_const_value_attribute instead of always returning true if rtl
1368         is non-NULL.
1369
1370 2009-09-23  Justin Seyster  <jrseys@gmail.com>
1371
1372         * Makefile.in (PLUGIN_HEADERS): Include real.h.
1373
1374 2009-09-24  Jakub Jelinek  <jakub@redhat.com>
1375
1376         * cgraphunit.c (cgraph_lower_function): Revert last change.
1377         * targhooks.c (default_static_chain): Use !DECL_STATIC_CHAIN
1378         instead of DECL_NO_STATIC_CHAIN.
1379         * tree-cfg.c (verify_gimple_call): Likewise.
1380         * tree-nested.c (get_chain_decl, get_chain_field,
1381         convert_tramp_reference_op, convert_gimple_call): Likewise.
1382         (convert_all_function_calls): Likewise.  Always set or clear
1383         DECL_STATIC_CHAIN initially, for !n->outer clear it.
1384         (lower_nested_functions): Remove DECL_NO_STATIC_CHAIN checking code.
1385         * c-parser.c (c_parser_declaration_or_fndef): Set DECL_STATIC_CHAIN
1386         if nested.
1387         * print-tree.c (print_node): Handle DECL_STATIC_CHAIN instead of
1388         DECL_NO_STATIC_CHAIN.
1389         * config/i386/i386.c (ix86_static_chain): Use !DECL_STATIC_CHAIN
1390         instead of DECL_NO_STATIC_CHAIN.
1391         (ix86_function_regparm, find_drap_reg): Likewise.  Don't test
1392         decl_function_context.
1393         * varasm.c (initializer_constant_valid_p): Likewise.
1394         * tree.h (DECL_NO_STATIC_CHAIN): Renamed to ...
1395         (DECL_STATIC_CHAIN): ... this.
1396         * config/moxie/moxie.c (moxie_static_chain): Use !DECL_STATIC_CHAIN
1397         instead of DECL_NO_STATIC_CHAIN.
1398
1399 2009-09-23  Basile Starynkevitch  <basile@starynkevitch.net>
1400             Rafael Avila de Espindola  <espindola@google.com>
1401
1402         * gengtype.c (nb_plugin_files): Make it unsigned to match
1403         num_gt_files. Adjust other variables to avoid warnings.
1404         (main): Allocate an all zero lang_bitmap before each plugin file name
1405         to match regular file names.
1406
1407 2009-09-23  Richard Henderson  <rth@redhat.com>
1408
1409         * doc/tm.texi (STATIC_CHAIN, STATIC_CHAIN_INCOMING): Remove.
1410         (TARGET_STATIC_CHAIN): Mention that this hook must be used for
1411         static chain passed in memory.
1412         * system.h (STATIC_CHAIN, STATIC_CHAIN_INCOMING): Poison.
1413         * targhooks.c (default_static_chain): Don't handle STATIC_CHAIN,
1414         STATIC_CHAIN_INCOMING.  Issue a sorry if there's no
1415         STATIC_CHAIN_REGNUM defined.
1416
1417         * config/picochip/picochip-protos.h: s/class/klass/.
1418         * config/picochip/picochip.c (TARGET_STATIC_CHAIN): New.
1419         (picochip_static_chain): New.
1420         * config/picochip/picochip.h (STATIC_CHAIN): Remove.
1421         (STATIC_CHAIN_INCOMING): Remove.
1422
1423         * config/xtensa/xtensa.c (TARGET_STATIC_CHAIN): New.
1424         (xtensa_static_chain): New.
1425         * config/xtensa/xtensa.h (STATIC_CHAIN, STATIC_CHAIN_INCOMING): Remove.
1426
1427 2009-09-23  Anatoly Sokolov  <aesok@post.ru>
1428
1429         * config/pa/pa.h (FUNCTION_VALUE): Remove macro.
1430         * config/pa/pa-protos.h (function_value): Remove.
1431         * config/pa/pa.c (pa_function_value): Rename from function_value.
1432         Make static, add 'outgoing' argument.
1433         (TARGET_FUNCTION_VALUE): Define.
1434
1435 2009-09-23  Anatoly Sokolov  <aesok@post.ru>
1436
1437         * config/avr/avr.c (avr_regs_to_save): Use current_function_is_leaf
1438         instead of cfun->machine->is_leaf.
1439         * config/avr/avr.h (machine_function): Remove is_leaf field.
1440
1441 2009-09-23  Jakub Jelinek  <jakub@redhat.com>
1442
1443         PR debug/41439
1444         * dwarf2out.c (address_of_int_loc_descriptor): Don't emit
1445         DW_OP_piece after DW_OP_stack_value, adjust size calculations
1446         for it, when DW_OP_stack_value and DW_OP_implicit_value has
1447         the same size, prefer DW_OP_stack_value.
1448         (loc_descriptor, loc_list_for_address_of_addr_expr_of_indirect_ref,
1449         loc_list_from_tree): Don't emit DW_OP_piece after DW_OP_stack_value.
1450
1451 2009-09-23  Alexandre Oliva  <aoliva@redhat.com>
1452
1453         PR debug/41353
1454         * var-tracking.c (add_with_sets): Sort MO_VAL_LOC last among uses.
1455
1456 2009-09-23  Alexandre Oliva  <aoliva@redhat.com>
1457
1458         PR debug/41248
1459         * cfgexpand.c (convert_debug_memory_address): New.
1460         (expand_debug_expr): Convert base address and offset to the same
1461         mode.  Use it to convert addresses to other modes.  Accept
1462         ptr_mode addresses.
1463
1464 2009-09-23  Richard Guenther  <rguenther@suse.de>
1465
1466         * alias.c (ao_ref_from_mem): Correct for negative MEM_OFFSET
1467         produced for bigendian targets with promoted subregs.
1468
1469 2009-09-23  Richard Guenther  <rguenther@suse.de>
1470
1471         * value-prof.c (gimple_ic): Purge old EH edges only after building
1472         the new ones.
1473
1474 2009-09-23  Nick Clifton  <nickc@redhat.com>
1475
1476         * config/arc/arc.c (arc_trampoline_init): Fix typo.
1477
1478 2009-09-23  Jakub Jelinek  <jakub@redhat.com>
1479
1480         PR bootstrap/41405
1481         * doc/invoke.texi: Document -gstrict-dwarf and -gno-strict-dwarf.
1482
1483         PR bootstrap/41436
1484         * cgraphunit.c (cgraph_lower_function): Set DECL_NO_STATIC_CHAIN
1485         on non-nested functions.
1486
1487 2009-09-23  Jakub Jelinek  <jakub@redhat.com>
1488             Jan Hubicka  <jh@suse.cz>
1489
1490         * dwarf2out.c (loc_list_plus_const): Only define if
1491         DWARF2_DEBUGGING_INFO.
1492         (address_of_int_loc_descriptor): Likewise.
1493
1494         PR debug/41411
1495         * dwarf2out.c (mem_loc_descriptor): Handle HIGH.
1496
1497 2009-09-23  Uros Bizjak  <ubizjak@gmail.com>
1498
1499         PR c/39779
1500         * c-typeck.c (build_binary_op) <short_shift>: Check that integer
1501         constant is more than zero.
1502
1503 2009-09-23  Alan Modra  <amodra@bigpond.net.au>
1504
1505         PR target/40473
1506         * config/rs6000/rs6000.c (rs6000_output_function_prologue): Don't
1507         call final to emit non-scheduled prologue, instead insert at entry.
1508
1509 2009-09-22  Loren J. Rittle  <ljrittle@acm.org>
1510             Joseph S. Myers  <joseph@codesourcery.com>
1511
1512         * doc/install.texi (*-*-freebsd*): Add proper format codes.
1513
1514 2009-09-22  Basile Starynkevitch  <basile@starynkevitch.net>
1515             Rafael Avila de Espindola  <espindola@google.com>
1516
1517         * gengtype.c (is_file_equal): New function.
1518         (close_output_files): Use is_file_equal. Free of->buf.
1519
1520 2009-09-22  Basile Starynkevitch  <basile@starynkevitch.net>
1521             Rafael Avila de Espindola  <espindola@google.com>
1522
1523         * gengtype.c (write_types, write_local): Add the output_header
1524         argument. Update all callers.
1525
1526 2009-09-22  Dodji Seketeli  <dodji@redhat.com>
1527
1528         * dwarf2out.c (template_parameter_pack_die,
1529         gen_formal_parameter_pack_die ): New functions.
1530         (make_ith_pack_parameter_name): Remove this function.
1531         (dwarf_tag_name): Support printing DW_TAG_template_parameter_pack and
1532         DW_TAG_formal_parameter_pack.
1533         (gen_generic_params_dies): Represent each template parameter pack
1534         by a DW_TAG_template_parameter_pack DIE. Argument pack elements are
1535         represented by usual DW_TAG_template_*_parameter DIEs that are
1536         children of the DW_TAG_template_parameter_pack element DIE.
1537         (generic_parameter_die): This doesn't deal with parameter pack
1538         names anymore. Don't generate DW_AT_name for some DIEs, e.g. children
1539         of parameter pack DIEs.
1540         (gen_formal_parameter_die): Add a flag to not emit DW_AT_name
1541         in certain cases, e.g. for pack elements.
1542         (gen_formal_types_die, gen_decl_die): Adjust usage of
1543         gen_formal_parameter_die.
1544         (gen_subprogram_die): Represent each function parameter pack by a
1545         DW_TAG_formal_parameter_pack DIE. Arguments of of the pack are
1546         represented by usual DW_TAG_formal_parameter DIEs that are children
1547         of the DW_TAG_formal_parameter_pack DIE. Remove references to
1548         ____builtin_va_alist decls as no part of the compiler uses those
1549         anymore.
1550         * langhooks.h (struct lang_hooks_for_decls): Add
1551         function_parm_expanded_from_pack_p, get_generic_function_decl
1552         and function_parameter_pack_p hooks.  Fix comment for
1553         get_innermost_generic_parms hook.
1554         * langhooks-def.h (LANG_HOOKS_FUNCTION_PARAMETER_PACK_P,
1555         LANG_HOOKS_FUNCTION_PARM_EXPANDED_FROM_PACK_P ): Declare new hook
1556         macros and use them to initialize lang_hook.
1557
1558 2009-09-22  Richard Henderson  <rth@redhat.com>
1559
1560         * system.h (TRAMPOLINE_TEMPLATE, INITIALIZE_TRAMPOLINE): Poison.
1561         (TRAMPOLINE_ADJUST_ADDRESS): Poison.
1562         * target-def.h (TARGET_ASM_TRAMPOLINE_TEMPLATE): Don't conditionalize
1563         on TRAMPOLINE_TEMPLATE.
1564         (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Don't conditionalize on
1565         TRAMPOLINE_ADJUST_ADDRESS.
1566         * targhooks.c (default_asm_trampoline_template): Remove.
1567         (default_trampoline_adjust_address): Remove.
1568         (default_trampoline_init): Don't handle INITIALIZE_TRAMPOLINE.
1569         * targhooks.h: Update decls.
1570
1571 2009-09-22  Dave Korn  <dave.korn.cygwin@gmail.com>
1572
1573         * config/i386/cygming.h (TARGET_USE_JCR_SECTION): Enable.
1574         * config/i386/cygwin.h (LIBGCJ_SONAME): Define.
1575         * config/i386/mingw32.h (LIBGCJ_SONAME): Likewise.
1576
1577 2009-09-22  Alexandre Oliva  <aoliva@redhat.com>
1578
1579         PR debug/41295
1580         * reload1.c (reload): Reset debug insns with pseudos without
1581         equivalences.
1582
1583 2009-09-22  Janis Johnson  <janis187@us.ibm.com>
1584
1585         * config/i386/i386.c (ix86_scalar_mode_supported_p): Don't return
1586         unconditional true for decimal float modes.
1587         * config/rs6000/rs6000.c (rs6000_scalar_mode_supported_p): Ditto.
1588         * config/s390/s390.c (s390_scalar_mode_supported_p): Ditto.
1589
1590 2009-09-22  Loren J. Rittle  <ljrittle@acm.org>
1591
1592         * unwind-dw2-fde-glibc.c: Define and use USE_PT_GNU_EH_FRAME.
1593         Enable a new case for __FreeBSD__ >= 7.
1594         * crtstuff.c:  Define USE_PT_GNU_EH_FRAME for __FreeBSD__ >= 7.
1595         * config/t-freebsd: Define LIB2ADDEH and LIB2ADDEHDEP.
1596         * config/freebsd-spec.h: Conditionally define LINK_EH_SPEC
1597         and USE_LD_AS_NEEDED.
1598
1599         * doc/install.texi (*-*-freebsd*): Update target information.
1600
1601 2009-09-22  Richard Guenther  <rguenther@suse.de>
1602
1603         PR middle-end/41395
1604         * tree-dfa.c (get_ref_base_and_extent): Handle trailing
1605         arrays really properly.
1606
1607 2009-09-22  Richard Henderson  <rth@redhat.com>
1608
1609         PR target/41246
1610         * target.h (struct gcc_target): Add asm_out.trampoline_template,
1611         calls.static_chain, calls.trampoline_init,
1612         calls.trampoline_adjust_address.
1613         * target-def.h (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
1614         (TARGET_STATIC_CHAIN, TARGET_TRAMPOLINE_INIT): New.
1615         (TARGET_TRAMPOLINE_ADJUST_ADDRESS): New.
1616         * builtins.c (expand_builtin_setjmp_receiver): Use
1617         targetm.calls.static_chain; only clobber registers.
1618         (expand_builtin_init_trampoline): Use targetm.calls.trampoline_init;
1619         set up memory attributes properly for the trampoline block.
1620         (expand_builtin_adjust_trampoline): Use
1621         targetm.calls.trampoline_adjust_address.
1622         * calls.c (prepare_call_address): Add fndecl argument.  Use
1623         targetm.calls.static_chain.
1624         * df-scan.c (df_need_static_chain_reg): Remove.
1625         (df_get_entry_block_def_set): Use targetm.calls.static_chain;
1626         consolodate static chain handling.
1627         * doc/tm.texi: Document new hooks.
1628         * emit-rtl.c (static_chain_rtx, static_chain_incoming_rtx): Remove.
1629         (init_emit_regs): Don't initialize them.
1630         * expr.h (prepare_call_address): Update decl.
1631         * final.c (profile_function): Use targetm.calls.static_chain.
1632         * function.c (expand_function_start): Likewise.
1633         * rtl.h (static_chain_rtx, static_chain_incoming_rtx): Remove.
1634         * stmt.c (expand_nl_goto_receiver): Use targetm.calls.static_chain;
1635         only clobber registers.
1636         * targhooks.c (default_static_chain): New.
1637         (default_asm_trampoline_template, default_trampoline_init): New.
1638         (default_trampoline_adjust_address): New.
1639         * targhooks.h: Declare them.
1640         * varasm.c (assemble_trampoline_template): Use
1641         targetm.asm_out.trampoline_template.  Make the memory block const
1642         and set its size.
1643
1644         * config/alpha/alpha.c (alpha_trampoline_init): Rename from
1645         alpha_initialize_trampoline.  Make static.  Merge VMS parameter
1646         differences into the TARGET_ABI_OPEN_VMS code block.
1647         (TARGET_TRAMPOLINE_INIT): New.
1648         * config/alpha/alpha.h (TRAMPOLINE_TEMPLATE): Remove.
1649         (TRAMPOLINE_SECTION, INITIALIZE_TRAMPOLINE): Remove.
1650         * config/alpha/vms.h (TRAMPOLINE_SIZE, TRAMPOLINE_ALIGNMENT): Remove.
1651         (INITIALIZE_TRAMPOLINE): Remove.
1652
1653         * config/arc/arc.h (TRAMPOLINE_ALIGNMENT): New.
1654         (TRAMPOLINE_TEMPLATE): Merge with ...
1655         (INITIALIZE_TRAMPOLINE): ... this and move ...
1656         * config/arc/arc.c (arc_trampoline_init): ... here.
1657         (TARGET_TRAMPOLINE_INIT): New.
1658
1659         * config/arm/arm.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
1660         (TARGET_TRAMPOLINE_INIT, TARGET_TRAMPOLINE_ADJUST_ADDRESS): New.
1661         (arm_asm_trampoline_template): New.
1662         (arm_trampoline_init, arm_trampoline_adjust_address): New.
1663         * config/arm/arm.h (TRAMPOLINE_TEMPLATE, ARM_TRAMPOLINE_TEMPLATE,
1664         THUMB2_TRAMPOLINE_TEMPLATE, THUMB1_TRAMPOLINE_TEMPLATE): Move all
1665         code to arm_asm_trampoline_template.
1666         (TRAMPOLINE_ADJUST_ADDRESS): Move code to
1667         arm_trampoline_adjust_address.
1668         (INITIALIZE_TRAMPOLINE): Move code to arm_trampoline_init;
1669         adjust for target hook parameters.
1670
1671         * config/avr/avr.h (TRAMPOLINE_TEMPLATE, INITIALIZE_TRAMPOLINE):
1672         Remove.
1673
1674         * config/bfin/bfin-protos.h (initialize_trampoline): Remove.
1675         * config/bfin/bfin.c (bfin_asm_trampoline_template): New.
1676         (bfin_trampoline_init): Rename from initialize_trampoline;
1677         make static; update for target hook parameters.
1678         (TARGET_ASM_TRAMPOLINE_TEMPLATE, TARGET_TRAMPOLINE_INIT): New.
1679         * config/bfin/bfin.h (TRAMPOLINE_TEMPLATE): Move code to
1680         bfin_asm_trampoline_template.
1681         (INITIALIZE_TRAMPOLINE): Remove.
1682
1683         * config/cris/cris.c (TARGET_ASM_TRAMPOLINE_TEMPLATE,
1684         TARGET_TRAMPOLINE_INIT, cris_asm_trampoline_template,
1685         cris_trampoline_init): New.
1686         * config/cris/cris.h (TRAMPOLINE_TEMPLATE): Move code to
1687         cris_asm_trampoline_template.
1688         (INITIALIZE_TRAMPOLINE): Move code to cris_trampoline_init;
1689         adjust for target hook parameters.
1690
1691         * config/crx/crx.h (INITIALIZE_TRAMPOLINE): Remove.
1692
1693         * config/fr30/fr30.c (TARGET_ASM_TRAMPOLINE_TEMPLATE,
1694         TARGET_TRAMPOLINE_INIT, fr30_asm_trampoline_template,
1695         fr30_trampoline_init): New.
1696         * config/fr30/fr30.h (TRAMPOLINE_TEMPLATE): Move code to
1697         fr30_asm_trampoline_template.
1698         (INITIALIZE_TRAMPOLINE): Move code to fr30_trampoline_init;
1699         adjust for target hook parameters.
1700
1701         * config/frv/frv.c (TARGET_TRAMPOLINE_INIT): New.
1702         (frv_trampoline_init): Rename from frv_initialize_trampoline;
1703         make static, adjust arguments for TARGET_TRAMPOLINE_INIT hook.
1704         * config/frv/frv.h (INITIALIZE_TRAMPOLINE): Remove.
1705         * config/frv/frv-protos.h (frv_initialize_trampoline): Remove.
1706
1707         * config/h8300/h8300.c (h8300_trampoline_init): New.
1708         (TARGET_TRAMPOLINE_INIT): New.
1709         * config/h8300/h8300.h (INITIALIZE_TRAMPOLINE): Move code
1710         to h8300_trampoline_init and adjust for hook parameters.
1711
1712         * config/ia64/ia64-protos.h (ia64_initialize_trampoline): Remove.
1713         * config/ia64/ia64.c (TARGET_TRAMPOLINE_INIT): New.
1714         (ia64_trampoline_init): Rename from ia64_initialize_trampoline;
1715         make static; adjust for hook parameters.
1716         * config/ia64/ia64.h (INITIALIZE_TRAMPOLINE): Remove.
1717
1718         * config/iq2000/iq2000.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
1719         (TARGET_TRAMPOLINE_INIT): New.
1720         (iq2000_asm_trampoline_template, iq2000_trampoline_init): New.
1721         * config/iq2000/iq2000.h (TRAMPOLINE_TEMPLATE): Move code to
1722         iq2000_asm_trampoline_template.
1723         (INITIALIZE_TRAMPOLINE): Move code to iq2000_trampoline_init.
1724         (TRAMPOLINE_CODE_SIZE): New.
1725         (TRAMPOLINE_SIZE): Use it.
1726         (TRAMPOLINE_ALIGNMENT): Follow Pmode.
1727
1728         * config/m32c/m32c-protos.h (m32c_initialize_trampoline): Remove.
1729         * config/m32c/m32c.c (TARGET_TRAMPOLINE_INIT): New.
1730         (m32c_trampoline_init): Rename from m32c_initialize_trampoline;
1731         adjust for hook parameters.
1732         * config/m32c/m32c.h (INITIALIZE_TRAMPOLINE): Remove.
1733
1734         * config/m32r/m32r.c (TARGET_TRAMPOLINE_INIT): New.
1735         (m32r_trampoline_init): New.
1736         * config/m32r/m32r.h (INITIALIZE_TRAMPOLINE): Move code to
1737         m32r_trampoline_init.
1738
1739         * config/m68hc11/m68hc11.c (TARGET_TRAMPOLINE_INIT): New.
1740         (m68hc11_trampoline_init): Rename from m68hc11_initialize_trampoline;
1741         make static; update for hook parameters.
1742         * config/m68hc11/m68hc11-protos.h: Update.
1743         * config/m68hc11/m68hc11.h (INITIALIZE_TRAMPOLINE): Remove.
1744
1745         * config/mcore/mcore.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
1746         (TARGET_TRAMPOLINE_INIT): New.
1747         (mcore_function_value): Fix typo.
1748         (mcore_asm_trampoline_template, mcore_trampoline_init): New.
1749         * config/mcore/mcore.h (TRAMPOLINE_TEMPLATE): Move code
1750         to mcore_asm_trampoline_template.
1751         (INITIALIZE_TRAMPOLINE): Move code to mcore_trampoline_init.
1752
1753         * config/mep/mep.h (INITIALIZE_TRAMPOLINE): Remove.
1754         * config/mep/mep.c (TARGET_TRAMPOLINE_INIT): New.
1755         (mep_trampoline_init): Rename from mep_init_trampoline; make static;
1756         update for hook parameters.
1757         * config/mep/mep-protos.h (mep_init_trampoline): Remove.
1758
1759         * config/mips/mips.c (TARGET_ASM_TRAMPOLINE_TEMPLATE,
1760         mips_asm_trampoline_template, TARGET_TRAMPOLINE_INIT,
1761         mips_trampoline_init): New.
1762         * config/mips/mips.h (TRAMPOLINE_TEMPLATE): Move code to
1763         mips_asm_trampoline_template.
1764         (INITIALIZE_TRAMPOLINE): Move code to mips_trampoline_init;
1765         update for hook parameters.
1766
1767         * gcc/config/mmix/mmix.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
1768         (TARGET_TRAMPOLINE_INIT): New.
1769         (mmix_trampoline_size): Remove.
1770         (mmix_asm_trampoline_template): Rename from mmix_trampoline_template;
1771         make static.  Remove out-of-date tetra vs octa comment.
1772         (mmix_trampoline_init): Rename from mmix_initialize_trampoline;
1773         make static; update for hook parameters.
1774         * config/mmix/mmix.h (TRAMPOLINE_TEMPLATE): Remove.
1775         (INITIALIZE_TRAMPOLINE): Remove.
1776         (TRAMPOLINE_SIZE): Use a constant instead of mmix_trampoline_size.
1777         (TRAMPOLINE_ALIGNMENT): New.
1778         * gcc/config/mmix/mmix-protos.h: Update.
1779
1780         * config/mn10300/mn10300.c (TARGET_ASM_TRAMPOLINE_TEMPLATE,
1781         mn10300_asm_trampoline_template, TARGET_TRAMPOLINE_INIT,
1782         mn10300_trampoline_init): New.
1783         * config/mn10300/mn10300.h (TRAMPOLINE_TEMPLATE): Move code to
1784         mn10300_asm_trampoline_template.
1785         (INITIALIZE_TRAMPOLINE): Move code to mn10300_trampoline_init.
1786
1787         * config/moxie/moxie.c (moxie_static_chain,
1788         moxie_asm_trampoline_template, moxie_trampoline_init,
1789         TARGET_STATIC_CHAIN, TARGET_ASM_TRAMPOLINE_TEMPLATE,
1790         TARGET_TRAMPOLINE_INIT): New.
1791         * config/moxie/moxie.h (INITIALIZE_TRAMPOLINE): Move code to
1792         moxie_trampoline_init.
1793         (TRAMPOLINE_TEMPLATE): Move code to moxie_asm_trampoline_template.
1794         (STATIC_CHAIN, STATIC_CHAIN_INCOMING): Remove.
1795
1796         * gcc/config/pa/pa.c (TARGET_ASM_TRAMPOLINE_TEMPLATE,
1797         pa_asm_trampoline_template, TARGET_TRAMPOLINE_INIT,
1798         pa_trampoline_init, TARGET_TRAMPOLINE_ADJUST_ADDRESS,
1799         pa_trampoline_adjust_address): New.
1800         * config/pa/pa.h (TRAMPOLINE_TEMPLATE): Move code to
1801         pa_asm_trampoline_template.
1802         (TRAMPOLINE_ALIGNMENT): New.
1803         (TRAMPOLINE_CODE_SIZE): Move to pa.c.
1804         (INITIALIZE_TRAMPOLINE): Move code to pa_trampoline_init;
1805         adjust for hook parameters.
1806         (TRAMPOLINE_ADJUST_ADDRESS): Move code to pa_trampoline_adjust_address.
1807
1808         * config/pdp11/pdp11.c (pdp11_trampoline_init): New.
1809         (TARGET_TRAMPOLINE_INIT): New.
1810         * config/pdp11/pdp11.h (TRAMPOLINE_TEMPLATE): Remove.
1811         (INITIALIZE_TRAMPOLINE): Move code to pdp11_trampoline_init.
1812
1813         * config/picochip/picochip.h (INITIALIZE_TRAMPOLINE): Remove.
1814
1815         * config/rs6000/rs6000-protos.h (rs6000_initialize_trampoline): Remove.
1816         * config/rs6000/rs6000.c (TARGET_TRAMPOLINE_INIT): New.
1817         (rs6000_trampoline_init): Rename from rs6000_initialize_trampoline;
1818         make static; adjust parameters for the hook.
1819         * config/rs6000/rs6000.h (INITIALIZE_TRAMPOLINE): Remove.
1820
1821         * config/s390/s390.c (s390_asm_trampoline_template): Rename from
1822         s390_trampoline_template; make static.
1823         (s390_trampoline_init): Rename from s390_initialize_trampoline;
1824         make static; adjust for target hook.
1825         (TARGET_ASM_TRAMPOLINE_TEMPLATE, TARGET_TRAMPOLINE_INIT): New.
1826         * config/s390/s390-protos.h: Remove trampoline decls.
1827         * config/s390/s390.h (INITIALIZE_TRAMPOLINE): Remove.
1828         (TRAMPOLINE_TEMPLATE): Remove.
1829         (TRAMPOLINE_ALIGNMENT): New.
1830
1831         * config/score/score-protos.h (score_initialize_trampoline): Remove.
1832         * config/score/score.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
1833         (TARGET_TRAMPOLINE_INIT): New.
1834         (score_asm_trampoline_template): New.
1835         (score_trampoline_init): Rename from score_initialize_trampoline;
1836         make static; adjust for hook parameters.
1837         * config/score/score.h (TRAMPOLINE_TEMPLATE): Move code to
1838         score[37]_asm_trampoline_template.
1839         (INITIALIZE_TRAMPOLINE): Remove.
1840         * config/score/score3.c (score3_asm_trampoline_template): New.
1841         (score3_trampoline_init): Rename from score3_initialize_trampoline;
1842         adjust for target hook.
1843         * config/score/score7.c (score7_asm_trampoline_template): New.
1844         (score7_trampoline_init): Rename from score7_initialize_trampoline;
1845         adjust for target hook.
1846         * config/score/score3.h, config/score/score7.h: Update.
1847
1848         * config/sh/sh-protos.h (sh_initialize_trampoline): Remove.
1849         * config/sh/sh.c (TARGET_TRAMPOLINE_INIT): New.
1850         (TARGET_TRAMPOLINE_ADJUST_ADDRESS): New.
1851         (sh_trampoline_init): Rename from sh_initialize_trampoline;
1852         make static; adjust for target hook parameters.
1853         (sh_trampoline_adjust_address): New.
1854         * config/sh/sh.h (INITIALIZE_TRAMPOLINE): New.
1855         (TRAMPOLINE_ADJUST_ADDRESS): Move code to sh_trampoline_adjust_address.
1856
1857         * config/sparc/sparc.c (TARGET_TRAMPOLINE_INIT): New.
1858         (sparc32_initialize_trampoline): Rename from
1859         sparc_initialize_trampoline; make static; replace tramp parameter
1860         with m_tramp and update memory accesses.
1861         (sparc64_initialize_trampoline): Similarly.
1862         (sparc_trampoline_init): New.
1863         * config/sparc/sparc-protos.h: Remove trampoline decls.
1864         * config/sparc/sparc.h (INITIALIZE_TRAMPOLINE): Remove.
1865         * config/sparc/sparc.md (nonlocal_goto): Don't use static_chain_rtx.
1866
1867         * config/spu/spu.c (TARGET_TRAMPOLINE_INIT): New.
1868         (array_to_constant): Make ARR parameter const.
1869         (spu_trampoline_init): Rename from spu_initialize_trampoline;
1870         make static; update for hook parameters.
1871         * config/spu/spu-protos.h: Update decls.
1872         * config/spu/spu.h (INITIALIZE_TRAMPOLINE): Remove.
1873
1874         * config/stormy16/stormy16.c (xstormy16_trampoline_init): Rename
1875         from xstormy16_initialize_trampoline; make static; update for
1876         hook parameters.
1877         (TARGET_TRAMPOLINE_INIT): New.
1878         * config/stormy16/stormy16.h (INITIALIZE_TRAMPOLINE): Remove.
1879
1880         * config/v850/v850.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
1881         (TARGET_TRAMPOLINE_INIT): New.
1882         (v850_can_eliminate): Make static.
1883         (v850_asm_trampoline_template, v850_trampoline_init): New.
1884         * config/v850/v850.h (TRAMPOLINE_TEMPLATE): Move code to
1885         v850_asm_trampoline_template.
1886         (INITIALIZE_TRAMPOLINE): Move code to v850_trampoline_init
1887         and adjust for target hook parameters.
1888
1889         * config/vax/vax.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
1890         (TARGET_TRAMPOLINE_INIT): New.
1891         (vax_asm_trampoline_template, vax_trampoline_init): New.
1892         * config/vax/vax.h (TRAMPOLINE_TEMPLATE): Move code to
1893         vax_asm_trampoline_template.
1894         (INITIALIZE_TRAMPOLINE): Move code to vax_trampoline_init.
1895
1896         * config/xtensa/xtensa.c (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
1897         (TARGET_TRAMPOLINE_INIT): New.
1898         (xtensa_asm_trampoline_template): Rename from
1899         xtensa_trampoline_template; make static.
1900         (xtensa_trampoline_init): Rename from xtensa_initialize_trampoline;
1901         make static; update for hook parameters.
1902         * config/xtensa/xtensa-protos.h: Remove trampoline decls.
1903         * config/xtensa/xtensa.h (TRAMPOLINE_TEMPLATE): Remove.
1904         (INITIALIZE_TRAMPOLINE): Remove.
1905
1906         * config/i386/i386.c (ix86_function_regparm): Do not issue an
1907         error for nested functions with regparm=3.
1908         (ix86_compute_frame_layout): Adjust frame pointer offset for
1909         ix86_static_chain_on_stack.
1910         (ix86_expand_prologue): Handle ix86_static_chain_on_stack.
1911         (ix86_emit_restore_reg_using_pop): Increment ix86_cfa_state->offset,
1912         don't reset to UNITS_PER_WORD.
1913         (ix86_emit_leave): Adjust ix86_cfa_state.
1914         (ix86_expand_epilogue): Handle ix86_static_chain_on_stack.
1915         (ix86_static_chain): New.
1916         (ix86_trampoline_init): Rename from x86_initialize_trampoline;
1917         make static; update for target hook parameters; use ix86_static_chain.
1918         (TARGET_STATIC_CHAIN, TARGET_TRAMPOLINE_INIT): New.
1919         * config/i386/i386.h (STATIC_CHAIN_REGNUM): Remove.
1920         (INITIALIZE_TRAMPOLINE): Remove.
1921         (TRAMPOLINE_SIZE): Use 24 for 64-bit.
1922         (struct machine_function): Use BOOL_BITFIELD; rearrange bitfields
1923         to the end.  Add static_chain_on_stack.
1924         (ix86_static_chain_on_stack): New.
1925
1926         * config/m68k/m68k.c (TARGET_TRAMPOLINE_INIT): New.
1927         (m68k_output_mi_thunk): Don't use static_chain_rtx.
1928         (m68k_trampoline_init): New.
1929         * config/m68k/m68k.h (INITIALIZE_TRAMPOLINE): Move code to
1930         m68k_trampoline_init and adjust for hook parameters.
1931         * config/m68k/netbsd-elf.h (TRAMPOLINE_TEMPLATE): Remove.
1932         (TRAMPOLINE_SIZE, INITIALIZE_TRAMPOLINE): Remove.
1933
1934 2009-09-22  Jakub Jelinek  <jakub@redhat.com>
1935
1936         * config/rs6000/rs6000.c (bdesc_2arg): Fix CODE_FOR_vector_gt* codes
1937         for __builtin_altivec_vcmpgt{sb,uh,sh,uw}.
1938
1939         * reload1.c (reload): Call wrap_constant when substituting
1940         reg for equiv inside of DEBUG_INSNs.
1941
1942         PR bootstrap/41405
1943         * dwarf2out.c (base_type_die, record_type_tag, gen_subprogram_die,
1944         add_call_src_coords_attributes, add_high_low_attributes,
1945         gen_compile_unit_die, gen_type_die_with_usage force_decl_die,
1946         gen_decl_die, dwarf2out_imported_module_or_decl_1, dwarf2out_finish,
1947         dwarf2out_imported_module_or_decl): Avoid using DWARF3 additions
1948         when -gdwarf-2 -gstrict-dwarf.
1949         (loc_list_from_tree): Likewise.  Avoid using DWARF4 additions when
1950         -gdwarf-[23] -gstrict-dwarf.
1951         (address_of_int_loc_descriptor, loc_descriptor,
1952         loc_list_for_address_of_addr_expr_of_indirect_ref): Avoid using
1953         DWARF4 additions when -gdwarf-[23] -gstrict-dwarf.
1954         * common.opt (gno-strict-dwarf, gstrict-dwarf): New options.
1955
1956 2009-09-22  Richard Guenther  <rguenther@suse.de>
1957
1958         PR tree-optimization/41428
1959         * tree-ssa-ccp.c (ccp_fold_stmt): New function.
1960         (ccp_finalize): Pass it to substitute_and_fold.
1961
1962 2009-09-22  Richard Guenther  <rguenther@suse.de>
1963
1964         * tree-ssa-propagate.h (ssa_prop_fold_stmt_fn): Declare.
1965         (substitute_and_fold): Adjust prototype.
1966         * tree-vrp.c (vrp_evaluate_conditional): Make static.
1967         (simplify_stmt_using_ranges): Likewise.
1968         (fold_predicate_in): Move here from tree-ssa-propagate.c.
1969         (vrp_fold_stmt): New function.
1970         (vrp_finalize): Pass it to substitute_and_fold.
1971         * tree-flow.h (vrp_evaluate_conditional): Remove.
1972         (simplify_stmt_using_ranges): Likewise.
1973         * tree-ssa-ccp.c (ccp_finalize): Adjust call to substitute_and_fold.
1974         * tree-ssa-copy.c (fini_copy_prop): Likewise.
1975         * tree-ssa-propagate.c (struct prop_stats_d): Rename num_pred_folded
1976         member.
1977         (fold_predicate_in): Move to tree-vrp.c.
1978         (substitute_and_fold): Use the callback instead of calling into
1979         tree-vrp.c functions directly.
1980
1981 2009-09-22  Jakub Jelinek  <jakub@redhat.com>
1982
1983         * dwarf2out.c (address_of_int_loc_descriptor): Avoid signed/unsigned
1984         comparison warning on rs6000.
1985
1986         PR middle-end/41429
1987         * tree-cfg.c (remove_useless_stmts_tc): Call gsi_next (gsi) even for
1988         GIMPLE_EH_MUST_NOT_THROW cleanup.
1989         (verify_types_in_gimple_stmt): Handle GIMPLE_EH_MUST_NOT_THROW.
1990
1991 2009-09-22  Jack Howarth  <howarth@bromo.med.uc.edu>
1992
1993         PR middle-end/41260
1994         * gcc/config.gcc: Use darwin9.h and darwin10.h on darwin10 and later.
1995         * gcc/config/darwin10.h: Add file to pass -no_compact_unwind on
1996         LIB_SPEC for darwin10 and later since it always uses the unwinder in
1997         libSystem which is derived from the gcc 4.2.1 unwinder.
1998
1999 2009-09-22  Dave Korn  <dave.korn.cygwin@gmail.com>
2000
2001         PR middle-end/41357
2002         * varasm.c (default_encode_section_info): Copy TLS model into
2003         sym_ref flags regardless of backend support for TLS, for all
2004         model types except TLS_MODEL_EMULATED.
2005
2006 2009-09-22  Dave Korn  <dave.korn.cygwin@gmail.com>
2007
2008         PR bootstrap/41404
2009         * dwarf2out.c (mem_loc_descriptor): Punt on CONST_STRING until
2010         we can handle it correctly.
2011
2012 2009-09-21  Gerald Pfeifer  <gerald@pfeifer.com>
2013
2014         * doc/install.texi (os2): Remove section.
2015
2016 2009-09-21  Gerald Pfeifer  <gerald@pfeifer.com>
2017
2018         * doc/standards.texi (Objective-C): Adjust two URLs.
2019
2020 2009-09-21  Giuseppe Scrivano <gscrivano@gnu.org>
2021
2022         * tree-tailcall.c (process_assignment): Don't check if a
2023         multiplication or an addition are already present.
2024         (find_tail_calls): Combine multiple additions and multiplications.
2025         (adjust_accumulator_values): Emit accumulators.
2026
2027 2009-09-21  Kai Tietz  <kai.tietz@onevision.com>
2028
2029         * config/i386/i386.c (ix86_expand_epilogue): Adjust offset for
2030         xmm register restore.
2031
2032 2009-09-21  Jan Hubicka  <jh@suse.cz>
2033
2034         * dwarf2out.c (decl_loc_table_eq): Allow decl_loc_table to be NULL.
2035         (dwarf2out_abstract_function): NULLify decl_loc_table at begginig and
2036         restore at the end.
2037
2038 2009-09-21  Eric Botcazou  <ebotcazou@adacore.com>
2039
2040         * stor-layout.c (layout_type): Remove obsolete code.
2041
2042 2009-09-20  H.J. Lu  <hongjiu.lu@intel.com>
2043
2044         PR middle-end/41395
2045         * opts.c (decode_options): Don't turn on flag_ipa_sra for opt2.
2046
2047 2009-09-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2048
2049         PR middle-end/30789
2050         * builtins.c (do_mpc_arg2): Accept DO_NONFINITE parameter.
2051         (do_mpc_ckconv): Accept FORCE_CONVERT parameter.
2052         (fold_builtin_2, do_mpc_arg1): Update accordingly.
2053         * fold-const.c (const_binop): Likewise.
2054         * real.h (do_mpc_arg2): Update prototype.
2055
2056 2009-09-20  Jan Hubicka  <jh@suse.cz>
2057
2058         * dwarf2out.c (add_const_value_attribute): Return true if successful.
2059         (add_location_or_const_value_attribute): Rewrite using
2060         loc_list_from_tree.
2061         (tree_add_const_value_attribute): Return true if successful.
2062         (tree_add_const_value_attribute_for_decl): Likewise.
2063
2064         * dwarf2out.c (address_of_int_loc_descriptor): Break out from ...
2065         (loc_descriptor): ... here;
2066         (loc_list_for_address_of_addr_expr_of_indirect_ref): New function.
2067         (cst_pool_loc_descr): Break out from ...; do not reffer constant
2068         pool items that was not marked for output.
2069         (loc_list_from_tree): ... here; handle special cases of ADDR_EXPR;
2070         (loc_list_for_address_of_addr_expr_of_indirect_ref): New function.
2071         (loc_list_for_address_of_addr_expr_of_indirect_ref): New function.
2072         handle ALIGN_INDIRECT_REF, MISALIGNED_INDIRECT_REF, REALPART_EXPR,
2073         IMAGPART_EXPR; handle address of INTEGER_CST; improve handling of
2074         CONSTRUCTOR; handle REAL_CST, STRING_CST, COMPLEX_CST; use
2075         DW_OP_stack_value to get address of items that are not available
2076         as addresses.
2077         (dw_loc_list): Handle single element lists correctly.
2078
2079 2009-09-20  Kai Tietz  <kai.tietz@onevision.com>
2080             Pascal Obry  <obry@adacore.com>
2081
2082         * unwind-dw2-fde.c (classify_object_over_fdes):
2083         Cast the constant 1 to _Unwind_Ptr.
2084         (add_fdes): Likewise.
2085         (linear_search_fdes): Likewise.
2086
2087 2009-09-20  Eric Botcazou  <ebotcazou@adacore.com>
2088
2089         * stor-layout.c (set_sizetype): Avoid useless type copy.
2090
2091 2009-09-20  Richard Sandiford  <rdsandiford@googlemail.com>
2092
2093         * configure.ac (gcc_cv_ld_mips_personality_relaxation): New
2094         feature check.
2095         (HAVE_LD_PERSONALITY_RELAXATION): New macro definition.
2096         * configure, config.in: Regenerate.
2097         * dwarf2asm.c (eh_data_format_name): Handle DW_EH_PE_indirect |
2098         DW_EH_PE_absptr.
2099         * config/mips/mips.h (TARGET_WRITABLE_EH_FRAME): New macro.
2100         (ASM_PREFERRED_EH_DATA_FORMAT): Define.  Use MIPS_EH_INDIRECT
2101         for global data if the output could be used in a shared library.
2102         * config/mips/mips.c (mips_override_options): Set flag_dwarf2_cfi_asm
2103         to 0 if TARGET_WRITABLE_EH_FRAME.
2104
2105 2009-09-20  Paolo Bonzini <bonzini@gnu.org>
2106
2107         PR rtl-optimization/39886
2108         * combine.c (update_cfg_for_uncondjump): Set EDGE_FALLTHRU
2109         just when insn is equal to BB_END (bb).
2110
2111 2009-09-19  Adam Nemet  <anemet@caviumnetworks.com>
2112
2113         * config/mips/mips.opt (mrelax-pic-calls): New option.
2114         * config/mips/mips.c (mips_strip_unspec_address): Move it up in
2115         the file.
2116         (mips_unspec_call): Change "unspec_call" expander into this.
2117         (mips_strip_unspec_call): New function.
2118         (mips_got_load): Call mips_unspec_call instead of
2119         gen_unspec_call<mode>.
2120         (mips16_build_call_stub): Fix comment for fp_code.  Adjust call to
2121         MIPS_CALL.
2122         (mips_cfg_in_reorg): New function.
2123         (mips16_lay_out_constants): Use it to decide whether to call
2124         CFG-aware insn splitting.
2125         (r10k_insert_cache_barriers): Move CFG set-up code from here to
2126         mips_reorg.  Move DF set-up code from here ...
2127         (mips_df_reorg): ... to here.  Call r10k_insert_cache_barriers
2128         from here.
2129         (mips_reorg): Call mips_df_reorg instead of
2130         r10k_insert_cache_barriers.  Move CFG set-up code here from
2131         r10k_insert_cache_barriers.
2132         (mips_call_expr_from_insn): New function.
2133         (mips_pic_call_symbol_from_set): Likewise.
2134         (mips_find_pic_call_symbol): Likewise.
2135         (mips_annotate_pic_call_expr): Likewise.
2136         (mips_get_pic_call_symbol): Likewise.
2137         (mips_annotate_pic_calls): Likewise.
2138         (mips_override_options): Disable -mrelax-pic-calls unless PIC
2139         calls are used.
2140         (mips_set_mips16_mode): Disable -mrelax-pic-calls for MIPS16.
2141         * config/mips/mips-protos.h (mips_get_pic_call_symbol): Declare it.
2142         * config/mips/mips.h (MIPS_CALL): Use it to print the .reloc
2143         directive.
2144         * config/mips/mips.md (UNSPEC_CALL_ATTR): New unspec.
2145         (unspec_call<mode>): Remove it.
2146         (sibcall_internal, sibcall_value_internal,
2147         sibcall_value_multiple_internal, call_internal, call_split,
2148         call_value_internal, call_value_split,
2149         call_value_multiple_internal, call_value_multiple_split): Pass
2150         SIZE_OPNO to MIPS_CALL.
2151         (call_internal_direct, call_direct_split,
2152         call_value_internal_direct, call_value_direct_split): Pass -1 as
2153         SIZE_OPNO to MIPS_CALL.
2154         * configure.ac <mips*-*-*>: Add test for .reloc R_MIPS_JALR.
2155         * configure: Regenerate.
2156         * doc/invoke.texi (Option Summary): Add -mrelax-pic-calls
2157         and -mno-relax-pic-calls.
2158         (MIPS Options): Document -mrelax-pic-calls and -mno-relax-pic-calls.
2159
2160 2009-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2161
2162         PR bootstrap/35619
2163         * Makefile.in (stmp-fixinc): Ensure `include-fixed' is created
2164         in the directory this rule is called from, rather than the
2165         toplevel 'gcc' directory, to fix in-tree build.
2166
2167 2009-09-19  Chris Demetriou  <cgd@google.com>
2168
2169         PR preprocessor/28435:
2170         * c-opts.c (c_common_handle_option): For -MD and -MMD, indicate
2171         to cpplib that the preprocessor output is needed.
2172
2173 2009-09-19  Jakub Jelinek  <jakub@redhat.com>
2174
2175         * config/rs6000/rs6000.md (*save_gpregs_<mode>, *save_fpregs_<mode>,
2176         *restore_gpregs_<mode>, *return_and_restore_gpregs_<mode>,
2177         *return_and_restore_fpregs_<mode>,
2178         *return_and_restore_fpregs_aix_<mode>): Remove 'z' operand modifier.
2179
2180         PR bootstrap/41397
2181         * dwarf2out.c (mem_loc_descriptor) <case SUBREG>: Recurse
2182         instead of assuming it has always a REG inside of it.
2183
2184 2009-09-18  Gerald Pfeifer  <gerald@pfeifer.com>
2185
2186         * config/freebsd.h: Update comment on types.
2187         (WINT_TYPE): Define.
2188
2189 2009-09-18  Jason Merrill  <jason@redhat.com>
2190
2191         * c.opt: Add -fno-deduce-init-list.
2192
2193 2009-09-18  Neil Vachharajani  <nvachhar@google.com>
2194
2195         * value-prof.c (interesting_stringop_to_profile_p): Added output
2196         argument to indicate which parameter is the size parameter.
2197         * value-prof.c (gimple_stringop_fixed_value): Use
2198         INTERESTING_STRINGOP_TO_PROFILE_P to find size argument.
2199         * value-prof.c (gimple_stringops_transform): Update call sites to
2200         INTERESTING_STRINGOP_TO_PROFILE_P to reflect parameter change.
2201
2202 2009-09-18  Uros Bizjak  <ubizjak@gmail.com>
2203
2204         PR target/38288
2205         From David Binderman <dcb314@hotmail.com>:
2206         * gcc/config/i386/i386.c (ix86_function_regparm): Remove useless
2207         local variable f.  Remove stale comments.
2208         (ix86_compute_frame_layout): Remove useless local variable total_size.
2209         Remove #if 0'd code.
2210         (legitimate_address_p): Remove useless local variables
2211         reason_rtx and reason.
2212         (ix86_split_copysign_const): Remove useless local variable op1.
2213         (scale_counter): Remove useless local variable piece_size_mask.
2214
2215 2009-09-18  Jakub Jelinek  <jakub@redhat.com>
2216
2217         * stmt.c (expand_asm_operands): Set REG_ATTRS on the temporary from
2218         output decl.
2219
2220 2009-09-17  Michael Haubenwallner  <michael.haubenwallner@salomon.at>
2221
2222         PR target/40913
2223         * config/pa/t-hpux-shlib: Set soname in libgcc_s.sl.
2224
2225 2009-09-17  Jakub Jelinek  <jakub@redhat.com>
2226
2227         * c-decl.c (finish_struct): Adjust DECL_SOURCE_LOCATION of
2228         TYPE_STUB_DECL.
2229
2230 2009-09-17  Alexandre Oliva  <aoliva@redhat.com>
2231
2232         * dwarf2out.c (loc_descriptor): Emit DW_OP_stack_value and
2233         DW_OP_implicit_value even without dwarf_version 4.
2234
2235 2009-09-17  Jan Hubicka  <jh@suse.cz>
2236
2237         * dwarf2out.c: Include tree-pass.h and gimple.h.
2238         (loc_list_plus_const): New function.
2239         (loc_descriptor_from_tree_1): Rename to ...
2240         (loc_descriptor_from_tree): ... remove original.
2241         (loc_list_from_tree): New function.
2242         (add_AT_location_description): Accept location list.
2243         (tls_mem_loc_descriptor): Update call of loc_descriptor_from_tree.
2244         (concatn_mem_loc_descriptor): Remove.
2245         (mem_loc_descriptor): Handle CONCAT/CONCATN and VAR_LOCATION by
2246         returning NULL.
2247         (secname_for_decl): Move up.
2248         (hidden_reference_p): New function; break out from ...
2249         (loc_by_refernece): ... here; move up.
2250         (dw_loc_list): New function.
2251         (single_element_loc_list): New function.
2252         (single_element_loc_list_p): New function.
2253         (add_loc_descr_to_each): New function.
2254         (add_loc_list): New function.
2255         (loc_descr_from_tree): Make wraper of loc_list_from_tree.
2256         (loc_list_from_tree): Reroganized from loc_descr_from_tree;
2257         add diagnostics why expansion failed.
2258         (add_location_or_const_value_attribute): Support location lists.
2259         (add_bound_info): Likewise.
2260         (descr_info_loc): Update call of loc_descriptor_from_tree.
2261         (gen_variable_die): Work on location lists.
2262         * final.c (pass_final): Add dump file.
2263         * Makefile.in (dwarf2out.o): Add new dependencies.
2264
2265 2009-09-17  Janis Johnson  <janis187@us.ibm.com>
2266
2267         PR c/41049
2268         * real.c decimal_from_integer, decimal_integer_string): New.
2269         (real_from_integer): Use them as special case for decimal float.
2270         * config/dfp-bit.c (_si_to_sd, _usi_to_sd): Use default rounding.
2271         (_di_to_sd, _di_to_dd, _di_to_td, _udi_to_sd, _udi_to_dd, _udi_to_td):
2272         Do not append zero after the decimal point in string to convert.
2273
2274 2009-09-17  Alexander Monakov  <amonakov@ispras.ru>
2275
2276         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
2277         for ARRAY_REFs.  Use array_ref_{low,up}_bound to determine bounds.
2278
2279 2009-09-17  Martin Jambor  <mjambor@suse.cz>
2280
2281         * common.opt (fipa-sra): New switch.
2282         * opts.c (decode_options): Turn flag_ipa_sra on for opt2.
2283         * timevar.def (TV_IPA_SRA): New timevar.
2284         * params.def (ipa-sra-ptr-growth-factor): New parameter.
2285         * doc/invoke.texi: Document -fipa-sra and ipa-sra-ptr-growth-factor.
2286         * tree-sra.c: Include cgraph.c.
2287         (enum sra_mode): Added SRA_MODE_EARLY_IPA.
2288         (struct access): Added fields stmt, grp_maybe_modified, grp_scalar_ptr
2289         and grp_not_necessarilly_dereferenced.
2290         (func_param_count): New variable.
2291         (encountered_apply_args): New variable.
2292         (bb_dereferences): New variable.
2293         (final_bbs): New variable.
2294         (no_accesses_representant): New variable.
2295         (no_accesses_p): New function.
2296         (dump_access): Dump the new fields.
2297         (sra_initialize): Set encountered_apply_args to false.
2298         (get_ssa_base_param): New function.
2299         (mark_parm_dereference): New function.
2300         (create_access): Caring for INIDRECT_REFs and different handling of
2301         varialble length accesses in early IPA SRA.  Store the stmt - a new
2302         parameter - to the new access.
2303         (build_access_from_expr_1): New parameter stmt, passed to
2304         create_access.  Handle INDIRECT_REFs.
2305         (build_access_from_expr): Pass the current statement to
2306         build_access_from_expr_1.
2307         (disqualify_ops_if_throwing_stmt): Trigger only in intraprocedural
2308         passes.
2309         (build_accesses_from_assign): Pass the current statement to
2310         build_access_from_expr_1.  Do not create assign links in IPA-SRA.
2311         (scan_function): Call handle_ssa_defs on phi nodes.  Set bits in
2312         final_bbs when necessary.  Check for calls to __builtin_apply_args.
2313         Fixup EH info if anythng was changed.
2314         (is_unused_scalar_param): New function.
2315         (ptr_parm_has_direct_uses): New function.
2316         (find_param_candidates): New function.
2317         (mark_maybe_modified): New function.
2318         (analyze_modified_params): New function.
2319         (propagate_dereference_distances): New function.
2320         (dump_dereferences_table): New function.
2321         (analyze_caller_dereference_legality): New function.
2322         (unmodified_by_ref_scalar_representative): New function.
2323         (splice_param_accesses): New function.
2324         (decide_one_param_reduction): New function.
2325         (enum ipa_splicing_result): New type.
2326         (splice_all_param_accesses): New function.
2327         (get_param_index): New function.
2328         (turn_representatives_into_adjustments): New function.
2329         (analyze_all_param_acesses): New function.
2330         (get_replaced_param_substitute): New function.
2331         (get_adjustment_for_base): New function.
2332         (replace_removed_params_ssa_names): New function.
2333         (sra_ipa_reset_debug_stmts): New function.
2334         (sra_ipa_modify_expr): New function.
2335         (sra_ipa_modify_assign): New function.
2336         (convert_callers): New function.
2337         (modify_function): New function.
2338         (ipa_sra_preliminary_function_checks): New function.
2339         (ipa_early_sra): New function.
2340         (ipa_early_sra_gate): New function.
2341         (pass_early_ipa_sra): New variable.
2342         * Makefile.in (tree-sra.o): Add cgraph.h to dependencies.
2343
2344 2009-09-17  Michael Matz  <matz@suse.de>
2345
2346         PR middle-end/41347
2347         * tree.c (build_type_attribute_qual_variant): Export.
2348         * tree.h (build_type_attribute_qual_variant): Declare.
2349         * tree-inline.c (remap_type_1): Use it to build variants with
2350         the original qualifiers and attributes.
2351
2352 2009-09-17  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
2353
2354         * cfglayout.c (fixup_reorder_chain): Accept conditional jumps
2355         without a fallthrough edge.
2356
2357 2009-09-16  DJ Delorie  <dj@redhat.com>
2358
2359         * config/m32c/m32c.c (m32c_emit_epilogue): Check for R8C or M16C
2360         chip and ignore the "fast_interrupt" attribute if so.
2361
2362 2009-09-16  Richard Henderson  <rth@redhat.com>
2363
2364         PR middle-end/41360
2365         * cfgbuild.c (find_bb_boundaries): Really re-instate 2009-09-02
2366         barrier fix.
2367
2368 2009-09-16  Richard Henderson  <rth@redhat.com>
2369
2370         PR target/41246
2371         * tree-cfg.c (verify_gimple_call): Validate that gimple_call_chain
2372         is set only if DECL_NO_STATIC_CHAIN is unset.
2373         * tree-nested.c (iter_nestinfo_start, iter_nestinfo_next): New.
2374         (FOR_EACH_NEST_INFO): New.
2375         (walk_all_functions): Use it.
2376         (finalize_nesting_tree): Likewise.
2377         (unnest_nesting_tree): Likewise.
2378         (free_nesting_tree): Use iter_nestinfo_start, iter_nestinfo_next.
2379         (get_chain_decl, get_chain_field): Reset DECL_NO_STATIC_CHAIN.
2380         (convert_gimple_call): Early out if gimple_call_chain already set.
2381         (convert_all_function_calls): Iterate until no new functions
2382         require a static chain.
2383         (finalize_nesting_tree_1): Assert DECL_NO_STATIC_CHAIN is unset
2384         when building a trampoline.  Use dump_function_to_file instead
2385         of dump_function.
2386         (lower_nested_functions): Open dump_file.  Validate that decls
2387         that have DECL_NO_STATIC_CHAIN from the front end don't have that
2388         bit reset by this pass.
2389
2390 2009-09-16  Michael Matz  <matz@suse.de>
2391
2392         PR fortran/41212
2393         * tree.h (struct tree_decl_common): Add decl_restricted_flag,
2394         shorten decl_common_unused.
2395         (DECL_RESTRICTED_P): New accessor.
2396         * tree-ssa-alias.c (ptr_deref_may_alias_decl_p): Use it
2397         to disambiguate marked decls and restrict pointers.
2398
2399 2009-09-16  Richard Henderson  <rth@redhat.com>
2400
2401         PR middle-end/41360
2402         * cfgbuild.c (find_bb_boundaries): Re-instate 2009-09-02 barrier fix.
2403
2404 2009-09-16  Jakub Jelinek  <jakub@redhat.com>
2405
2406         * integrate.c (set_block_abstract_flags): Call
2407         set_decl_abstract_flags also on BLOCK_NONLOCALIZED_VARs.
2408
2409 2009-09-16  Richard Guenther  <rguenther@suse.de>
2410
2411         PR middle-end/34011
2412         * tree-flow-inline.h (may_be_aliased): Compute readonly variables
2413         as non-aliased.
2414
2415 2009-09-16  DJ Delorie  <dj@redhat.com>
2416             Kaz Kojima  <kkojima@gcc.gnu.org>
2417
2418         * config/sh/sh.c (output_stack_adjust): Add new argument frame_p.
2419         (sh_expand_prologue): Update calls to output_stack_adjust.
2420         (sh_expand_epilogue): Likewise.
2421
2422 2009-09-15  Adam Nemet  <anemet@caviumnetworks.com>
2423
2424         PR bootstrap/41349
2425         * reorg.c (redundant_insn): Don't count notes or DEBUG_INSNs when
2426         trying to limit the extent of searches in the insn stream.
2427
2428 2009-09-15  Nathan Froyd  <froydnj@codesourcery.com>
2429             Jakub Jelinek  <jakub@redhat.com>
2430
2431         PR target/41175
2432         PR target/40677
2433         * config/rs6000/rs6000.c (no_global_regs_above): Fix precedence
2434         problem.
2435         (SAVRES_NOINLINE_GPRS_SAVES_LR, SAVRES_NOINLINE_FPRS_SAVES_LR,
2436         SAVRES_NOINLINE_FPRS_DOESNT_RESTORE_LR): New strategy bits.
2437         (rs6000_savres_strategy): Always save FP registers inline if the
2438         target doesn't support hardware double-precision.  Set the above
2439         bits in return value when needed.
2440         (rs6000_savres_routine_sym): Fix computation for cache selector.
2441         Mark the generated symbol as a function.  Rename exitp argument to
2442         lr.  Move code for determining the name of the symbol...
2443         (rs6000_savres_routine_name): ...here.  New function.  Add cases for
2444         getting the names right on AIX and 64-bit Linux.
2445         (savres_routine_name): New variable.
2446         (rs6000_make_savres_rtx): Rename exitp argument to lr.  Don't assert
2447         lr isn't set when savep.  Use r12 resp. r1 instead of r11 depending
2448         on what the target routine uses as a base register.  If savep && lr
2449         describe saving of r0 into memory slot.
2450         (rs6000_emit_prologue): Correct use of call_used_regs.  Fix out of
2451         line calls for AIX ABI.
2452         (rs6000_output_function_prologue): Use rs6000_savres_routine_name to
2453         determine FP save/restore functions.
2454         (rs6000_emit_stack_reset): Handle savres if sp_offset != 0 and
2455         frame_reg_rtx != sp_reg_rtx.  Use gen_add3_insn instead of
2456         gen_addsi3.
2457         (rs6000_emit_epilogue): Adjust computation of restore_lr.
2458         Duplicate restoration of LR and execute the appropriate one
2459         depending on whether GPRs are being restored inline.  Set r11 from
2460         offsetted frame_reg_rtx instead of sp_reg_rtx; if frame_reg_rtx is
2461         r11, adjust sp_offset.  Use gen_add3_insn instead of gen_addsi3.
2462         Fix out of line calls for AIX ABI.
2463         * config/rs6000/rs6000.md (*return_and_restore_fpregs_aix_<mode>):
2464         New insn.
2465         * config/rs6000/spe.md (*save_gpregs_spe): Use explicit match for
2466         register 11.
2467         (*restore_gpregs_spe): Likewise.
2468         (*return_and_restore_gpregs_spe): Likewise.
2469         * config/rs6000/linux64.h (SAVE_FP_SUFFIX, RESTORE_FP_SUFFIX):
2470         Define to empty string unconditionally.
2471         * config/rs6000/sysv4.h (SAVE_FP_SUFFIX, RESTORE_FP_SUFFIX):
2472         Define to empty string unconditionally.
2473         (GP_SAVE_INLINE, FP_SAVE_INLINE): Handle TARGET_64BIT the same as
2474         !TARGET_64BIT.
2475
2476 2009-09-15  Jan Hubicka  <jh@suse.cz>
2477
2478         * doc/invoke.texi (inline-insns-auto): Drop from 60 to 50.
2479         * params.def (inline-insns-auto): Likewise.
2480
2481 2009-09-15  Martin Jambor  <mjambor@suse.cz>
2482
2483         * ipa-inline.c (estimate_function_body_sizes): Dump info about
2484         individual statements only at TDF_DETAILS dump level.  Format
2485         source for 80 characters per line.
2486
2487 2009-09-15  Christian Bruel  <christian.bruel@st.com>
2488
2489         * regrename.c (do_replace): Update REG_DEAD notes.
2490
2491 2009-09-15  Revital Eres  <eres@il.ibm.com>
2492
2493         * doc/tm.texi (TARGET_SUPPORT_VECTOR_MISALIGNMENT): Document.
2494         * targhooks.c (default_builtin_support_vector_misalignment):
2495         New builtin function.
2496         * targhooks.h (default_builtin_support_vector_misalignment):
2497         Declare.
2498         * target.h (builtin_support_vector_misalignment):
2499         New field in struct gcc_target.
2500         * tree-vect-data-refs.c (vect_supportable_dr_alignment): Call
2501         new builtin function.
2502         * target-def.h (TARGET_SUPPORT_VECTOR_MISALIGNMENT):
2503         Define.
2504         * config/rs6000/rs6000.c
2505         (rs6000_builtin_support_vector_misalignment): New function.
2506         (TARGET_SUPPORT_VECTOR_MISALIGNMENT): Define.
2507
2508 2009-09-15  Jie Zhang  <jie.zhang@analog.com>
2509
2510         * config/bfin/bfin.c (length_for_loop): Use NONDEBUG_INSN_P
2511         instead of INSN_P.
2512         (bfin_optimize_loop): Likewise.
2513         (bfin_gen_bundles): Likewise.
2514         (workaround_speculation): Likewise.
2515         (find_load): Return NULL_RTX for debug_insn.
2516
2517 2009-09-15  Uros Bizjak  <ubizjak@gmail.com>
2518
2519         * config/alpha/alpha.md (smaxsf3): Disable for IEEE mode.
2520         (sminsf3): Ditto.
2521
2522 2009-09-14  DJ Delorie  <dj@redhat.com>
2523
2524         * config/mep/mep.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
2525         * config/mep/mep.c (mep_emit_cbranch): Don't use BEQZ/BNEI in
2526         VLIW mode.
2527
2528 2009-09-14  Richard Henderson  <rth@redhat.com>
2529             Jakub Jelinek  <jakub@redhat.com>
2530
2531         * builtins.c (expand_builtin_synchronize): Use gimple_build_asm_vec.
2532         * cfgbuild.c (make_edges): Handle asm goto.
2533         * cfglayout.c (fixup_reorder_chain): Likewise.
2534         * cfgrtl.c (patch_jump_insn): Likewise.
2535         * gimple-pretty-print.c (dump_gimple_asm): Likewise.
2536         * gimple.c (gimple_build_asm_1): Add and use nlabels parameter.
2537         (gimple_build_asm_vec): Add and use labels parameter.
2538         (gimple_build_asm): Remove.
2539         (walk_gimple_asm): Walk labels too.
2540         * gimple.def (GIMPLE_ASM): Update docs.
2541         * gimple.h: Update decls.
2542         (struct gimple_statement_asm): Change nc to use unsigned char;
2543         add nl member.
2544         (gimple_asm_nlabels): New.
2545         (gimple_asm_label_op, gimple_asm_set_label_op): New.
2546         * gimplify.c (gimplify_asm_expr): Copy labels from ASM_EXPR
2547         into gimple_build_asm_vec.
2548         * jump.c (mark_jump_label_asm): New.
2549         (mark_jump_label): Use it.
2550         (redirect_jump_1): Handle asm goto.
2551         (invert_jump_1): Soft fail if X is null.
2552         * recog.c (extract_asm_operands): New.
2553         (asm_noperands): Use it; handle asm labels.
2554         (decode_asm_operands): Use extract_asm_operands.
2555         (asm_operand_ok): Properly handle empty string.
2556         * reg-stack.c (get_asm_operands_in_out): Rename from
2557         get_asm_operand_n_inputs; use extract_asm_operands; return both
2558         inputs and outputs by reference; update all callers.
2559         * rtl.def (ASM_OPERANDS): Add label vector as operand 6.
2560         * rtl.h (ASM_OPERANDS_LABEL_VEC): New.
2561         (ASM_OPERANDS_LABEL_LENGTH, ASM_OPERANDS_LABEL): New.
2562         (ASM_OPERANDS_SOURCE_LOCATION): Renumber.
2563         (extract_asm_operands): Declare.
2564         * stmt.c (expand_asm_operands): Add and use labels parameter.
2565         (check_unique_operand_names): Likewise.
2566         (resolve_asm_operand_names, resolve_operand_name_1): Likewise.
2567         (expand_asm_stmt): Handle asm labels.
2568         * tree-cfg.c (make_gimple_asm_edges): New.
2569         (make_edges): Use it.
2570         (cleanup_dead_labels): Handle asm labels.
2571         (is_ctrl_altering_stmt): Likewise.
2572         (gimple_redirect_edge_and_branch): Likewise.
2573         * tree.def (ASM_EXPR): Add 5th operand.
2574         * tree.h (ASM_LABELS): New.
2575         (resolve_asm_operand_names): Update decl.
2576
2577         * c-parser.c (c_parser_asm_statement): Parse asm goto.
2578         (c_parser_asm_goto_operands): New.
2579         * c-tree.h (build_asm_expr): Update decl.
2580         * c-typeck.c (build_asm_expr): Add and use labels parameter.
2581         * doc/extend.texi: Document asm goto.
2582
2583 2009-09-14  Richard Henderson  <rth@redhat.com>
2584
2585         * except.h: Update declarations.
2586         (struct pointer_map_t): Forward declare.
2587         (ERT_UNKNOWN, ERT_THROW, ERT_CATCH): Remove.
2588         (struct eh_landing_pad_d, eh_landing_pad): New.
2589         (struct eh_catch_d, eh_catch): New.
2590         (struct eh_region_d): Remove next_region_sharing_label, aka,
2591         label, tree_label, landing_pad, post_landing_pad, resume,
2592         may_contain_throw.  Rename region_number to index.  Remove
2593         u.eh_catch, u.eh_throw.  Rename u.eh_try.eh_catch to first_catch.
2594         Add u.must_not_throw, landing_pads, exc_ptr_reg, filter_reg.
2595         (VEC(eh_landing_pad,gc)): New.
2596         (struct eh_status): Remove last_region_number.  Add lp_array,
2597         throw_stmt_table, ttype_data, ehspec_data.
2598         (ehr_next, FOR_ALL_EH_REGION_AT): New.
2599         (FOR_ALL_EH_REGION_FN, FOR_ALL_EH_REGION): New.
2600         * except.c (lang_protect_cleanup_actions): Return tree.
2601         (struct ehl_map_entry): Remove.
2602         (init_eh_for_function): Push zero entries for region and lp_array.
2603         (gen_eh_region): Add to region_array immediately.
2604         (gen_eh_region_catch): Operate on eh_catch objects.
2605         (gen_eh_landing_pad): New.
2606         (get_eh_region_may_contain_throw, get_eh_region_tree_label): Remove.
2607         (get_eh_region_no_tree_label, set_eh_region_tree_label): Remove.
2608         (get_eh_region_from_number, get_eh_region_from_number_fn): New.
2609         (get_eh_landing_pad_from_number_fn): New.
2610         (get_eh_landing_pad_from_number): New.
2611         (get_eh_region_from_lp_number_fn): New.
2612         (get_eh_region_from_lp_number): New.
2613         (expand_resx_stmt, note_eh_region_may_contain_throw): Remove.
2614         (get_exception_pointer, get_exception_filter): Remove.
2615         (collect_eh_region_array, can_be_reached_by_runtime): Remove.
2616         (current_function_has_exception_handlers): Simplify.
2617         (bring_to_root, eh_region_replaceable_by_p): Remove.
2618         (replace_region, hash_type_list, hash_eh_region): Remove.
2619         (eh_regions_equal_p, merge_peers, remove_unreachable_regions): Remove.
2620         (label_to_region_map, num_eh_regions): Remove.
2621         (get_next_region_sharing_label, must_not_throw_labels): Remove.
2622         (find_exception_handler_labels): Remove.
2623         (duplicate_eh_regions_0, find_prev_try): Remove.
2624         (struct duplicate_eh_regions_data): New.
2625         (duplicate_eh_regions_1): Rewrite.
2626         (duplicate_eh_regions): Return a pointer map instead of an
2627         integer offset.
2628         (copy_eh_region_1, copy_eh_region, push_reachable_handler): Remove.
2629         (redirect_eh_edge_to_label): Remove.
2630         (eh_region_outermost): Rewrite using eh_region pointers
2631         instead of integers.
2632         (add_ttypes_entry): Update for ttype_data move to eh_status.
2633         (add_ehspec_entry): Rewrite with VEC instead of varray.
2634         (assign_filter_values): Likewise.  Export.
2635         (build_post_landing_pads, connect_post_landing_pads): Remove.
2636         (dw2_build_landing_pads): Rewrite to use lp_array.
2637         (struct sjlj_lp_info, sjlj_find_directly_reachable_regions): Remove.
2638         (sjlj_assign_call_site_values): Rewrite to use lp_array.
2639         (sjlj_emit_dispatch_table, sjlj_build_landing_pads): Likewise.
2640         (sjlj_mark_call_sites): Update for landing pad numbers.
2641         (finish_eh_generation): Rewrite.
2642         (gate_handle_eh): Do nothing for no eh tree.
2643         (pass_rtl_eh): Move up near finish_eh_generation.
2644         (remove_eh_landing_pad): New.
2645         (remove_eh_handler): Export.
2646         (remove_eh_region, remove_eh_handler_and_replace): Remove.
2647         (for_each_eh_label): Rewrite to use lp_array.
2648         (make_reg_eh_region_note): New.
2649         (make_reg_eh_region_note_nothrow_nononlocal): New.
2650         (insn_could_throw_p): New.
2651         (copy_reg_eh_region_note_forward): New.
2652         (copy_reg_eh_region_note_backward): New.
2653         (check_handled, add_reachable_handler): Remove.
2654         (reachable_next_level, foreach_reachable_handler): Remove.
2655         (arh_to_landing_pad, arh_to_label, reachable_handlers): Remove.
2656         (get_eh_region_and_lp_from_rtx): New.
2657         (get_eh_region_from_rtx): New.
2658         (can_throw_internal_1, can_throw_external_1): Remove.
2659         (can_throw_internal): Use get_eh_region_from_rtx.
2660         (can_throw_external): Use get_eh_region_and_lp_from_rtx.
2661         (insn_nothrow_p, can_nonlocal_goto): New.
2662         (expand_builtin_eh_common, expand_builtin_eh_pointer): New.
2663         (expand_builtin_eh_filter, expand_builtin_eh_copy_values): New.
2664         (add_action_record): Use VEC not varray.
2665         (collect_one_action_chain): Update for eh_region changes.
2666         (convert_to_eh_region_ranges): Make static.  Use VEC not varray.
2667         Use get_eh_region_and_lp_from_rtx.
2668         (gate_convert_to_eh_region_ranges): New.
2669         (pass_convert_to_eh_region_ranges): Use it.
2670         (push_uleb128, push_sleb128): Use VEC not varray.
2671         (output_one_function_exception_table): Likewise.
2672         (dump_eh_tree): Update for eh_region changes.
2673         (verify_eh_tree): Likewise.
2674         (verify_eh_region, default_init_unwind_resume_libfunc): Remove.
2675         * tree-eh.c: Include target.h.
2676         (add_stmt_to_eh_lp_fn): Rename from add_stmt_to_eh_region_fn.
2677         Don't disallow GIMPLE_RESX; adjust argument check.
2678         (add_stmt_to_eh_lp): Rename from add_stmt_to_eh_region.
2679         (record_stmt_eh_region): Update for landing pad numbers;
2680         generate a landing pad if necessary.
2681         (remove_stmt_from_eh_lp): Rename from remove_stmt_from_eh_region.
2682         (remove_stmt_from_eh_lp_fn): Similarly.
2683         (lookup_stmt_eh_lp_fn): Rename from lookup_stmt_eh_region_fn.
2684         Update for lp numbers; don't special case missing throw_stmt_table.
2685         (lookup_expr_eh_lp): Similarly.
2686         (lookup_stmt_eh_lp): Rename from lookup_stmt_eh_region.
2687         (eh_seq, eh_region_may_contain_throw): New.
2688         (struct leh_state): Add ehp_region.
2689         (struct leh_tf_state): Remove eh_label.
2690         (emit_post_landing_pad): New.
2691         (emit_resx, emit_eh_dispatch): New.
2692         (note_eh_region_may_contain_throw): New.
2693         (frob_into_branch_around): Take eh_region not eh label;
2694         emit eh code into eh_seq.
2695         (honor_protect_cleanup_actions): Early exit for no actions.  Don't
2696         handle EXC_PTR_EXPR, FILTER_EXPR.  Use gimple_build_eh_must_not_throw,
2697         lower_eh_must_not_throw.  Emit code to eh_seq.
2698         (lower_try_finally_nofallthru): Emit eh code to eh_seq.
2699         (lower_try_finally_onedest): Likewise.
2700         (lower_try_finally_copy): Likewise.
2701         (lower_try_finally_switch): Likewise.
2702         (lower_try_finally): Initialize ehp_region.
2703         (lower_catch): Update for eh_catch objects.
2704         (lower_eh_filter): Don't handle must_not_throw.
2705         (lower_eh_must_not_throw): New.
2706         (lower_cleanup): Don't set eh_label.
2707         (lower_eh_constructs_2): Resolve eh builtins.
2708         Handle GIMPLE_EH_MUST_NOT_THROW.
2709         (lower_eh_constructs): Initialize eh_region_may_contain_throw.
2710         Add eh_seq to the end of the function body.
2711         (make_eh_dispatch_edges): New.
2712         (make_eh_edge): Remove.
2713         (make_eh_edges): Simplify for landing pads.
2714         (redirect_eh_edge_1): New.
2715         (redirect_eh_edge): Use it.
2716         (redirect_eh_dispatch_edge): New.
2717         (stmt_could_throw_p): Use a switch.  Allow RESX.
2718         (stmt_can_throw_external): Use lookup_stmt_eh_lp.
2719         (stmt_can_throw_internal): Likewise.
2720         (maybe_clean_eh_stmt_fn, maybe_clean_eh_stmt): New.
2721         (maybe_clean_or_replace_eh_stmt): Update for landing pads.
2722         (maybe_duplicate_eh_stmt_fn, maybe_duplicate_eh_stmt): New.
2723         (gate_refactor_eh): New.
2724         (pass_refactor_eh): Use it.
2725         (lower_resx, execute_lower_resx, pass_lower_resx): New.
2726         (lower_eh_dispatch, execute_lower_eh_dispatch): New.
2727         (gate_lower_ehcontrol, pass_lower_eh_dispatch): New.
2728         (remove_unreachable_handlers): Rename from
2729         tree_remove_unreachable_handlers; rewrite for landing pads;
2730         call remove_eh_handler directly.
2731         (remove_unreachable_handlers_no_lp): New.
2732         (unsplit_eh, unsplit_all_eh): New.
2733         (tree_empty_eh_handler_p, all_phis_safe_to_merge): Remove.
2734         (cleanup_empty_eh_merge_phis, cleanup_empty_eh_move_lp): New.
2735         (cleanup_empty_eh_unsplit): New.
2736         (cleanup_empty_eh): Rewrite.
2737         (cleanup_all_empty_eh): New.
2738         (execute_cleanup_eh): Rename from cleanup_eh.  Remove unreachable
2739         handlers first.  Use unsplit_all_eh, cleanup_all_empty_eh.
2740         (gate_cleanup_eh): New.
2741         (pass_cleanup_eh): Use it.
2742         (verify_eh_edges): Move later in file.  Expect one EH edge.
2743         (verify_eh_dispatch_edge): New.
2744
2745         * Makefile.in (FUNCTION_H): Use vecprim.h, not varray.h.
2746         (gtype-desc.o): Add TARGET_H.
2747         (tree.o): Use EXCEPT_H, not except.h.
2748         (cfgbuild.o): Add EXPR_H.
2749         (GTFILES): Add vecprim.h.
2750         * builtins.c (expand_builtin): Handle BUILT_IN_EH_POINTER,
2751         BUILT_IN_EH_FILTER, BUILT_IN_EH_COPY_VALUES.
2752         * builtins.def (BUILT_IN_UNWIND_RESUME, BUILT_IN_EH_POINTER,
2753         BUILT_IN_EH_FILTER, BUILT_IN_EH_COPY_VALUES): New.
2754         * calls.c (emit_call_1): Use make_reg_eh_region_note.
2755         * cfgbuild.c (control_flow_insn_p): Use can_nonlocal_goto; tidy
2756         calls to can_throw_internal.
2757         (rtl_make_eh_edge): Use get_eh_landing_pad_from_rtx.
2758         (make_edges): Don't handle RESX; use can_nonlocal_goto.
2759         * cfgexpand.c (expand_gimple_stmt_1): Don't handle RESX.
2760         (expand_gimple_stmt): Use make_reg_eh_region_note.
2761         (expand_debug_expr): Don't handle EXC_PTR_EXPR and FILTER_EXPR.
2762         (gimple_expand_cfg): Don't call convert_from_eh_region_ranges,
2763         or find_exception_handler_labels.
2764         * cfgrtl.c (rtl_verify_flow_info_1): Don't handle RESX.  Assert
2765         there is exacly one EH edge.  Use can_nonlocal_goto and
2766         can_throw_internal.
2767         * cgraphunit.c (update_call_expr): Use maybe_clean_eh_stmt_fn.
2768         (cgraph_materialize_all_clones): Use maybe_clean_or_replace_eh_stmt.
2769         * combine.c (can_combine_p, try_combine): Use insn_nothrow_p.
2770         * cse.c (count_reg_usage, insn_live_p): Use insn_could_throw_p.
2771         * dce.c (deletable_insn_p_1): Don't test may_trap_p.
2772         (deletable_insn_p): Use insn_nothrow_p; reorder nonjump insn test.
2773         * dse.c (scan_insn): Use insn_could_throw_p.
2774         * emit-rtl.c (try_split): Use copy_reg_eh_region_note_backward.
2775         * expr.c (expand_expr_real): Use make_reg_eh_region_note.
2776         (expand_expr_real_1): Don't handle RESX, EXC_PTR, or FILTER_EXPR.
2777         * fold-const.c (tree_expr_nonnegative_warnv_p): Don't handle
2778         EXC_PTR_EXPR or FILTER_EXPR.
2779         (tree_expr_nonzero_warnv_p): Likewise.
2780         * function.h: Include vecprim.h, not varray.h
2781         (struct rtl_eh): Remove filter, exc_ptr, built_landing_pad members;
2782         move ttype_data and ehspec_data members to struct eh_status; change
2783         action_record_data member to a VEC.
2784         * gcse.c (hash_scan_set): Use can_throw_internal.
2785         * gengtype.c (open_base_files): Add target.h to gtype-desc.c.
2786         * gimple-iterator.c (gsi_replace): Use maybe_clean_or_replace_eh_stmt.
2787         * gimple-low.c (lower_stmt): Handle GIMPLE_EH_MUST_NOT_THROW.
2788         (block_may_fallthru): Don't handle RESX_EXPR.
2789         * gimple-pretty-print.c (dump_gimple_label): Dump EH_LANDING_PAD_NR.
2790         (dump_gimple_eh_must_not_throw, dump_gimple_eh_dispatch): New.
2791         (dump_gimple_stmt): Dump landing pad information with TDF_EH;
2792         handle GIMPLE_EH_MUST_NOT_THROW, GIMPLE_EH_DISPATCH.
2793         * gimple.c (gss_for_code): Handle GIMPLE_EH_MUST_NOT_THROW,
2794         GIMPLE_EH_DISPATCH, GIMPLE_RESX.
2795         (gimple_size): Likewise.
2796         (gimple_build_eh_dispatch, gimple_build_eh_must_not_throw): New.
2797         (gimple_build_resx): Use gimple_build_with_ops.
2798         (DEFTREECODE): Don't handle EXC_PTR_EXPR, FILTER_EXPR.
2799         (is_gimple_val): Likewise.
2800         (is_gimple_stmt): Remove RESX_EXPR.
2801         * gimple.def (GIMPLE_EH_MUST_NOT_THROW, GIMPLE_EH_DISPATCH): New.
2802         (GIMPLE_RESX): Reorder with other EH constructs.
2803         * gimple.h (struct gimple_statement_eh_mnt): New.
2804         (struct gimple_statement_eh_ctrl): Rename from gimple_statement_resx.
2805         (gimple_eh_filter_must_not_throw): Remove.
2806         (gimple_eh_filter_set_must_not_throw): Remove.
2807         (gimple_eh_must_not_throw_fndecl): New.
2808         (gimple_eh_dispatch_region, gimple_eh_dispatch_set_region): New.
2809         (is_gimple_resx): New.
2810         * gimplify.c (gimplify_expr): Don't handle EXC_PTR_EXPR, RESX_EXPR.
2811         Don't copy EH_FILTER_MUST_NOT_THROW.
2812         * gsstruct.def (GSS_EH_MNT, GSS_EHCONTROL): New.
2813         * ipa-inline.c (estimate_function_body_sizes): Don't try to
2814         handle must_not_throw_labels specially.
2815         * ipa-pure-const.c (check_call): Update debug statement for LP.
2816         * ipa-type-escape.c (check_operand): Don't handle EXC_PTR or FILTER.
2817         * ipa-utils.c (get_base_var): Likewise.
2818         * libfunc.h (LTI_unwind_resume, unwind_resume_libfunc): Remove.
2819         * lower-subreg.c (move_eh_region_note): Remove.
2820         (resolve_simple_move): Use copy_reg_eh_region_note_forward.
2821         * omp-low.c (new_omp_context): Update for eh_lp_nr.
2822         (create_task_copyfn): Likewise.
2823         (maybe_catch_exception): Use gimple_build_eh_filter.
2824         * optabs.c (emit_libcall_block): Update test for no-nonlocal-goto
2825         REG_EH_REGION.  Use make_reg_eh_region_note_nothrow_nononlocal.
2826         * passes.c (init_optimization_passes): Add pass_lower_eh_dispatch
2827         and pass_lower_resx.
2828         * print-tree.c (print_node): Dump EH_LANDING_PAD_NR.
2829         * recog.c (peephole2_optimize): Use copy_reg_eh_region_note_backward,
2830         can_throw_internal, can_nonlocal_goto.
2831         * reload1.c (fixup_eh_region_note): Use insn_could_throw_p,
2832         copy_reg_eh_region_note_forward.
2833         (emit_input_reload_insns): Use copy_reg_eh_region_note_forward.
2834         (emit_output_reload_insns): Likewise.
2835         (copy_eh_notes): Remove.
2836         * rtl.def (RESX): Remove.
2837         * rtl.h: Update declarations.
2838         * sese.c (graphite_copy_stmts_from_block): Use maybe_duplicate_eh_stmt.
2839         * tree-cfg.c (make_edges): Handle GIMPLE_EH_DISPATCH.
2840         (update_eh_label): Remove.
2841         (cleanup_dead_labels_eh): New.
2842         (cleanup_deal_labels): Use it instead of update_eh_label.
2843         (gimple_merge_blocks): Update landing pad data structure when
2844         removing a landing pad label.
2845         (remove_useless_stmts_tc): Remove gimple_eh_filter_must_not_throw
2846         test; handle GIMPLE_EH_MUST_NOT_THROW.
2847         (is_ctrl_altering_stmt): Handle GIMPLE_EH_DISPATCH.
2848         (verify_gimple_assign_single): Don't handle EXC_PTR or FILTER_EXPR.
2849         (verify_types_in_gimple_stmt): Handle GIMPLE_EH_DISPATCH.
2850         (verify_stmt): Likewise.  Verify landing pads.
2851         (gimple_redirect_edge_and_branch): Handle GIMPLE_EH_DISPATCH.
2852         (gimple_duplicate_bb): Use maybe_duplicate_eh_stmt.
2853         (struct move_stmt_d): Add eh_map.
2854         (move_stmt_eh_region_nr, move_stmt_eh_region_tree_nr): New.
2855         (move_stmt_r): Remap eh region numbers in builtin calls,
2856         resx and eh_dispatch.
2857         (move_block_to_fn): Remove eh_offset parameter.  Use
2858         maybe_duplicate_eh_stmt_fn.
2859         (find_outermost_region_in_block): Operate on eh_region pointers
2860         instead of region numbers.
2861         (move_sese_region_to_fn): Expect eh_map instead of eh_offset from
2862         duplicate_eh_regions.
2863         * tree-cfgcleanup.c (tree_forwarder_block_p): Move entry block edge
2864         test earlier.  Disallow EH landing pads.
2865         * tree-cfa.c (create_tree_common_ann): Don't set ann->rn.
2866         * tree-flow.h: Update declarations.
2867         (struct tree_ann_common_d): Replace rn with lp_nr.
2868         * tree-inline.c (copy_tree_body_r): Don't handle RESX_EXPR.
2869         (remap_eh_region_nr, remap_eh_region_tree_nr): New.
2870         (remap_gimple_stmt): Remap eh region numbers in builtin calls,
2871         resx and eh_dispatch.
2872         (copy_bb): Use maybe_duplicate_eh_stmt_fn.
2873         (copy_edges_for_bb): Use make_eh_dispatch_edges.
2874         (copy_cfg_body): Expect eh_map instead of eh_region_offset
2875         from duplicate_eh_regions.
2876         (estimate_num_insns): Don't handle EXC_PTR_EXPR or FILTER_EXPR;
2877         update RESX; handle EH_DISPATCH.
2878         (expand_call_inline): Set eh_lp_nr, not eh_region.
2879         (maybe_inline_call_in_expr): Likewise.
2880         * tree-inline.h (struct copy_body_data): Replace eh_region with
2881         eh_lp_nr, eh_region_offset with eh_map.
2882         * tree-optimize.c (execute_fixup_cfg): Use maybe_clean_eh_stmt.
2883         * tree-pass.h (pass_lower_eh_dispatch, pass_lower_resx): New.
2884         * tree-pretty-print.c (dump_generic_node): Don't handle
2885         EXC_PTR_EXPR, FILTER_EXPR, RESX_EXPR.
2886         * tree-sra.c (scan_function): Use maybe_clean_eh_stmt.
2887         * tree-ssa-alias.c (ref_maybe_used_by_call_p_1): Don't handle
2888         EXC_PTR_EXPR, FILTER_EXPR.
2889         * tree-ssa-operands.c (get_expr_operands): Likewise.
2890         * tree-ssa-propagate.c (valid_gimple_rhs_p): Likewise.
2891         * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Likewise.
2892         (ao_ref_init_from_vn_reference): Likewise.
2893         * tree-ssa-sink.c (statement_sink_location): Likewise.
2894         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
2895         (mark_virtual_phi_result_for_renaming): Export.  Tidy.
2896         * tree-ssa-pre.c (get_or_alloc_expr_for): Don't handle
2897         EXC_PTR_EXPR, FILTER_EXPR.
2898         (is_exception_related): Remove.
2899         (compute_avail): Don't call it.
2900         * tree-ssa-structalias.c: Remove VEC definitions for int and unsigned.
2901         * tree.c (find_decls_types_in_eh_region): Update for eh_region changes.
2902         (find_decls_types_in_node): Use FOR_ALL_EH_REGION_FN.
2903         (build_common_builtin_nodes): Add enable_cxa_end_cleanup parameter.
2904         Build EH builtins.
2905         (build_resx): Remove.
2906         * tree.def (EXC_PTR_EXPR, FILTER_EXPR, RESX_EXPR): Remove.
2907         * tree.h: Update declarations.
2908         (EH_FILTER_MUST_NOT_THROW): Remove.
2909         (struct tree_label_decl): Add eh_landing_pad_nr.
2910         (EH_LANDING_PAD_NR): New.
2911         * value-prof.c (gimple_ic): Tidy variable names.  Update for
2912         landing pad numbers.
2913         (gimple_stringop_fixed_value): Tidy variable names.  Assert
2914         that neither call stmt can throw.
2915         * vecprim.h (uchar): New.
2916         (VEC(uchar,heap), VEC(uchar,gc)): New.
2917
2918         * c-common.c (c_define_builtins): Update call to
2919         build_common_builtin_nodes.
2920         * c-parser.c (c_parse_file): Don't call
2921         default_init_unwind_resume_libfunc.
2922
2923 2009-09-14  Richard Sandiford  <rdsandiford@googlemail.com>
2924
2925         * config/mips/mips-protos.h (mips_cfun_has_cprestore_slot_p): Declare.
2926         (mips_cprestore_address_p): Likewise.
2927         (mips_save_gp_to_cprestore_slot): Likewise.
2928         (mips_restore_gp): Rename to...
2929         (mips_restore_gp_from_cprestore_slot): ...this.
2930         (mips_must_initialize_gp_p): Declare.
2931         (mips_emit_save_slot_move): Likewise.
2932         (mips_output_load_label): Return nothing.
2933         (mips_eh_uses): Declare.
2934         * config/mips/mips.h (TARGET_SPLIT_CALLS): Require epilogue_completed.
2935         (TARGET_CPRESTORE_DIRECTIVE): New macro.
2936         (TARGET_ABSOLUTE_JUMPS): Likewise.
2937         (EH_USES): Likewise.
2938         (FIRST_PSEUDO_REGISTER): Update comment.
2939         (MIPS_ABSOLUTE_JUMP): New macro, extracted from...
2940         (MIPS_CALL): ...here.
2941         (REGISTER_NAMES): Add $cprestore.
2942         * config/mips/mips.c (machine_function): Remove has_gp_insn_p.
2943         Add load_label_length, has_inflexible_gp_insn_p,
2944         has_flexible_gp_insn_p, must_initialize_gp_p and
2945         must_restore_gp_when_clobbered_p.
2946         (mips_expand_call): Don't generate split instructions here.
2947         (mips_split_call): Update the call to mips_restore_gp after
2948         the above name change.
2949         (mips16_cfun_returns_in_fpr_p): Move earlier in file.
2950         (mips_find_gp_ref): New function.
2951         (mips_insn_has_inflexible_gp_ref_p): Likewise.
2952         (mips_cfun_has_inflexible_gp_ref_p): Likewise.
2953         (mips_insn_has_flexible_gp_ref_p): Likewise.
2954         (mips_cfun_has_flexible_gp_ref_p): Likewise.
2955         (mips_function_has_gp_insn): Delete.
2956         (mips_global_pointer): Drop the df_regs_ever_live_p check.
2957         Use the new functions above.  Only return INVALID_REGNUM
2958         for TARGET_ABSOLUTE_JUMPS.
2959         (mips_must_initialize_gp_p): New function.
2960         (mips_get_cprestore_base_and_offset): New function, extracted from...
2961         (mips_cprestore_slot): ...here.  Take a bool parameter.
2962         (mips_cfun_has_cprestore_slot_p): New function.
2963         (mips_cprestore_address_p): Likewise.
2964         (mips_save_gp_to_cprestore_slot): Likewise.
2965         (mips_restore_gp): Rename to...
2966         (mips_restore_gp_from_cprestore_slot): ...this.  Assert
2967         epilogue_completed.  Update the call to mips_cprestore_slot.
2968         Test cfun->machine->must_restore_gp_when_clobbered_p.
2969         (mips_direct_save_slot_move_p): New function.
2970         (mips_emit_save_slot_move): Likewise.
2971         (mips_output_cplocal): Test mips_must_initialize_gp_p () instead
2972         of cfun->machine->global_pointer.
2973         (mips_output_function_prologue): Check mips_must_initialize_gp_p ().
2974         (mips_save_reg): Use mips_emit_save_slot_move.
2975         (mips_expand_prologue): Set must_initialize_gp_p.
2976         Use mips_cfun_has_cprestore_slot_p.  Use gen_potential_cprestore
2977         for all cprestore saves.  Emit a use_cprestore instruction after
2978         setting up the cprestore slot.
2979         (mips_restore_reg): Use mips_emit_save_slot_move.
2980         (mips_process_load_label): New function.
2981         (mips_load_label_length): Likewise.
2982         (mips_output_load_label): Don't return asm: output it here instead.
2983         Use mips_process_load_label.
2984         (mips_adjust_insn_length): Adjust the length of branch instructions
2985         that have length MAX_PIC_BRANCH_LENGTH.
2986         (mips_output_conditional_branch): Update the call to
2987         mips_output_load_label.  Assume the branch target is OPERANDS[0]
2988         rather than OPERANDS[1].  Use MIPS_ABSOLUTE_JUMP for absolute jumps.
2989         (mips_output_order_conditional_branch): Swap the meaning of
2990         OPERANDS[0] and OPERANDS[1].
2991         (mips_variable_issue): Don't count ghost instructions.
2992         (mips_expand_ghost_gp_insns): New function.
2993         (mips_reorg): Rerun mips_reorg_process_insns if it returns true.
2994         (mips_output_mi_thunk): Set must_initialize_gp_p.
2995         (mips_eh_uses): New function.
2996         * config/mips/predicates.md (cprestore_save_slot_operand)
2997         (cprestore_load_slot_operand): New predicates.
2998         * config/mips/mips.md (UNSPEC_POTENTIAL_CPRESTORE): New unspec.
2999         (UNSPEC_MOVE_GP): Likewise.
3000         (UNSPEC_CPRESTORE, UNSPEC_RESTORE_GP, UNSPEC_EH_RETURN)
3001         (UNSPEC_CONSTTABLE_INT, UNSPEC_CONSTTABLE_FLOAT): Bump to make room.
3002         (CPRESTORE_SLOT_REGNUM): New register.
3003         (MAX_PIC_BRANCH_LENGTH): New constant.
3004         (jal_macro): Use MIPS_ABSOLUTE_JUMPS.
3005         (length): Use MAX_PIC_BRANCH_LENGTH as a placeholder for PIC long
3006         branches.  Fix commentary.
3007         (loadgp_newabi_<mode>): Change from unspec_volatile to unspec.
3008         Only split if mips_must_initialize_gp_p; expand to nothing otherwise.
3009         Change type to "ghost".
3010         (loadgp_absolute_<mode>): Likewise.
3011         (loadgp_rtp_<mode>): Likewise.
3012         (copygp_mips16): Likewise.
3013         (loadgp_blockage): Remove redundant mode attribute.
3014         (potential_cprestore): New instruction.
3015         (cprestore): Turn into an unspec set.
3016         (use_cprestore): New instruction.
3017         (*branch_fp): Swap operands 0 and 1.  Remove redundant mode attribute.
3018         (*branch_fp_inverted): Likewise.
3019         (*branch_order<mode>): Likewise.
3020         (*branch_order<mode>_inverted): Likewise.
3021         (*branch_equality<mode>): Likewise.
3022         (*branch_equality<mode>_inverted): Likewise.
3023         (*branch_bit<bbv><mode>): Likewise.
3024         (*branch_bit<bbv><mode>_inverted): Likewise.
3025         (*branch_equality<mode>_mips16): Remove redundant mode.
3026         (jump): Turn into a define_expand.
3027         (*jump_absolute): New instruction.
3028         (*jump_pic): Likewise.
3029         (*jump_mips16): Rename previously-unnamed pattern.  Remove
3030         redundant mode attribute.
3031         (restore_gp): Split on epilogue_completed rather than
3032         reload_completed.  Change type to "ghost".
3033         (move_gp<mode>): New instruction.
3034         * config/mips/mips-dsp.md (mips_bposge): Swap operands 0 and 1.
3035         Remove redundant mode attribute.
3036         * config/mips/mips-ps-3d.md (bc1any4t): Likewise.
3037         (bc1any4f, bc1any2t, bc1any2f): Likewise.
3038         (*branch_upper_lower, *branch_upper_lower_inverted): Likewise.
3039
3040 2009-09-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
3041
3042         PR target/41210
3043         * config/rs6000/rs6000.c (rs6000_function_value): V2DF and V2DI
3044         are returned in the same register (vs34 or v2) that Altivec vector
3045         types are returned in.
3046         (rs6000_libcall_value): Ditto.
3047
3048         PR target/41331
3049         * config/rs6000/rs6000.c (rs6000_emit_move): Use gen_add3_insn
3050         instead of explicit addsi3/adddi3 calls.
3051         (rs6000_split_multireg_move): Ditto.
3052         (rs6000_emit_allocate_stack): Ditto.
3053         (rs6000_emit_prologue): Ditto.
3054         (rs6000_output_mi_thunk): Ditto.
3055
3056         * config/rs6000/rs6000.md (bswapdi*): Don't assume the pointer
3057         size is 64 bits if we can use 64-bit registers.
3058
3059 2009-09-14  Bernd Schmidt  <bernd.schmidt@analog.com>
3060
3061         * config/bfin/bfin.c (bfin_longcall_p): Don't use short calls for weak
3062         symbols.
3063
3064         From Jie Zhang <jie.zhang@analog.com>:
3065         * config/bfin/bfin.c (bfin_expand_prologue): Ask do_link to
3066         save FP and RETS with saveall attribute.
3067         (bfin_expand_epilogue): Ask do_unlink to restore FP and RETS
3068         with saveall attribute.
3069
3070         * config/bfin/bfin.c (bfin_expand_builtin,
3071         case BFIN_BUILTIN_MULT_1X32X32): Force constants to registers for the
3072         operands.
3073
3074         From Jie Zhang <jie.zhang@analog.com>:
3075         * config/bfin/bfin.c (bfin_expand_builtin): Initialize icodes
3076         before use in two places.
3077         * config/bfin/bfin.md (AREG): Define mode iterator.
3078         (reload_in, reload_out): Use mode iterator AREG.
3079
3080 2009-09-14  Richard Guenther  <rguenther@suse.de>
3081
3082         PR middle-end/41350
3083         * dwarf2out.c (dwarf2out_begin_prologue): Adjust non-CFI asm
3084         EH personality path.
3085
3086 2009-09-13  Richard Guenther  <rguenther@suse.de>
3087             Rafael Avila de Espindola  <espindola@google.com>
3088
3089         * langhooks-def.h (LANG_HOOKS_EH_RUNTIME_TYPE): Define.
3090         (LANG_HOOKS_EH_PERSONALITY): Likewise.
3091         (LANG_HOOKS_INITIALIZER): Adjust.
3092         (lhd_pass_through_t): Declare.
3093         * langhooks.h (struct lang_hooks): Add eh_runtime_type and
3094         eh_personality.
3095         * langhooks.c (lhd_pass_through_t): New function.
3096         * dwarf2out.c (output_call_frame_info, dwarf2out_do_cfi_startproc,
3097         dwarf2out_begin_prologue): Use personality from current_function_decl.
3098         * expr.h (get_personality_function): Declare.
3099         * expr.c (get_personality_function): New function.
3100         (build_personality_function): Likewise.
3101         * libfuncs.h (libfunc_index): Remove LTI_eh_personality.
3102         (eh_personality_libfunc): Remove.
3103         * optabs.c (build_libfunc_function): New function split out from ...
3104         (init_one_libfunc): ... here.
3105         * tree.h (DECL_FUNCTION_PERSONALITY): New.
3106         (tree_function_decl): Add personality.
3107         (lhd_gcc_personality): Declare.
3108         (build_personality_function): Likewise.
3109         * tree.c (gcc_eh_personality_decl): New.
3110         (lhd_gcc_personality): New function.
3111         * except.h (lang_eh_runtime_type): Remove.
3112         (enum eh_personality_kind): New.
3113         (build_personality_function): Declare.
3114         (function_needs_eh_personality): Declare.
3115         * except.c (lang_eh_runtime_type): Remove.
3116         (function_needs_eh_personality): New function.
3117         (add_type_for_runtime): Call lang_hooks.type_for_runtime instead.
3118         (sjlj_emit_function_enter, output_function_exception_table):
3119         Use personality from current_function_decl.
3120         * tree-eh.c (lower_eh_constructs): Set DECL_FUNCTION_PERSONALITY.
3121         * tree-inline.c (tree_can_inline_p): Do not inline across different
3122         EH personalities.
3123         (expand_call_inline): Likewise.  Adjust the callers EH personality.
3124         (tree_function_versioning): Copy DECL_FUNCTION_PERSONALITY.
3125         * cgraph.c (cgraph_add_new_function): Set DECL_FUNCTION_PERSONALITY.
3126         * Makefile.in (cgraph.o): Add $(EXCEPT_H) dependency.
3127         (c-parser.o): Likewise
3128         * c-tree.h (c_eh_initialized_p): Remove.
3129         (c_maybe_initialize_eh): Likewise.
3130         * c-decl.c (finish_decl): Don't call c_maybe_initialize_eh.
3131         (finish_decl): Don't call c_maybe_initialize_eh.
3132         (c_eh_initialized_p): Remove.
3133         (c_maybe_initialize_eh): Likewise.
3134         * c-parser.c (c_parser_omp_construct): Likewise.
3135         (c_parse_file): Initialize exception handling.
3136
3137 2009-09-13  Kai Tietz  <kai.tietz@onevision.com>
3138
3139         * config.gcc (tm_file): Remove i386/biarch32.h
3140         for i?86-w64-mingw* case.
3141         (i?86-*-mingw* andx86_64-*-mingw*): Add multilib
3142         support.
3143         * config.host: Set for x64 mingw the option
3144         use_long_long_for_widest_fast_int to yes.
3145
3146 2009-09-13  Eric Botcazou  <ebotcazou@adacore.com>
3147
3148         * tree.h (DECL_IGNORED_P): Document further effect for FUNCTION_DECL.
3149         * dbxout.c (dbxout_function_end): Do not test DECL_IGNORED_P.
3150         (dbxout_begin_function): Likewise.
3151         * final.c (dwarf2_debug_info_emitted_p): New predicate.
3152         (final_start_function): Do not emit debug info if DECL_IGNORED_P is
3153         set on the function.
3154         (final_end_function): Likewise.
3155         (final_scan_insn): Likewise.
3156         (rest_of_handle_final): Likewise.
3157         * varasm.c (assemble_start_function): Likewise.
3158         * config/rs6000/xcoff.h (ASM_DECLARE_FUNCTION_NAME): Likewise.
3159
3160 2009-09-12  Jason Merrill  <jason@redhat.com>
3161
3162         * dbgcnt.c (dbg_cnt_process_single_pair): constify.
3163         * opts.c (common_handle_option): constify.
3164
3165 2009-09-12  Gerald Pfeifer  <gerald@pfeifer.com>
3166
3167         * doc/install.texi (avr): Remove obsolete reference site.
3168
3169 2009-09-12  Gerald Pfeifer  <gerald@pfeifer.com>
3170
3171         * doc/install.texi (Binaries): Adjust AIX link.
3172
3173 2009-09-12  Akim Demaille  <demaille@gostai.com>
3174
3175         * doc/invoke.texi (-fstrict-aliasing): Correct two examples.
3176         Use an imperative sentence.
3177
3178 2009-09-11  Richard Henderson  <rth@redhat.com>
3179
3180         * gsstruct.def (DEFGSSTRUCT): Remove printable-name argument; add
3181         structure-name and has-tree-operands arguments; update all entries.
3182         * gimple.def (DEFGSCODE): Replace 3rd argument with GSS_symbol;
3183         update all entries.
3184         * gimple.c (gimple_ops_offset_): Use HAS_TREE_OP argument.
3185         (gsstruct_code_size): New.
3186         (gss_for_code_): New.
3187         (gss_for_code): Remove.
3188         (gimple_size): Rewrite using gsstruct_code_size.
3189         (gimple_statement_structure): Move to gimple.h.
3190         * gimple.h (gimple_ops_offset_, gss_for_code_): Declare.
3191         (gss_for_code, gimple_statement_structure): New.
3192         (gimple_ops): Use new arrays; tidy.
3193
3194 2009-09-11  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
3195
3196         * config/pa/predicates.md (symbolic_operand): Require a CONST symbolic
3197         operand to be a PLUS expression.
3198         * config/pa/pa.c (pa_secondary_reload): Likewise.
3199
3200 2009-09-11  Jakub Jelinek  <jakub@redhat.com>
3201
3202         * combine.c (propagate_for_debug_subst): Call wrap_constant on top.
3203
3204         * print-rtl.c (print_rtx): Use JUMP_LABEL (in_rtx) instead of
3205         XEXP (in_rtx, 8).
3206
3207 2009-09-11  Bernd Schmidt  <bernd.schmidt@analog.com>
3208
3209         From Jie Zhang <jie.zhang@analog.com>:
3210         * doc/extend.texi (node Function Attributes): Document l2
3211         function attribute.
3212         (node Blackfin Variable Attributes): Document l2 variable attributes.
3213
3214 2009-09-11  Loren J. Rittle  <ljrittle@acm.org>
3215
3216         * config.gcc (*-*-freebsd*): Enable default_use_cxa_atexit
3217         to match the system compiler's configuration at inflection point.
3218         Add comment to remark a remaining difference with system compiler.
3219
3220         * configure.ac (*-*-freebsd*): Enable check for __stack_chk_fail.
3221         * configure: Regenerate.
3222
3223 2009-09-11  Bernd Schmidt  <bernd.schmidt@analog.com>
3224
3225         From Jie Zhang <jie.zhang@analog.com>:
3226         * config/bfin/bfin.c (bfin_expand_call): Handle L2 functions.
3227         (bfin_handle_l2_attribute): New.
3228         (bfin_attribute_table): Add l2 attribute.
3229
3230 2009-09-11  Michael Matz  <matz@suse.de>
3231
3232         PR middle-end/41275
3233         * tree-inline.c (remap_decls): Don't put DECL_EXTERNAL decls
3234         on the local_decls list.
3235
3236 2009-09-11  Alexandre Oliva  <aoliva@redhat.com>
3237
3238         PR debug/41276
3239         PR debug/41307
3240         * cselib.c (cselib_expand_value_rtx_cb): Document callback
3241         interface.
3242         (cselib_expand_value_rtx_1): Use callback for SUBREGs.  Adjust
3243         for VALUEs, to implement the documented interface.
3244         * var-tracking.c (vt_expand_loc_callback): Handle SUBREGs.
3245         Adjust for VALUEs and anything else, to implement the
3246         documented interface.
3247
3248 2009-09-10  Nathan Froyd  <froydnj@codesourcery.com>
3249
3250         * config/rs6000/rs6000.h (DATA_ALIGNMENT): Check that we are dealing
3251         with actual SPE/paired vector modes before using 64-bit alignment.
3252         Check that TYPE is a REAL_TYPE for TARGET_E500_DOUBLE.
3253
3254 2009-09-10  DJ Delorie  <dj@redhat.com>
3255
3256         * config/mep/mep.md (eh_epilogue): Defer until after epilogue is
3257         emitted.
3258
3259         * config/mep/mep.h (LEGITIMATE_CONSTANT_P): New.
3260         * config/mep/mep.c (mep_legitimate_constant_p): New.
3261         * config/mep/mep-protos.h: Prototype it.
3262
3263 2009-09-10  Richard Henderson  <rth@redhat.com>
3264
3265         * print-rtl.c (print_rtx): Fix JUMP_LABEL index.
3266
3267 2009-09-10  Jason Merrill  <jason@redhat.com>
3268
3269         * tree.c (chain_index): New fn.
3270         * tree.h: Declare it.
3271
3272 2009-09-10  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3273
3274         * config/sol2-c.c (cmn_err_length_specs): Initialize
3275         scalar_identity_flag.
3276
3277 2009-09-10  Richard Henderson  <rth@redhat.com>
3278
3279         * tree.h (struct tree_decl_common): Move align member earlier;
3280         move label_decl_uid member ...
3281         (struct tree_label_decl): ... here.
3282         (LABEL_DECL_UID): Update to match.
3283
3284         * tree-cfg.c (dump_function_to_file): Dump eh tree with TDF_EH,
3285         not TDF_DETAILS.
3286
3287         * tree-cfg.c (gimple_redirect_edge_and_branch): Do
3288         gimple_try_redirect_by_replacing_jump test after no-op and EH tests.
3289
3290         * tree-cfg.c (split_edge_bb_loc): Don't disallow placement at
3291         dest_prev if the edge is complex.
3292
3293         * tree-cfg.c (is_ctrl_stmt): Use a switch.
3294
3295         * tree-cfg.c (gimple_can_merge_blocks_p): Move label and
3296         loop latch tests earlier.
3297
3298         * gimple-iterator.c (gimple_find_edge_insert_loc): Insert
3299         before GIMPLE_RETURN, not after its predecessor; insert
3300         before GIMPLE_RESX.
3301
3302         * gimple-iterator.c (gimple_find_edge_insert_loc): Use
3303         gimple_seq_empty_p to test for no PHI nodes.
3304         * tree-cfg.c (split_critical_edges): Likewise.
3305
3306         * c-common.h (c_dialect_cxx, c_dialect_objc): Boolify.
3307
3308 2009-09-10  Hariharan Sandanagobalane  <hariharan@picochip.com>
3309
3310         * final.c (shorten_branches) : Ignore DEBUG_INSN_P instructions
3311         introduced by the VTA branch merge.
3312
3313 2009-09-10  Uros Bizjak  <ubizjak@gmail.com>
3314
3315         * ira-conflicts.c: Use fputs or putc instead of fprintf
3316         where appropriate.
3317         * cfg.c: Ditto.
3318         * toplev.c: Ditto.
3319         * tree-switch-conversion.c: Ditto.
3320
3321 2009-09-10  Hariharan Sandanagobalane  <hariharan@picochip.com>
3322
3323         * config/picochip/picochip.c : Ignore DEBUG_INSN_P instructions
3324         introduced by the VTA branch merge.
3325
3326 2009-09-10  Uros Bizjak  <ubizjak@gmail.com>
3327
3328         Revert:
3329         2009-09-09  Uros Bizjak  <ubizjak@gmail.com>
3330
3331         PR rtl-optimization/39779
3332         * expr.c (convert_modes): Return when mode == oldmode after
3333         CONST_INTs are processed.
3334
3335 2009-09-10  Nick Clifton  <nickc@redhat.com>
3336
3337         * config/mep/mep.c (mep_encode_section_info): Copy weakness
3338         attribute and referring decl when creating renamed symbol.
3339
3340 2009-09-10  Richard Guenther  <rguenther@suse.de>
3341
3342         PR middle-end/41257
3343         * cgraphunit.c (cgraph_emit_thunks): Emit thunks only for
3344         reachable nodes.
3345         (cgraph_finalize_compilation_unit): Compute reachability
3346         before emitting thunks.  Properly process aliases before
3347         possibly removing unreachable nodes.
3348
3349 2009-09-10  Richard Guenther  <rguenther@suse.de>
3350
3351         PR middle-end/41254
3352         * tree.c (struct free_lang_data_d): Add worklist member.
3353         (find_decls_types_r): Push onto the worklist instead of recursing.
3354         Handle TREE_BINFOs properly.
3355         (find_decls_types): New function wrapped around find_decls_types_r
3356         to process the worklist.
3357         (find_decls_types_in_eh_region): Use it.
3358         (find_decls_types_in_node): Likewise.
3359         (find_decls_types_in_var): Likewise.
3360         (free_lang_data_in_cgraph): Likewise.  Free the worklist.
3361         * tree.h (RECORD_OR_UNION_TYPE_P): New.
3362         (AGGREGATE_TYPE_P): Adjust.
3363
3364 2009-09-09  Jason Merrill  <jason@redhat.com>
3365
3366         * configure.ac: Check glibc version even if we have an in-tree
3367         assembler.
3368
3369 2009-09-09  Anthony Green  <green@moxielogic.com>
3370
3371         * config/moxie/moxie.md (*movsi, *movhi, *movqi): Use xor to load
3372         the constant 0 when appropriate.
3373         * config/moxie/constraints.md: Add constraint O.
3374
3375         * config/moxie/moxie.c (moxie_setup_incoming_varargs): Adjust
3376         to pass up to 6 32-bit argument values in registers.
3377         (moxie_function_arg): Ditto.
3378         (moxie_arg_partial_bytes): Ditto.
3379         * config/moxie/moxie.h (FUNCTION_ARG_ADVANCE): Ditto.
3380         (REG_PARM_STACK_SPACE): Ditto.
3381         (FUNCTION_ARG_REGNO_P): Ditto.
3382
3383         * config/moxie/moxie.c (moxie_expand_prologue): Use dec
3384         instruction to allocate stack space.
3385
3386 2009-09-09  Segher Boessenkool  <segher@kernel.crashing.org>
3387
3388         * config/rs6000/rs6000.md (bswapdi2_64bit): Fix
3389         unnecessarily stringent constraints.  Fix address
3390         calculation in the splitters.
3391
3392 2009-09-09  Uros Bizjak  <ubizjak@gmail.com>
3393
3394         PR rtl-optimization/39779
3395         * expr.c (convert_modes): Return when mode == oldmode after
3396         CONST_INTs are processed.
3397
3398 2009-09-09  Kai Tietz  <kai.tietz@onevision.com>
3399
3400         PR/41315
3401         * config/i386.c (ix86_can_use_return_insn_p): Check for padding0, too.
3402         (ix86_expand_prologue): Take frame.padding0 into logic of
3403         to_allocate checks.
3404         (ix86_expand_epilogue): Likewise.
3405
3406 2009-09-09  Jakub Jelinek  <jakub@redhat.com>
3407
3408         * config/t-slibgcc-elf-ver (SHLIB_MAKE_SOLINK, SHLIB_INSTALL_SOLINK):
3409         New variables.
3410         (SHLIB_LINK, SHLIB_INSTALL): Use them.
3411         * config/t-slibgcc-libgcc: New file.
3412         * config.gcc (powerpc*-*-linux*, powerpc*-*-gnu*): Use it.
3413
3414 2009-09-09  Martin Jambor  <mjambor@suse.cz>
3415
3416         PR tree-optimization/41089
3417         * tree-sra.c (find_var_candidates): Do not consider va_lists in
3418         early SRA.
3419
3420 2009-09-09  Richard Henderson  <rth@redhat.com>
3421
3422         * gimple.h (CASE_GIMPLE_OMP): New.
3423         (is_gimple_omp): Use it.
3424         * tree-cfg.c (is_ctrl_altering_stmt): Likewise.
3425         (verify_gimple_debug): Likewise.
3426
3427 2009-09-09  Richard Guenther  <rguenther@suse.de>
3428
3429         PR tree-optimization/41101
3430         * tree-ssa-pre.c (maximal_set): Remove.
3431         (compute_antic_aux): Treat the maximal set as implicitly all ones.
3432         Defer all blocks we didn't visit at least one successor.
3433         (add_to_exp_gen): Do not add to the maximal set.
3434         (make_values_for_phi): Likewise.
3435         (compute_avail): Likewise.
3436         (init_pre): Do not allocate the maximal set.
3437         (execute_pre): Do not dump it.
3438
3439 2009-09-09  Martin Jambor  <mjambor@suse.cz>
3440
3441         * tree-cfg.c (verify_gimple_phi): Check that gimple_phi_result is
3442         an SSA_NAME rather than a is_gimple_variable.
3443
3444 2009-09-09  Richard Guenther  <rguenther@suse.de>
3445
3446         PR middle-end/41317
3447         * tree-ssa-ccp.c (maybe_fold_offset_to_component_ref): Remove
3448         code dealing with plain pointer bases.
3449         (maybe_fold_offset_to_reference): Likewise.
3450         (maybe_fold_stmt_addition): Adjust.
3451
3452 2009-09-09  Richard Guenther  <rguenther@suse.de>
3453
3454         * tree.c (free_lang_data_in_type): Do not free the type variant
3455         chains.
3456         (free_lang_data): Merge char_type_node with its properly signed
3457         variant.
3458         (pass_ipa_free): Collect after freeing language specific data.
3459
3460 2009-09-09  Michael Matz  <matz@suse.de>
3461
3462         PR middle-end/41268
3463         * cfgexpand.c (expand_gimple_stmt_1): Use an int for storing
3464         SUBREG_PROMOTED_UNSIGNED_P, instead of a bool.
3465         * rtl.h (struct rtx, SUBREG_PROMOTED_UNSIGNED_P): Update comments
3466         to reflect reality.
3467
3468 2009-09-08  DJ Delorie  <dj@redhat.com>
3469
3470         * config/mep/mep.c (conversions[]): Add "ml" pattern.
3471
3472 2009-09-04  Jason Merrill  <jason@redhat.com>
3473
3474         * tree.c (tree_find_value): Remove.
3475         * tree.h: Remove prototype.
3476         * varasm.c (assemble_external): Use value_member instead.
3477
3478 2009-09-08  Alexandre Oliva  <aoliva@redhat.com>
3479
3480         * toplev.c (process_options): Choose default debugging type when
3481         gtoggle enables debug info and type is unset.
3482
3483 2009-09-08  Alexandre Oliva  <aoliva@redhat.com>
3484
3485         PR debug/41276
3486         PR debug/41307
3487         * cselib.c (cselib_expand_value_rtx_1): Don't return copy of
3488         invalid subreg.
3489
3490 2009-09-08  Alexandre Oliva  <aoliva@redhat.com>
3491
3492         * configure: Rebuilt with modified libtool.m4.
3493
3494 2009-09-08  Alexandre Oliva  <aoliva@redhat.com>
3495
3496         PR debug/41229
3497         PR debug/41291
3498         PR debug/41300
3499         * tree-ssa.c (execute_update_addresses_taken): Update debug insns.
3500
3501 2009-09-08  Alexandre Oliva  <aoliva@redhat.com>
3502
3503         * tree-ssa-loop-ivopts.c (get_phi_with_result): Remove.
3504         (remove_statement): Likewise.
3505         (rewrite_use_nonlinear_expr): Adjust.
3506         (remove_unused_ivs): Collect SSA NAMEs to remove and call...
3507         * tree-ssa.c (release_defs_bitset): ... this.  New.
3508         * tree-flow.h (release_defs_bitset): Declare.
3509
3510 2009-09-08  Alexandre Oliva  <aoliva@redhat.com>
3511
3512         PR debug/41232
3513         * tree-ssa-phiopt.c (minmax_replacement): Skip debug stmts
3514         in the middle block.
3515
3516 2009-09-08  Kai Tietz  <kai.tietz@onevision.com>
3517
3518         * tree-ssa-reassoc.c (find_operand_rank): Cast pointer
3519         via intptr_t to long type.
3520         (insert_operand_rank): Cast long type via intptr_t to
3521         pointer type.
3522         * genattrtab.c (RTL_HASH): Use intptr_t to cast from
3523         pointer to scalar.
3524         * c-pretty-print.c (pp_c_tree_decl_identifier): Cast
3525         from pointer to unsigned via uintptr_t.
3526
3527         * configure.ac (GCC_STDINT_TYPES): Initialize intptr_t,
3528         uintptr_t, HAVE_INTTYPES_H, HAVE_STDINT_H, HAVE_UINTPTR_T,
3529         and HAVE_INTPTR_T.
3530         * configure: Regenerated.
3531         * config.in: Regenerated
3532         * system.h (stdint.h): Add include.
3533         (inttypes.h): Likewise.
3534         * Makefile.in (aclocal): Add config/stdint.m4.
3535         * aclocal.m4: Regenerated.
3536
3537 2009-09-08  Bernd Schmidt  <bernd.schmidt@analog.com>
3538
3539         * config/bfin/bfin.c (np_check_regno, np_after_branch): New static
3540         variables.
3541         (note_np_check_stores): New function.
3542         (harmless_null_pointer_p): New function.
3543         (trapping_loads_p): New args NP_REG and AFTER_NP_BRANCH.  Callers
3544         changed.  Take into account whether we're in the shadow of a condjump
3545         that tested NP_REG for NULL.
3546         Lose all code that tested for SEQUENCEs.
3547         (workaround_speculation): Avoid inserting NOPs for loads that are
3548         either always executed or a NULL pointer.
3549
3550 2009-09-08  Jan Hubicka  <jh@suse.cz>
3551
3552         * doc/invoke.texi (early-inlining-insns): Reduce from 12 to 8.
3553         * params.def (early-inlining-insns): Likewise.
3554
3555 2009-09-08  Jakub Jelinek  <jakub@redhat.com>
3556
3557         PR rtl-optimization/41239
3558         * sched-int.h (struct deps): Add last_function_call_may_noreturn field.
3559         * sched-rgn.c (deps_join): Join also last_function_call_may_noreturn
3560         lists.
3561         * sched-deps.c (sched_analyze_insn): Prevent moving trapping insns
3562         across calls, as the calls might not always return normally.
3563         (call_may_noreturn_p): New function.
3564         (deps_analyze_insn): Update last_function_call_may_noreturn list.
3565         (init_deps): Initialize it.
3566         (remove_from_deps): Also remove calls from
3567         last_function_call_may_noreturn list.
3568
3569 2009-09-07  Richard Henderson  <rth@redhat.com>
3570
3571         * tree-ssa-sccvn.c (vn_reference_lookup_3): Don't assume there are
3572         more VR->OPERANDS than LHS operands.  Free LHS before returning.
3573
3574 2009-09-07  Bernd Schmidt  <bernd.schmidt@analog.com>
3575
3576         * config/bfin/bfin.md (UNSPEC_VOLATILE_STALL): New constant.
3577         (attr "addrtype"): New member "spreg".
3578         Use it if mem_spfp_address_operand is true for the address.
3579         (attr "type"): New entry "stall".
3580         (cpu_unit "load"): New.
3581         (insn_reservations "load32", "loadp", "loadi"): Add reservation of
3582         "load".
3583         (insn_reservation "loadsp"): New.
3584         (insn_reservation "load_stall1"): New.
3585         (insn_reservation "load_stall3"): New.
3586         (stall): New insn.
3587         * config/bfin/predicates.md (const1_operand, const3_operand): New.
3588         (mem_p_address_operand): Exclude stack and frame pointer based
3589         addresses.
3590         (mem_spfp_address_operand): New; match them here.
3591         * config/bfin/bfin.c (add_sched_insns_for_speculation): New function.
3592         (bfin_reorg): Call it if scheduling insns.
3593         (bfin_gen_bundles): Remove dummy insns created by
3594         add_sched_insns_for_speculation.
3595
3596         From Jie Zhang <jie.zhang@analog.com>:
3597         * config/bfin/bfin-protos.h (enum bfin_cpu_type, bfin_cpu_type,
3598         bfin_si_revision, bfin_workarounds): Move these ...
3599         * config/bfin/bfin.h: ... here.
3600
3601         From Mike Frysinger  <michael.frysinger@analog.com>
3602         * config/bfin/bfin-protos.h (bfin_cpu_type): Add BFIN_CPU_BF542M,
3603         BFIN_CPU_BF544M, BFIN_CPU_BF547M, BFIN_CPU_BF548M, and BFIN_CPU_BF549M.
3604         * config/bfin/bfin.c (bfin_cpus[]): Add 0.3 for bf542m, bf544m,
3605         bf547m, bf548m, and bf549m.
3606         * config/bfin/bfin.h (TARGET_CPU_CPP_BUILTINS): Define __ADSPBF542M__
3607         for BFIN_CPU_BF542M, __ADSPBF544M__ for BFIN_CPU_BF544M,
3608         __ADSPBF547M__ for BFIN_CPU_BF547M, __ADSPBF548M__ for
3609         BFIN_CPU_BF548M, and __ADSPBF549M__ for BFIN_CPU_BF549M.
3610         * config/bfin/t-bfin-elf (MULTILIB_MATCHES): Select bf532-none for
3611         bf542m-none, bf544m-none, bf547m-none, bf548m-none, and bf549m-none.
3612         * config/bfin/t-bfin-linux (MULTILIB_MATCHES): Likewise.
3613         * config/bfin/t-bfin-uclinux (MULTILIB_MATCHES): Likewise.
3614         * doc/invoke.texi (Blackfin Options): Document that -mcpu now accepts
3615         bf542m, bf544m, bf547m, bf548m, and bf549m.
3616
3617         From Jie Zhang <jie.zhang@analog.com>:
3618         * config/bfin/predicates.md (p_register_operand): New predicate.
3619         (dp_register_operand): New predicate.
3620         * config/bfin/bfin-protos.h (WA_05000074): Define.
3621         (ENABLE_WA_05000074): Define.
3622         * config/bfin/bfin.c (bfin_cpus[]): Add WA_05000074 for all cpus.
3623         (bfin_gen_bundles): Put dsp32shiftimm instruction in slot[0].
3624         * config/bfin/bfin.md (define_attr type): Add dsp32shiftimm.
3625         (define_attr addrtype): Allow load/store register to be P register.
3626         (define_attr storereg): New.
3627         (define_cpu_unit anomaly_05000074): New.
3628         (define_insn_reservation dsp32shiftimm): New.
3629         (define_insn_reservation dsp32shiftimm_anomaly_05000074): New.
3630         (define_insn_reservation loadp): Cannot use slot2.
3631         (define_insn_reservation loadsp): Cannot use slot2.
3632         (define_insn_reservation storep): Cannot use slot2. Does not
3633         apply when working around 05000074.
3634         (define_insn_reservation storep_anomaly_05000074): New.
3635         (define_insn_reservation storei): Does not apply when working
3636         around 05000074.
3637         (define_insn_reservation storei_anomaly_05000074): New.
3638         (define_attr length): Add dsp32shiftimm case.
3639         (define_insn movsi_insn32, movsi_insv, ashlsi3_insn, ashrsi3,
3640         ror_one, rol_one, lshrsi3, lshrpdi3, ashrpdi3, movhiv2hi_low,
3641         movhiv2hi_high, composev2hi, packv2hi, movv2hi_hi,
3642         ssashiftv2hi3, ssashifthi3, ssashiftsi3, lshiftv2hi3, lshifthi3):
3643         Set type as dsp32shiftimm for dsp32shiftimm alternatives.
3644
3645 2009-09-07  Martin Jambor  <mjambor@suse.cz>
3646
3647         PR middle-end/41282
3648         * tree-sra.c (create_artificial_child_access): Return NULL if
3649         build_ref_for_offset fails.
3650         (propagate_subacesses_accross_link): Allow build_ref_for_offset
3651         and create_artificial_child_access to fail.
3652
3653 2009-09-06  Dmitry Gorbachev  <d.g.gorbachev@gmail.com>
3654
3655         PR c++/41214
3656         * unwind-dw2.c (uw_init_context_1): Mark noinline.
3657         * config/ia64/unwind-ia64.c (uw_init_context_1): Likewise.
3658         * config/xtensa/unwind-dw2-xtensa.c (uw_init_context_1): Likewise.
3659
3660 2009-09-07  Bernd Schmidt  <bernd.schmidt@analog.com>
3661
3662         * config/bfin/bfin.c (bfin_optimize_loop): When creating a new basic
3663         block, ensure it has an exit edge.  Emit a barrier after a jump.
3664
3665 2009-09-07  Nick Clifton  <nickc@redhat.com>
3666
3667         * gcc.c (this_is_linker_script): New variable.  Like
3668         this_is_library_file but for the %T constructor.
3669         (end_going_arg): If this_is_linker_script is set then locate the
3670         script and insert a --script switch before it
3671         (do_spec_2): Initialise this_is_linker_script.
3672         (do_spec_1): Likewise.  Handle %T construct.
3673         (eval_spec_function): Preserve this_is_linker_script.
3674         * doc/invoke.texi: Document %T construct in spec files.
3675         * config/m32c/m32c.h (LIB_SPEC): Use it.
3676
3677 2009-09-07  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
3678
3679         * rtl.h (PREFETCH_SCHEDULE_BARRIER_P): New macro.
3680         * sched-deps.c (sched_analyze_2): Make prefetches a hard barrier
3681         when volatile flag is set.
3682         * doc/rtl.texi (PREFETCH_SCHEDULE_BARRIER_P): Add documentation pieces.
3683
3684 2009-09-06  Eric Botcazou  <ebotcazou@adacore.com>
3685
3686         PR bootstrap/41241
3687         * combine-stack-adj.c (try_apply_stack_adjustment): Handle stores.
3688         (combine_stack_adjustments_for_block): Allow insns between stack
3689         adjustments and stores with corresponding pre-(dec|inc)rement or
3690         pre-modify operation.
3691
3692 2009-09-06  Jakub Jelinek  <jakub@redhat.com>
3693
3694         PR bootstrap/41241
3695         * combine-stack-adj.c (struct csa_memlist): Rename to...
3696         (struct csa_reflist): ... this.  Rename mem field to ref.
3697         (free_csa_memlist): Rename to...
3698         (free_csa_reflist): ... this.
3699         (record_one_stack_memref): Rename to...
3700         (record_one_stack_ref): ... this.  Handle also REG_P.
3701         (try_apply_stack_adjustment): Handle also REG_P.
3702         (struct record_stack_memrefs_data): Rename to...
3703         (struct record_stack_refs_data): ... this.  Rename memlist field to
3704         reflist.
3705         (record_stack_memrefs): Rename to...
3706         (record_stack_refs): ... this.  For DEBUG_INSNs keep traversing
3707         subexpressions instead of failing when a MEM contains SP references.
3708         For SP itself in DEBUG_INSNs queue it also onto reflist chain.
3709         (combine_stack_adjustments_for_block): Adjust for mem to ref renaming.
3710
3711 2009-09-06  Richard Guenther  <rguenther@suse.de>
3712
3713         PR middle-end/41144
3714         * tree.c (build_array_type): Do not record types marked
3715         with structural equality in the canonical type hashtable.
3716
3717 2009-09-06  Richard Guenther  <rguenther@suse.de>
3718
3719         PR middle-end/41261
3720         * tree-ssa-alias.c (refs_may_alias_p_1): Bail out for function decls.
3721
3722 2009-09-05  Richard Guenther  <rguenther@suse.de>
3723
3724         PR middle-end/41181
3725         * tree-ssa-ccp.c (maybe_fold_stmt_addition): Use the correct type.
3726
3727 2009-09-05  Richard Guenther  <rguenther@suse.de>
3728
3729         PR debug/41273
3730         * tree-ssa-operands.c (get_tmr_operands): Pass through opf_no_vops.
3731
3732 2009-09-05  Richard Guenther  <rguenther@suse.de>
3733
3734         PR middle-end/41271
3735         * tree-ssa.c (useless_type_conversion_p): Drop qualifiers
3736         before comparing function argument types.
3737
3738 2009-09-05  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3739
3740         PR target/41024
3741         * config/i386/mingw-w64.h (ASM_SPEC): Pass -v instead of -V to
3742         the assembler.
3743
3744 2009-09-04  Uros Bizjak  <ubizjak@gmail.com>
3745
3746         Revert:
3747         2009-08-18  Uros Bizjak  <ubizjak@gmail.com>
3748
3749         * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Allocate insn
3750         locators before emit_insn is called.
3751
3752 2009-09-04  Vladimir Makarov  <vmakarov@redhat.com>
3753
3754         PR bootstrap/41241
3755         * ira.c (update_equiv_reg): Revert my previous patch for the PR.
3756         * reginfo.c (resize_reg_info): Call allocate_reg_info if necessary.
3757         (reginfo_init): Don't call allocate_reg_info.
3758
3759 2009-09-04  Uros Bizjak  <ubizjak@gmail.com>
3760
3761         PR target/41262
3762         * config/alpha/alpha.c (alpha_does_function_need_gp): Use
3763         NONDEBUG_INSN_P instead of INSN_P.
3764
3765 2009-09-04  Alexandre Oliva  <aoliva@redhat.com>
3766
3767         PR debug/41225
3768         * tree-vect-stmts.c (vect_stmt_relevant_p): Skip debug uses.
3769
3770 2009-09-04  Alexandre Oliva  <aoliva@redhat.com>
3771
3772         PR target/41252
3773         * config/arm/vfp.md (*cmpdf_split_vfp): Fix src mode in the second
3774         pattern of the split.
3775
3776 2009-09-04  Alexandre Oliva  <aoliva@redhat.com>
3777
3778         * toplev.c (process_options): Move setter of flag_var_tracking
3779         before other tests that depend on it.  Move down setter of
3780         flag_rename_registers.  Don't enable var-tracking-assignments
3781         by default if selective scheduling is enabled.  Warn if both
3782         are enabled.
3783
3784 2009-09-04  Alexandre Oliva  <aoliva@redhat.com>
3785
3786         * var-tracking.c (dv_is_decl_p): Adjust NULL behavior to match
3787         comment.  Use switch statement to catch overlaps between rtx
3788         and tree codes.  Accept FUNCTION_DECLs in addition to those in...
3789         (IS_DECL_CODE): ... here. Remove.
3790         (check_value_is_not_decl): Remove.
3791         (dv_from_decl, dv_from_value): Check after conversion.
3792
3793 2009-09-04  Richard Guenther  <rguenther@suse.de>
3794
3795         PR middle-end/41257
3796         * (cgraph_finalize_compilation_unit): Move finalizing aliases
3797         after emitting tunks.  Move emitting thunks and ctors from ...
3798         (cgraph_optimize): ... here.  Remove redundant
3799         cgraph_analyze_functions.
3800         * varasm.c (find_decl_and_mark_needed): Remove no longer
3801         necessary check.
3802         (finish_aliases_1): Adjust check for thunk aliases.
3803
3804 2009-09-04  Daniel Gutson  <dgutson@codesourcery.com>
3805
3806         * config/arm/arm.md (ctzsi2): Added braces
3807         to avoid warning that broke booststrap.
3808
3809 2009-09-04  Martin Jambor  <mjambor@suse.cz>
3810
3811         PR tree-optimization/41112
3812         * tree-sra.c (build_ref_for_offset_1): Signal that we cannot
3813         handle variable-bounded arrays.
3814         (expr_with_var_bounded_array_refs_p): New function.
3815         (analyze_access_subtree): Call expr_with_var_bounded_array_refs_p.
3816
3817 2009-09-04  Wolfgang Gellerich  <gellerich@de.ibm.com>
3818
3819         * config/s390/2097.md: Removed two incorrect bypasses.
3820         (z10_fsimpdf): Fixed latency.
3821         (z10_fhex): New insn_reservation.
3822         (z10_floaddf): Fixed latency.
3823         (z10_floadsf): Fixed latency.
3824         (z10_ftrunctf): Fixed latency.
3825         (z10_ftruncdf): Fixed latency.
3826         * config/s390/s390.c (z10_cost): Fixed values.
3827         (s390_adjust_priority): Added z10 path.
3828         * config/s390/s390.md (type): Added fhex.
3829         (*mov<mode>_64dfp): Updated type attribute.
3830         (*mov<mode>_64): Updated type attribute.
3831         (*mov<mode>_31): Updated type attribute.
3832         (*mov<mode>"): Likewise.
3833         * config/s390/2084.md (x_fsimpdf): Updated condition.
3834
3835 2009-09-04  Andreas Krebbel  <krebbel1@de.ibm.com>
3836
3837         * config/s390/s390.md ("*fmadd<mode>", "*fmsub<mode>"): Enable mem
3838         RTXs in the predicate for operand 1.
3839
3840 2009-09-03  Daniel Gutson  <dgutson@codesourcery.com>
3841
3842         * config/arm/arm.md (UNSPEC_RBIT): New constant.
3843         (rbitsi2): New insn.
3844         (ctzsi2): New expand.
3845         * config/arm/arm.h (CTZ_DEFINED_VALUE_AT_ZERO): New macro.
3846
3847 2009-09-03  Martin Jambor  <mjambor@suse.cz>
3848
3849         * tree-sra.c (duplicate_expr_for_different_base): Removed.
3850         (create_artificial_child_access): Use build_ref_for_offset instead
3851         of duplicate_expr_for_different_base.
3852         (propagate_subacesses_accross_link): Likewise.
3853
3854 2009-09-03  Richard Sandiford  <rdsandiford@googlemail.com>
3855
3856         * config/mips/mips.c (USEFUL_INSN_P): Use NONDEBUG_INSN_P instead
3857         of INSN_P.
3858         (mips16e_collect_argument_saves): Skip debug instructions.
3859         (mips_74k_agen_init): Use CALL_P || JUMP_P instead of !NONJUMP_INSN_P.
3860         (mips16_lay_out_constants): Use USEFUL_INSN_P instead of INSN_P.
3861         (r10k_insert_cache_barriers): Likewise.
3862         (mips_reorg_process_insns): Likewise.
3863
3864 2009-09-03  Vladimir Makarov  <vmakarov@redhat.com>
3865
3866         PR bootstrap/41241
3867         * ira.c (update_equiv_reg): Remove check on class likely spill.
3868
3869 2009-09-03  Jakub Jelinek  <jakub@redhat.com>
3870
3871         PR debug/41236
3872         * dwarf2out.c (loc_descriptor): Don't use SUBREG_REG macro on
3873         SIGN_EXTEND or ZERO_EXTEND.  Don't assume there is a REG inside of
3874         it or SUBREG.
3875
3876         PR debug/41238
3877         * function.c (assign_parm_find_stack_rtl): Don't set mem attributes on
3878         the stack slot if it is passed by invisible reference.
3879         * var-tracking.c (vt_add_function_parameters): Handle arguments passed
3880         by invisible reference.
3881
3882 2009-09-03  Bernd Schmidt  <bernd.schmidt@analog.com>
3883
3884         * config/bfin/linux.h (TARGET_SUPPORTS_SYNC_CALLS): Define to 1.
3885         * config/bfin/uclinux.h (TARGET_SUPPORTS_SYNC_CALLS): Define to 1.
3886         * config/bfin/bfin.h (TARGET_SUPPORTS_SYNC_CALLS): Provide default of
3887         0.
3888         * config/bfin/sync.md: New file.
3889         * config/bfin/bfin.md: Include it.
3890         (UNSPEC_ATOMIC): New.
3891         (UNSPEC_ONES): Provide a unique number.
3892
3893         From Jie Zhang <jie.zhang@analog.com>:
3894         * config/bfin/bfin.c (ret_regs): New.
3895         (must_save_fp_p): Don't return true because of frame_pointer_needed.
3896         (must_save_rets_p): New.
3897         (n_regs_saved_by_prologue): Use must_save_rets_p instead of
3898         current_function_is_leaf.
3899         (do_link): Likewise.
3900         (do_unlink): Likewise.
3901         (expand_interrupt_handler_prologue): Use ret_regs array.
3902         (expand_interrupt_handler_epilogue): Use ret_regs array and
3903         pass return register to gen_return_internal.
3904         (bfin_expand_epilogue): Pass return register to
3905         gen_return_internal.
3906         (bfin_expand_call): Explicitly clobber RETS.
3907         * config/bfin/bfin.h (FUNCTION_RETURN_REGISTERS): Define.
3908         * config/bfin/bfin.md (call_symbol_fdpic, call_value_symbol_fdpic,
3909         call_insn_fdpic, call_value_insn_fdpic, call_symbol,
3910         call_value_symbol, call_insn, call_value_insn): Explicitly clobber
3911         RETS.
3912         (return_internal): Take a reg rtx rather than the register number.
3913
3914 2009-09-03  H.J. Lu  <hongjiu.lu@intel.com>
3915
3916         * tree-parloops.c (parallelize_loops): Cast to HOST_WIDE_INT
3917         when comparing against estimated_loop_iterations_int return.
3918
3919 2009-09-03  Richard Guenther  <rguenther@suse.de>
3920
3921         * dwarf2out.c (dwarf2out_do_cfi_asm): Remove check of
3922         eh_personality_libfunc.
3923
3924 2009-09-03  Razya Ladelsky  <razya@il.ibm.com>
3925
3926         * tree-parloops.c (separate_decls_in_region): Add space.
3927
3928 2009-09-03  Razya Ladelsky  <razya@il.ibm.com>
3929
3930         * tree-parloops.c (separate_decls_in_region): Change the condition
3931         checking if there are reductions in the loop.
3932
3933 2009-09-03  Razya Ladelsky  <razya@il.ibm.com>
3934
3935         PR tree-optimization/38275
3936         * tree-parloops.c (parallelize_loops): Replace profitability condition
3937         for expected number of iterations.
3938
3939 2009-09-03  Alexandre Oliva  <aoliva@redhat.com>
3940
3941         * doc/invoke.texi (BUILD_CONFIG): Document --with-build-config.
3942         (bootstrap-debug): Explain conditions in which it becomes default.
3943         (bootstrap-debug-big): Rather than duplicate bootstrap-debug,
3944         make it add to it.
3945
3946 2009-09-03  Namhyung Kim  <namhyung@gmail.com>
3947
3948         * doc/invoke.texi (Optimize Options): Move
3949         -finline-small-functions to the -O2 list.
3950
3951 2009-09-03  Alexandre Oliva  <aoliva@redhat.com>
3952
3953         * toplev.c (process_options): Enable var-tracking-assignments
3954         by default if var-tracking is enabled.
3955
3956 2009-09-02  David Daney  <ddaney@caviumnetworks.com>
3957
3958         * cfgbuild.c (find_bb_boundaries): Split blocks containing a
3959         barrier.
3960         * emit-rtl.c (prev_nonnote_insn_bb): New function.
3961         * rtl.h (prev_nonnote_insn_bb): Declare it.