OSDN Git Service

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