OSDN Git Service

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