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