OSDN Git Service

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