OSDN Git Service

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