OSDN Git Service

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