OSDN Git Service

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