OSDN Git Service

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