OSDN Git Service

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