OSDN Git Service

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