OSDN Git Service

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