OSDN Git Service

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