OSDN Git Service

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