1 2009-11-03 Uros Bizjak <ubizjak@gmail.com>
3 * config/i386/i386.md (*call_value_1_rex64_ms_sysv): Use register
4 names instead of numerical constants.
5 (sse_prologue_save): Ditto.
6 (*sse_prologue_save_insn): Ditto.
8 2009-11-03 Uros Bizjak <ubizjak@gmail.com>
11 * config/i386/i386.h (ix86_arch_indices) <X86_ARCH_CALL_ESP>: New.
12 (TARGET_CALL_ESP): New define.
13 * config/i386/i386.c (initial_ix86_tune_features): Initialize
15 * config/i386/i386.md (*call_pop_1_esp, *call_1_esp,
16 *call_value_pop_1_esp, *call_value_1_esp): Rename from *call_pop_1,
17 *call_1, *call_value_pop_1 and *call_value_1. Depend on
19 (*call_pop_1, *call_1, *call_value_pop_1, *call_value_1):
20 New patterns, use "lsm" as operand 1 constraint.
21 * config/i386/predicates.md (call_insn_operand): Depend on
22 index_register_operand for !TARGET_CALL_ESP to avoid %esp register.
24 2009-11-02 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
26 PR tree-optimization/41857
27 * tree-flow.h (rewrite_use_address): Add BASE_HINT argument.
28 * tree-ssa-loop-ivopts.c (rewrite_use_address): Pass base hint
30 * tree-ssa-address.c (move_hint_to_base): New function.
31 (most_expensive_mult_to_index): Add TYPE argument. Use mode and
32 address space associated with TYPE.
33 (addr_to_parts): Add TYPE and BASE_HINT arguments. Pass TYPE to
34 most_expensive_mult_to_index. Call move_hint_to_base.
35 (create_mem_ref): Add BASE_HINT argument. Pass BASE_HINT and
36 TYPE to addr_to_parts.
38 2009-11-02 Martin Jambor <mjambor@suse.cz>
40 PR tree-optimization/41750
41 * tree-sra.c (analyze_modified_params): Loop over all
42 representatives of components of a parameter.
44 2009-11-02 Jakub Jelinek <jakub@redhat.com>
46 PR tree-optimization/41841
47 * ipa-struct-reorg.c (build_data_structure): Don't attempt to look at
48 local variables of not yet materialized clones.
51 * cfgexpand.c (expand_debug_expr): Don't attempt to create DECL_RTL
52 for a VOIDmode variable.
55 * c-pragma.c (visstack): Change into vector of ints rather than
56 enum symbol_visibility.
57 (push_visibility): Add kind argument, push default_visibility together
59 (pop_visibility): Add kind argument, return true if successful, fail
60 if visibility stack is empty or if stack top is of different kind.
61 (handle_pragma_visibility): Don't check length of visstack, instead
62 call pop_visibility and issue diagnostics if it failed. Pass 0
63 as last argument to push_visibility and pop_visibility.
64 * c-pragma.h (push_visibility): Add kind argument.
65 (pop_visibility): Likewise. Return bool instead of void.
67 2009-11-01 Eric Botcazou <ebotcazou@adacore.com>
69 * tree.def (TARGET_MEM_REF): Update comment.
70 * alias.c (get_alias_set): Retrieve the original memory reference for
71 a TARGET_MEM_REF before proceeding.
73 2009-10-31 Anatoly Sokolov <aesok@post.ru>
75 * config/frv/frv.c (frv_function_value, frv_libcall_value,
76 frv_function_value_regno_p): New functions.
77 (TARGET_FUNCTION_VALUE, TARGET_LIBCALL_VALUE): Declare.
78 * config/frv/frv.h: (FUNCTION_VALUE, LIBCALL_VALUE): Remove.
79 (FUNCTION_VALUE_REGNO_P): Redefine, use frv_function_value_regno_p.
80 * config/frv/frv-protos.h (frv_function_value_regno_p): Declare.
82 2009-10-31 Anatoly Sokolov <aesok@post.ru>
84 * config/mn10300/mn10300.c (mn10300_function_value): Make static, add
85 new 'outgoing' argument.
86 (mn10300_libcall_value, mn10300_function_value_regno_p): New
88 (TARGET_FUNCTION_VALUE, TARGET_LIBCALL_VALUE): Declare.
89 * config/mn10300/mn10300.h: (FUNCTION_VALUE, FUNCTION_OUTGOING_VALUE,
90 LIBCALL_VALUE): Remove.
91 (FUNCTION_VALUE_REGNO_P): Redefine, use mn10300_function_value_regno_p.
92 * config/mn10300/mn10300-protos.h (mn10300_function_value): Remove.
93 (mh10300_function_value_regno_p): Declare.
95 2009-10-31 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
97 * config/arm/cortex-a9.md: New - integer pipeline description.
99 2009-10-31 Eric Botcazou <ebotcazou@adacore.com>
101 * tree-ssa-sccvn.c (vn_reference_lookup_3): Bail out instead of
102 aborting if the sizes of the two references don't match.
104 2009-10-31 Toon Moene <toon@moene.org>
106 * ipa-inline.c (cgraph_decide_inlining):
107 Include reason for not inlining called-once functions in dump file.
109 2009-10-30 Daniel Gutson <dgutson@codesourcery.com>
111 * config/arm/linux-eabi.h (LINK_SPEC): BE8_LINK_SPEC added.
112 * config/arm/bpapi.h (BE8_LINK_SPEC): New define.
113 (LINK_SPEC): BE_LINK_SPEC added.
115 2009-10-30 Richard Guenther <rguenther@suse.de>
118 * lto-streamer.h (struct lto_file_decl_data): Remove fd member.
120 2009-10-30 Nathan Sidwell <nathan@codesourcery.com>
122 * target-def.h (TARGET_ASM_TTYPE): Correct typo of TARGET_ARM_TTYPE.
123 * config/arm/unwind-arm.c (__gnu_Unwind_Backtrace): Remove unused
126 2009-10-30 Martin Jambor <mjambor@suse.cz>
128 * tree-sra.c (build_ref_for_offset_1): Remove a comment.
130 2009-10-30 H.J. Lu <hongjiu.lu@intel.com>
133 * cfgexpand.c (expand_stack_alignment): Call update_stack_boundary
134 first. Move assert on stack_alignment_estimated just before
135 setting stack_realign_needed.
136 (gimple_expand_cfg): Initialize stack_alignment_estimated to 0.
137 Don't call update_stack_boundary.
139 * config/i386/i386.c (ix86_minimum_incoming_stack_boundary): New.
140 (verride_options): Don't check ix86_force_align_arg_pointer here.
141 (ix86_function_ok_for_sibcall): Use it.
142 (ix86_update_stack_boundary): Likewise.
144 * config/i386/i386.h (STACK_REALIGN_DEFAULT): Update comments.
146 2009-10-30 Richard Earnshaw <rearnsha@arm.com>
148 * arm.md (QHSI): New mode iterator.
149 (movqi): If generating for thumb, then truncate any immediate to
151 * thumb2.md (thumb2_movsi_shortim and peephole2 generator): Replace
153 (thumb2_mov<mode>_shortim and peephole2 generator): ... iterator based
156 2009-10-29 Cary Coutant <ccoutant@google.com>
159 * dwarf2out.c (dwarf2_debug_hooks): Add entries for new hook (two
160 locations in the source).
161 (store_vcall_insn): New function.
162 (lookup_vcall_insn): New function.
163 (dwarf2out_virtual_call_token): Use store_vcall_insn.
164 (dwarf2out_copy_call_info): New function.
165 (dwarf2out_virtual_call): Use lookup_vcall_insn.
166 * emit-rtl.c (try_split): Call copy_call_info debug hook.
167 * debug.h (struct gcc_debug_hooks): Add copy_call_info hook.
168 * debug.c (do_nothing_debug_hooks): Add dummy entry for new hook.
169 (debug_nothing_rtx_rtx): New dummy hook.
170 * dbxout.c (dbx_debug_hooks): Add dummy entry for new hook.
171 (xcoff_debug_hooks): Likewise.
172 * sdbout.c (sdb_debug_hooks): Likewise.
173 * vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
175 2009-10-29 David Daney <ddaney@caviumnetworks.com>
177 * doc/invoke.texi (mmcount-ra-address): Document new command line
179 * config/mips/mips.opt (mmcount-ra-address): New option.
180 * config/mips/mips-protos.h (mips_function_profiler): Declare new
182 * config/mips/mips.c (struct mips_frame_info): Add ra_fp_offset
184 (mips_for_each_saved_gpr_and_fpr): Set ra_fp_offset.
185 (mips_function_profiler): Moved from FUNCTION_PROFILER, and
187 * config/mips/mips.h (FUNCTION_PROFILER): Body of macro moved to
188 mips_function_profiler.
190 2009-10-29 Steve Ellcey <sje@cup.hp.com>
194 * doc/tm.texi (OVERRIDE_OPTIONS): Update.
195 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): New.
196 * optc-gen.awk (cl_target_option_restore): Include call to
197 targetm.override_options_after_change.
198 * target-def.h (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): New.
199 * target.h (override_options_after_change): New.
200 * c-common.c (parse_optimize_options): Call
201 targetm.override_options_after_change.
202 * config/ia64/ia64.c (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): New.
203 (ia64_override_options_after_change): New.
204 (ia64_override_options) Add call to above.
206 2009-10-29 Michael Matz <matz@suse.de>
208 * tree-ssa-math-opts.c (execute_convert_to_rsqrt): Remove.
209 (gate_convert_to_rsqrt): Ditto.
210 (pass_convert_to_rsqrt): Ditto.
211 * tree-pass.h (pass_convert_to_rsqrt): Don't declare.
212 * passes.c (init_optimization_passes): Don't add pass_convert_to_rsqrt
215 * config/i386/i386.c (ix86_emit_swdivsf): Change evaluation order.
217 2009-10-29 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
219 * config/arm/arm.c (find_best_start): Fix type of remainder to be
222 2009-10-29 Martin Jambor <mjambor@suse.cz>
224 PR tree-optimization/41775
225 * tree-sra.c (build_ref_for_offset): Unshare *expr if not NULL.
226 (generate_subtree_copies): Do not unshare agg.
227 (load_assign_lhs_subreplacements): Do not unshare rhs.
228 (sra_modify_assign): Do not unshare exprs.
229 (propagate_subacesses_accross_link): Renamed to
230 propagate_subaccesses_across_link.
232 2009-10-29 Richard Earnshaw <rearnsha@arm.com>
234 * arm.c (count_insns_for_constant): Rework to support counting for
235 thumb2 immediates as well.
236 (find_best_start): Split out from arm_gen_constant.
237 (arm_gen_constant): Rework to support XOR with immediate.
239 2009-10-29 Chao-ying Fu <fu@mips.com>
241 * config/mips/mips.c (mips_emit_unary, mips_force_unary): New
243 (mips_expand_synci_loop): Use the length rtx to control the
244 synci loop from the begin rtx that points to the first byte of
247 2009-10-28 Rafael Avila de Espindola <espindola@google.com>
249 * doc/invoke.texi: Rename -use-linker-plugin -fuse-linker-plugin.
251 2009-10-28 Rafael Avila de Espindola <espindola@google.com>
253 * dbxout.c (dbxout_common_check): Accept non public trees.
254 * dwarf2out.c (fortran_common): Accept non public trees.
256 2009-10-28 Rafael Avila de Espindola <espindola@google.com>
258 * common.opt (fuse-linker-plugin): New option.
259 * gcc.c (LINK_COMMAND_SPEC, main): Rename use-linker-plugin to
261 * opts.c (common_handle_option): Ignore OPT_fuse_linker_plugin.
263 2009-10-28 Paolo Bonzini <bonzini@gnu.org>
265 PR rtl-optimization/39715
266 * config/arm/arm.md (cstoresi4): Use gen_cstoresi_ltu_thumb1.
267 (gen_cstoresi_ltu_thumb1): New splitter.
269 2009-10-28 Richard Guenther <rguenther@suse.de>
273 * tree-ssa.c (useless_type_conversion_p): Do not treat
274 conversions to pointers to incomplete types as useless.
275 * gimple.c (gimple_types_compatible_p): Compare struct tags,
278 2009-10-28 Jakub Jelinek <jakub@redhat.com>
280 * var-tracking.c (emit_note_insn_var_location): Don't call the second
281 vt_expand_loc unnecessarily when location is not a register nor
285 * ipa-struct-reorg.c (find_field_in_struct_1): Return NULL if
286 fields don't have DECL_NAME.
289 * builtins.c (get_builtin_sync_mem): Expand loc in ptr_mode,
290 call convert_memory_address on addr.
293 * config/i386/i386.c (ix86_pic_register_p): Don't call
294 rtx_equal_for_cselib_p for VALUEs discarded as useless.
296 2009-10-28 Richard Sandiford <rdsandiford@googlemail.com>
298 * var-tracking.c (emit_note_insn_var_location): Get the mode of
299 a variable part from its REG, MEM or VALUE.
301 2009-10-28 Richard Guenther <rguenther@suse.de>
303 * gimple.c (gimple_get_alias_set): Fix comment typo.
305 2009-10-28 Richard Guenther <rguenther@suse.de>
307 * tree.c (free_lang_data_in_type): Do not call get_alias_set.
308 (free_lang_data): Unconditionally compute alias sets for all
309 standard integer types. Bail out if gate bailed out previously.
310 Do not reset the types_compatible_p langhook.
311 (gate_free_lang_data): Remove.
312 (struct pass_ipa_free_lang_data): Enable unconditionally.
313 * gimple.c (gimple_get_alias_set): Use the same alias-set for
316 2009-10-28 Richard Guenther <rguenther@suse.de>
319 * tree-ssa-alias.c (refs_may_alias_p_1): Deal with CONST_DECLs
320 (ref_maybe_used_by_call_p_1): Fix bcopy handling.
321 (call_may_clobber_ref_p_1): Likewise.
322 * tree-ssa-structalias.c (find_func_aliases): Likewise.
323 * alias.c (nonoverlapping_memrefs_p): Deal with CONST_DECLs.
325 2009-10-28 Paolo Bonzini <bonzini@gnu.org>
327 PR rtl-optimization/41812
330 2009-06-27 Paolo Bonzini <bonzini@gnu.org>
332 * df-problems.c (df_md_scratch): New.
333 (df_md_alloc, df_md_free): Allocate/free it.
334 (df_md_local_compute): Only include live registers in init.
335 (df_md_transfer_function): Prune the in-set computed by
336 the confluence function, and the gen-set too.
338 2009-10-28 Paolo Bonzini <bonzini@gnu.org>
340 PR rtl-optimization/39715
341 * combine.c (simplify_comparison): Use extensions to
342 widen comparisons. Try an ANDing first.
344 2009-10-28 Paolo Bonzini <bonzini@gnu.org>
346 PR rtl-optimization/40741
347 * config/arm/arm.c (thumb1_rtx_costs): IOR or XOR with
348 a small constant is cheap.
349 * config/arm/arm.md (andsi3, iorsi3): Try to place the result of
350 force_reg on the LHS.
351 (xorsi3): Likewise, and split the XOR if the constant is complex
352 and not in Thumb mode.
354 2009-10-28 Paolo Bonzini <bonzini@gnu.org>
356 * expmed.c (emit_store_flag): Check costs before
357 transforming to the opposite representation.
359 2009-10-28 Paolo Bonzini <bonzini@gnu.org>
361 * config/sh/sh.md (cbranchfp4_media): Remove hack extending
362 cstore result to DImode.
364 2009-10-28 Kaz Kojima <kkojima@gcc.gnu.org>
366 * config/sh/sh.md (stuff_delay_slot): Move const_int pattern
367 inside the unspec vector.
369 2009-10-27 Richard Henderson <rth@redhat.com>
371 * cgraphunit.c (cgraph_optimize): Maintain timevar stack properly.
373 2009-10-27 Richard Henderson <rth@redhat.com>
376 * tree-eh.c (eh_region_may_contain_throw_map): Rename from
377 eh_region_may_contain_throw; update users.
378 (eh_region_may_contain_throw): New function.
379 (lower_catch): Check flag_exceptions before creating exception region.
380 (lower_eh_filter, lower_eh_must_not_throw): Likewise.
381 (lower_cleanup): Tidy existing flag_exceptions check to match.
383 2009-10-27 Kai Tietz <kai.tietz@onevision.com>
386 * config/i386/mingw32.h (CHECK_EXECUTE_STACK_ENABLED): New macro.
387 * config/i386/mingw.opt: Add fset-stack-executable.
388 * config/i386/i386.c (ix86_trampoline_init): Make call to
389 emit_library_call conditional, if CHECK_EXECUTE_STACK_ENABLED is
390 defined and its value is not zero.
393 2009-10-27 Richard Guenther <rguenther@suse.de>
395 * tree-ssa-structalias.c (find_func_aliases): In IPA mode
396 handle calls to externally visible functions like in regular mode.
397 (create_variable_info_for): Do not create function infos here.
398 (have_alias_info): Remove write-only variable.
399 (solve_constraints): New function split out from common code
400 in compute_points_to_sets and ipa_pta_execute.
401 (compute_points_to_sets): Adjust.
402 (ipa_pta_execute): Likewise. Handle clones and externally visible
403 functions like in non-IPA mode.
405 2009-10-27 Jakub Jelinek <jakub@redhat.com>
408 * c-typeck.c (convert_arguments): Return -1 if any of the arguments is
411 2009-10-27 Richard Guenther <rguenther@suse.de>
413 * tree-complex.c (expand_complex_div_wide): Check for
414 INTEGER_CST, not TREE_CONSTANT on comparison folding result.
416 2009-10-27 Revital Eres <eres@il.ibm.com>
418 PR tree-optimization/40648
419 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment):
420 Change decision of when to peel for alignment.
422 2009-10-27 Richard Guenther <rguenther@suse.de>
425 * gimple.c (gimple_types_compatible_p): Handle OFFSET_TYPE.
427 2009-10-27 Aldy Hernandez <aldyh@redhat.com>
430 * fold-const.c (fold_binary_loc): Do not call
431 protected_set_expr_location.
433 2009-10-27 Wei Guozhi <carrot@google.com>
436 * target.h (have_conditional_execution): Add a new target hook
438 * target-def.h (TARGET_HAVE_CONDITIONAL_EXECUTION): Likewise.
439 * targhooks.h (default_have_conditional_execution): Likewise.
440 * targhooks.c (default_have_conditional_execution): Likewise.
441 * doc/tm.texi (TARGET_HAVE_CONDITIONAL_EXECUTION): Document it.
442 * config/arm/arm.c (TARGET_HAVE_CONDITIONAL_EXECUTION): Define it.
443 (arm_have_conditional_execution): New function.
444 * ifcvt.c (noce_process_if_block, find_if_header,
445 cond_exec_find_if_block, dead_or_predicable): Change the usage of
446 macro HAVE_conditional_execution to a target hook call.
447 * recog.c (peephole2_optimize): Likewise.
448 * sched-rgn.c (add_branch_dependences): Likewise.
449 * final.c (asm_insn_count, final_scan_insn): Likewise.
450 * bb-reorder.c (HAVE_conditional_execution): Remove it.
452 2009-10-26 Ben Elliston <bje@au.ibm.com>
453 Michael Meissner <meissner@linux.vnet.ibm.com>
454 Ulrich Weigand <uweigand@de.ibm.com>
456 * config.gcc (spu-*-elf*): Add spu_cache.h to extra_headers.
457 * config/spu/spu_cache.h: New file.
459 * config/spu/cachemgr.c: New file.
460 * config/spu/cache.S: New file.
462 * config/spu/spu.h (ASM_OUTPUT_SYMBOL_REF): Define.
463 (ADDR_SPACE_EA): Define.
464 (TARGET_ADDR_SPACE_KEYWORDS): Define.
465 * config/spu/spu.c (EAmode): New macro.
466 (TARGET_ADDR_SPACE_POINTER_MODE): Define.
467 (TARGET_ADDR_SPACE_ADDRESS_MODE): Likewise.
468 (TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P): Likewise.
469 (TARGET_ADDR_SPACE_LEGITIMIZE_ADDRESS): Likewise.
470 (TARGET_ADDR_SPACE_SUBSET_P): Likewise.
471 (TARGET_ADDR_SPACE_CONVERT): Likewise.
472 (TARGET_ASM_SELECT_SECTION): Likewise.
473 (TARGET_ASM_UNIQUE_SECTION): Likewise.
474 (TARGET_ASM_UNALIGNED_SI_OP): Likewise.
475 (TARGET_ASM_ALIGNED_DI_OP): Likewise.
476 (ea_symbol_ref): New function.
477 (spu_legitimate_constant_p): Handle __ea qualified addresses.
478 (spu_addr_space_legitimate_address_p): New function.
479 (spu_addr_space_legitimize_address): Likewise.
480 (cache_fetch): New global.
481 (cache_fetch_dirty): Likewise.
482 (ea_alias_set): Likewise.
483 (ea_load_store): New function.
484 (ea_load_store_inline): Likewise.
485 (expand_ea_mem): Likewise.
486 (spu_expand_mov): Handle __ea qualified memory references.
487 (spu_addr_space_pointer_mode): New function.
488 (spu_addr_space_address_mode): Likewise.
489 (spu_addr_space_subset_p): Likewise.
490 (spu_addr_space_convert): Likewise.
491 (spu_section_type_flags): Handle "._ea" section.
492 (spu_select_section): New function.
493 (spu_unique_section): Likewise.
494 * config/spu/spu-c.c (spu_cpu_cpp_builtins): Support __EA32__
495 and __EA64__ predefined macros.
496 * config/spu/spu-elf.h (LIB_SPEC): Handle -mcache-size= and
497 -matomic-updates switches.
499 * config/spu/t-spu-elf (MULTILIB_OPTIONS): Define.
500 (EXTRA_MULTILIB_PARTS): Add libgcc_cachemgr.a,
501 libgcc_cachemgr_nonatomic.a, libgcc_cache8k.a, libgcc_cache16k.a,
502 libgcc_cache32k.a, libgcc_cache64k.a, libgcc_cache128k.a.
503 ($(T)cachemgr.o, $(T)cachemgr_nonatomic.o): New target.
504 ($(T)cache8k.o, $(T)cache16k.o, $(T)cache32k.o, $(T)cache64k.o,
505 $(T)cache128k.o): Likewise.
506 ($(T)libgcc_%.a): Likewise.
508 * config/spu/spu.h (TARGET_DEFAULT): Add MASK_ADDRESS_SPACE_CONVERSION.
509 * config/spu/spu.opt (-mea32/-mea64): Add switches.
510 (-maddress-space-conversion): Likewise.
511 (-mcache-size=): Likewise.
512 (-matomic-updates): Likewise.
513 * doc/invoke.texi (-mea32/-mea64): Document.
514 (-maddress-space-conversion): Likewise.
515 (-mcache-size=): Likewise.
516 (-matomic-updates): Likewise.
518 2009-10-26 Ben Elliston <bje@au.ibm.com>
519 Michael Meissner <meissner@linux.vnet.ibm.com>
520 Ulrich Weigand <uweigand@de.ibm.com>
522 * doc/tm.texi (TARGET_ADDR_SPACE_KEYWORDS): Document.
524 * c-common.c (c_common_reswords): If TARGET_ADDR_SPACE_KEYWORDS is
525 defined, add the named address space keywords.
526 (c_addr_space_name): New function.
527 (complete_array_type): Preserve named address space.
528 (handle_mode_attribute): Use targetm.addr_space.valid_pointer_mode
529 instead of targetm.valid_pointer_mode.
531 * c-common.h (enum rid): Add RID_ADDR_SPACE_0 .. RID_ADDR_SPACE_15,
532 RID_FIRST_ADDR_SPACE and RID_LAST_ADDR_SPACE.
533 (ADDR_SPACE_KEYWORD): New macro.
534 (c_addr_space_name): Add prototype.
536 * c-tree.h (struct c_declspecs): Add address_space member.
537 (declspecs_add_addrspace): Add prototype.
539 * c-pretty-print.c (pp_c_type_qualifier_list): Handle address spaces.
541 * c-parser.c (c_parse_init): Add assertion.
542 (typedef enum c_id_kind): Add C_ID_ADDRSPACE.
543 (c_lex_one_token): Handle address space keywords.
544 (c_token_starts_typename): Likewise.
545 (c_token_starts_declspecs): Likewise.
546 (c_parser_declspecs): Likewise.
547 (c_parser_postfix_expression_after_paren_type): Diagnose compound
548 literal within function qualified with named address space.
550 * c-decl.c (diagnose_mismatched_decls): Diagnose conflicting named
551 address space qualifiers.
552 (shadow_tag_warned): Warn about useless address space qualifiers.
553 (quals_from_declspecs): Handle address space qualifiers.
554 (grokdeclarator): Likewise.
555 (build_null_declspecs): Likewise.
556 (declspecs_add_addrspace): New function.
558 * c-typeck.c (addr_space_superset): New function.
559 (qualify_type): Handle named address spaces.
560 (composite_type): Likewise.
561 (common_pointer_type): Likewise.
562 (comp_target_types): Likewise.
563 (build_conditional_expr): Likewise.
564 (handle_warn_cast_qual): Likewise.
565 (build_c_cast): Likewise.
566 (convert_for_assignment): Likewise.
567 (build_binary_op): Likewise.
568 (pointer_diff): Handle named address spaces. Use intermediate
569 integer type of sufficient size if required.
571 2009-10-26 Ben Elliston <bje@au.ibm.com>
572 Michael Meissner <meissner@linux.vnet.ibm.com>
573 Ulrich Weigand <uweigand@de.ibm.com>
575 * doc/tm.texi (TARGET_ADDR_SPACE_POINTER_MODE): Document.
576 (TARGET_ADDR_SPACE_ADDRESS_MODE): Likewise.
577 (TARGET_ADDR_SPACE_VALID_POINTER_MODE): Likewise.
579 * target.h (struct target_def): Add pointer_mode, address_mode,
580 and valid_pointer_mode to addr_space substructure.
581 * target-def.h (TARGET_ADDR_SPACE_POINTER_MODE): Define.
582 (TARGET_ADDR_SPACE_ADDRESS_MODE): Likewise.
583 (TARGET_ADDR_SPACE_VALID_POINTER_MODE): Likewise.
584 (TARGET_ADDR_SPACE_HOOKS): Add them.
585 * targhooks.c (target_default_pointer_address_modes_p): New function.
586 * target.h (target_default_pointer_address_modes_p): Add prototype.
587 * targhooks.c (default_addr_space_pointer_mode): New function.
588 (default_addr_space_address_mode): Likewise.
589 (default_addr_space_valid_pointer_mode): Likewise.
590 * targhooks.h (default_addr_space_pointer_mode): Add prototype.
591 (default_addr_space_address_mode): Likewise.
592 (default_addr_space_valid_pointer_mode): Likewise.
593 * output.h (default_valid_pointer_mode): Move to ...
594 * targhooks.h (default_valid_pointer_mode): ... here.
595 * varasm.c (default_valid_pointer_mode): Move to ...
596 * targhooks.c (default_valid_pointer_mode): ... here.
598 * varasm.c (output_constant): Use targetm.addr_space.valid_pointer_mode
599 instead of targetm.valid_pointer_mode.
601 * fold-const.c (fit_double_type): Use int_or_pointer_precision.
602 * tree.c (integer_pow2p): Likewise.
603 (tree_log2): Likewise.
604 (tree_floor_log2): Likewise.
605 (signed_or_unsigned_type_for): Support pointer type of different size.
606 (int_or_pointer_precision): New function.
607 * tree.h (int_or_pointer_precision): Add prototype.
608 * stor-layout.c (layout_type): Set TYPE_PRECISION for offset types.
609 * varasm.c (initializer_constant_valid_p): Use TYPE_PRECISION of
610 incoming pointer type instead of POINTER_SIZE.
612 * tree.c (build_pointer_type): Use appropriate pointer mode
614 (build_reference_type): Likewise.
615 * expr.c (store_expr): Likewise.
616 (expand_expr_addr_expr): Likewise.
617 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
618 * cfgexpand.c (expand_debug_expr): Likewise.
620 * auto-inc-dec.c: Include "target.h".
621 (try_merge): Use appropriate address mode instead of Pmode.
622 (find_inc): Likewise.
623 * combine.c (find_split_point): Likewise.
624 * cselib.c (cselib_record_sets): Likewise.
625 * dse.c (replace_inc_dec): Likewise.
626 (canon_address): Likewise.
627 * var-tracking.c (replace_expr_with_values): Likewise.
628 (count_uses): Likewise.
629 (add_uses): Likewise.
630 (add_stores): Likewise.
631 * emit-rtl.c: Include "target.h".
632 (adjust_address_1): Use appropriate address mode instead of Pmode.
633 (offset_address): Likewise.
634 * explow.c (break_out_memory_refs): Likewise.
635 (memory_address_addr_space): Likewise.
636 (promote_mode): Likewise.
637 * expr.c (move_by_pieces): Likewise.
638 (emit_block_move_via_loop): Likewise.
639 (store_by_pieces): Likewise.
640 (store_by_pieces_1): Likewise.
641 (expand_assignment): Likewise.
642 (store_constructor): Likewise.
643 (expand_expr_addr_expr): Likewise.
644 (expand_expr_real_1): Likewise.
645 * cfgexpand.c (expand_debug_expr): Likewise.
646 * ifcvt.c (noce_try_cmove_arith): Likewise.
647 * regcprop.c (kill_autoinc_value): Likewise.
648 * regmove.c (try_auto_increment): Likewise.
649 * reload.c (find_reloads): Likewise.
650 (find_reloads_address): Likewise.
651 (find_reloads_address_1): Likewise.
652 * sched-deps.c: Include "target.h".
653 (sched_analyze_1): Use appropriate address mode instead of Pmode.
654 (sched_analyze_2): Likewise.
655 * sel-sched-dump.c: Include "target.h".
656 (debug_mem_addr_value): Use appropriate address mode instead of Pmode.
657 * stor-layout.c (layout_type): Likewise.
658 * tree-ssa-loop-ivopts.c (produce_memory_decl_rtl): Likewise.
659 (multiplier_allowed_in_address_p): Likewise.
660 (get_address_cost): Likewise.
661 * varasm.c (make_decl_rtl): Likewise.
663 * expr.c (expand_assignment): Always convert offsets to appropriate
665 (store_expr): Likewise.
666 (store_constructor): Likewise.
667 (expand_expr_real_1): Likewise.
669 * reload.h (form_sum): Add MODE argument.
670 * reload.c (form_sum): Add MODE argument, use it instead of Pmode.
671 Update recursive calls.
672 (subst_indexed_address): Update calls to form_sum.
674 * tree-flow.h (addr_for_mem_ref): Add ADDRSPACE argument.
675 * tree-ssa-address.c: Include "target.h".
676 (templates): Replace by ...
677 (mem_addr_template_list): ... this new vector.
678 (TEMPL_IDX): Handle address space numbers.
679 (gen_addr_rtx): Add address mode argument, use it instead of Pmode.
680 (addr_for_mem_ref): Add ADDRSPACE argument. Use per-address-space
681 instead of global cache. Update call to gen_addr_rtx.
682 (valid_mem_ref_p): Update call to addr_for_mem_ref.
683 * expr.c (expand_expr_real_1): Update call to addr_for_mem_ref.
685 * rtl.h (convert_memory_address_addr_space): Add prototype.
686 (convert_memory_address): Define as macro.
687 * explow.c (convert_memory_address): Rename to ...
688 (convert_memory_address_addr_space): ... this. Add ADDRSPACE argument.
689 Use appropriate pointer and address modes instead of ptr_mode / Pmode.
690 Update recursive calls.
691 (memory_address_addr_space): Call convert_memory_address_addr_space.
692 * expmed.c (make_tree): Likewise.
693 * expr.c (expand_assignment): Likewise.
694 (expand_expr_addr_expr_1): Likewise. Also, add ADDRSPACE argument.
695 (expand_expr_addr_expr): Likewise. Also, update call.
697 * alias.c (find_base_value): Guard pointer size optimizations.
698 (find_base_term): Likewise.
699 * rtlanal.c (nonzero_bits1): Likewise.
700 (num_sign_bit_copies1): Likewise.
701 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
703 * Makefile.in (tree-ssa-address.o): Add $(TARGET_H) dependency.
704 (emit-rtl.o): Likewise.
705 (auto-inc-dec.o): Likewise.
706 (sched-deps.o): Likewise.
708 2009-10-26 Ben Elliston <bje@au.ibm.com>
709 Michael Meissner <meissner@linux.vnet.ibm.com>
710 Ulrich Weigand <uweigand@de.ibm.com>
712 * doc/extend.texi (Named Address Spaces): New section.
713 * coretypes.h (addr_space_t): New type.
714 (ADDR_SPACE_GENERIC): New define.
715 (ADDR_SPACE_GENERIC_P): New macro.
717 * doc/tm.texi (Named Address Spaces): New section.
718 (TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P): Document.
719 (TARGET_ADDR_SPACE_LEGITIMIZE_ADDRESS): Document.
720 (TARGET_ADDR_SPACE_SUBSET_P): Document.
721 (TARGET_ADDR_SPACE_CONVERT): Document.
722 * target.h (struct gcc_target): Add addr_space substructure.
723 * target-def.h (TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P): Define.
724 (TARGET_ADDR_SPACE_LEGITIMIZE_ADDRESS): Likewise.
725 (TARGET_ADDR_SPACE_SUBSET_P): Likewise.
726 (TARGET_ADDR_SPACE_CONVERT): Likewise.
727 (TARGET_ADDR_SPACE_HOOKS): Likewise.
728 (TARGET_INITIALIZER): Initialize addr_space hooks.
729 * targhooks.c (default_addr_space_legitimate_address_p): New function.
730 (default_addr_space_legitimize_address): Likewise.
731 (default_addr_space_subset_p): Likewise.
732 (default_addr_space_convert): Likewise.
733 * targhooks.h (default_addr_space_legitimate_address_p): Add prototype.
734 (default_addr_space_legitimize_address): Likewise.
735 (default_addr_space_subset_p): Likewise.
736 (default_addr_space_convert): Likewise.
738 * doc/rtl.texi (MEM_ADDR_SPACE): Document.
739 * rtl.h (mem_attrs): Add ADDRSPACE memory attribute.
740 (MEM_ADDR_SPACE): New macro.
741 * emit-rtl.c (get_mem_attrs): Add ADDRSPACE argument and set
742 address space memory attribute.
743 (mem_attrs_htab_hash): Handle address space memory attribute.
744 (mem_attrs_htab_eq): Likewise.
745 (set_mem_attributes_minus_bitpos): Likewise.
746 (set_mem_alias_set): Likewise.
747 (set_mem_align): Likewise.
748 (set_mem_expr): Likewise.
749 (set_mem_offset): Likewise.
750 (set_mem_size): Likewise.
751 (adjust_address_1): Likewise.
752 (offset_address): Likewise.
753 (widen_memoy_address): Likewise.
754 (get_spill_slot_decl): Likewise.
755 (set_mem_attrs_for_spill): Likewise.
756 (set_mem_addr_space): New function.
757 * emit-rtl.h (set_mem_addr_space): Add prototype.
758 * print-rtl.c (print_rtx): Print address space memory attribute.
759 * expr.c (expand_assignment): Set address space memory attribute
760 of generated MEM RTXes as appropriate.
761 (expand_expr_real_1): Likewise.
762 * cfgexpand.c (expand_debug_expr): Likewise.
763 * tree-ssa-loop-ivopts.c (produce_memory_decl_rtl): Likewise.
765 * tree.h (struct tree_base): Add address_space bitfield. Reduce
766 size of "spare" bitfield.
767 (TYPE_ADDR_SPACE): New macro.
768 (ENCODE_QUAL_ADDR_SPACE): Likewise.
769 (DECODE_QUAL_ADDR_SPACE): Likewise.
770 (CLEAR_QUAL_ADDR_SPACE): Likewise.
771 (KEEP_QUAL_ADDR_SPACE): Likewise.
772 (TYPE_QUALS): Encode type address space.
773 (TYPE_QUALS_NO_ADDR_SPACE): New macro.
774 * tree.c (set_type_quals): Set type address space.
775 (build_array_type): Inherit array address space from element type.
776 * print-tree.c (print_node_brief): Print type address space.
777 (print_node): Likewise.
778 * tree-pretty-print.c (dump_generic_node): Likewise.
780 * explow.c (memory_address): Rename to ...
781 (memory_address_addr_space): ... this. Add ADDRSPACE argument.
782 Use address-space aware variants of memory address routines.
783 * recog.c (memory_address_p): Rename to ...
784 (memory_address_addr_space_p): ... this. Add ADDSPACE argument.
785 Use address-space aware variants of memory address routines.
786 (offsettable_address_p): Rename to ...
787 (offsettable_address_addr_space_p): ... this. Add ADDRSPACE argument.
788 Use address-space aware variants of memory address routines.
789 * reload.c (strict_memory_address_p): Rename to ...
790 (strict_memory_address_addr_space_p): ... this. Add ADDSPACE argument.
791 Use address-space aware variants of memory address routines.
792 (maybe_memory_address_p): Rename to ...
793 (maybe_memory_address_addr_space_p): ... this. Add ADDSPACE argument.
794 Use address-space aware variants of memory address routines.
795 * expr.h (memory_address_addr_space): Add prototype.
796 (memory_address): Define as macro.
797 * recog.h (memory_address_addr_space_p): Add prototype.
798 (memory_address_p): Define as macro.
799 (offsettable_address_addr_space_p): Add prototype.
800 (offsettable_address_p): Define as macro.
801 (strict_memory_address_addr_space_p): Add prototype.
802 (strict_memory_address_p): Define as macro.
804 * combine.c (find_split_point): Use address-space aware variants
805 of memory address routines.
806 * emit-rtl.c (operand_subword): Likewise.
807 (change_address_1): Likewise.
808 (adjust_address_1): Likewise.
809 (offset_address): Likewise.
810 * expr.c (emit_move_insn): Likewise.
811 (expand_assignment): Likewise.
812 (expand_expr_real_1): Likewise.
813 * recog.c (verify_changes): Likewise.
814 (general_operand): Likewise.
815 (offsettable_memref_p): Likewise.
816 (offsettable_nonstrict_memref_p): Likewise.
817 (constrain_operands): Likewise.
818 * reload.c (get_secondary_mem): Likewise.
819 (find_reloads_toplev): Likewise.
820 (find_reloads_address): Likewise.
821 (find_reloads_subreg_address): Likewise.
822 * reload1.c (reload): Likewise.
823 * rtlhooks.c (gen_lowpart_if_possible): Likewise.
824 * rtl.h (address_cost): Add ADDRSPACE argument.
825 * rtlanal.c (address_cost): Add ADDRSPACE argument. Use address-space
826 aware variant of memory address routines.
827 * loop-invariant.c (create_new_invariant): Update address_cost call.
828 * tree-ssa-loop-ivopts.c (computation_cost): Likewise.
829 * fwprop.c (should_replace_address): Add ADDRSPACE argument.
830 Use address-space aware variant of memory address routines.
831 (propagate_rtx_1): Update call to should_replace_address.
832 * tree-flow.h (multiplier_allowed_in_address_p): Add ADDRSPACE
834 * tree-ssa-loop-ivopts.c (multiplier_allowed_in_address_p): Add
835 ADDRSPACE argument. Use per-address-space instead of global cache.
836 Use address-space aware variant of memory address routines.
837 (get_address_cost): Likewise.
838 (get_computation_cost_at): Update calls.
839 * tree-ssa-address.c (valid_mem_ref_p): Add ADDRSPACE argument.
840 Use address-space aware variant of memory address routines.
841 (create_mem_ref_raw): Update call to valid_mem_ref_p.
842 (most_expensive_mult_to_index): Update call to
843 multiplier_allowed_in_address_p.
845 * dwarf2out.c (modified_type_die): Output DW_AT_address_class
846 attribute to indicate named address spaces.
848 * varasm.c (get_variable_section): DECLs in named address spaces
851 * reload.c (find_reloads_address): Do not use LEGITIMIZE_RELOAD_ADDRESS
852 for addresses in a non-generic address space.
854 * expr.c (emit_block_move_hints): Do not use libcalls for
855 memory in non-generic address spaces.
856 (clear_storage_hints): Likewise.
857 (expand_assignment): Likewise.
859 * fold-const.c (operand_equal_p): Expressions refering to different
860 address spaces are not equivalent.
862 * rtl.c (rtx_equal_p_cb): MEMs refering to different address
863 spaces are not equivalent.
864 (rtx_equal_p): Likewise.
865 * cse.c (exp_equiv_p): Likewise.
866 * jump.c (rtx_renumbered_equal_p): Likewise.
867 * reload.c (operands_match_p): Likewise.
869 * alias.c (nonoverlapping_memrefs_p): MEMs refering to different
870 address spaces may alias.
871 (true_dependence): Likewise.
872 (canon_true_dependence): Likewise.
873 (write_dependence_p): Likewise.
875 * dse.c (canon_address): Handle named address spaces.
876 * ifcvt.c (noce_try_cmove_arith): Likewise.
878 * tree.def (ADDR_SPACE_CONVERT_EXPR): New tree code.
879 * expr.c (expand_expr_real_2): Expand ADDR_SPACE_CONVERT_EXPR.
880 * convert.c (convert_to_pointer): Generate ADDR_SPACE_CONVERT_EXPR
881 to handle conversions between different address spaces.
882 * fold-const.c (fold_convert_loc): Likewise.
883 (fold_unary_loc): Handle ADDR_SPACE_CONVERT_EXPR.
884 * tree-pretty-print.c (dump_generic_node): Likewise.
885 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
886 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
887 * tree-inline.c (estimate_operator_cost): Likewise.
888 * tree-ssa.c (useless_type_conversion_p): Conversions between pointers
889 to different address spaces are not useless.
891 2009-10-26 Jakub Jelinek <jakub@redhat.com>
894 * cfgcleanup.c (trivially_empty_bb_p): New function.
895 (try_optimize_bb): Use it instead of checking BB_HEAD == BB_END.
898 * dwarf2out.c (add_pubname, add_pubtype, generic_parameter_die,
899 add_name_and_src_coords_attributes, gen_namespace_die,
900 dwarf2out_set_name): Handle dwarf2_name returning NULL.
902 2009-10-26 Nick Clifton <nickc@redhat.com>
904 * config.gcc: Add support for RX target.
905 * config/rx: New directory.
906 * config/rx/constraints.md: New file.
907 * config/rx/predicates.md: New file.
908 * config/rx/rx.c: New file.
909 * config/rx/rx.h: New file.
910 * config/rx/rx.md: New file.
911 * config/rx/rx.opt: New file.
912 * config/rx/rx-protos.h: New file.
913 * config/rx/t-rx: New file.
914 * doc/extend.texi: Document RX function attributes.
915 * doc/invoke.texi: Document RX specific command line options.
916 * doc/contrib.texi: Document RX contribution.
917 * doc/md.texi: Document RX constraints.
918 * doc/install.texi: Document RX support.
920 2009-10-26 Michael Matz <matz@suse.de>
922 PR tree-optimization/41783
923 * tree-ssa-alias.c (get_continuation_for_phi): Export, add a special
924 case for simple diamonds.
925 * tree-ssa-alias.h (get_continuation_for_phi): Declare.
926 * tree-ssa-pre.c (translate_vuse_through_block): Add same_valid
927 argument, use alias oracle to skip some vdefs.
928 (phi_translate_1): Change call to above, don't allocate new
929 value ids if they can stay the same.
930 (compute_avail): Allow vuse walking when looking up references.
932 2009-10-26 Richard Guenther <rguenther@suse.de>
934 PR tree-optimization/41826
935 * tree-ssa-structalias.c (get_constraint_for_ptr_offset): Avoid
936 access to re-allocated vector fields.
938 2009-10-26 Richard Guenther <rguenther@suse.de>
940 * graphite-sese-to-poly.c (check_poly_representation): Fix
941 compile without checking.
943 2009-10-26 Janus Weil <janus@gcc.gnu.org>
946 * gimple.h (tree_annotate_all_with_location): Remove prototype.
947 * gimplify.c (tree_should_carry_location_p,
948 tree_annotate_one_with_location,tree_annotate_all_with_location):
949 Remove obsolete functions.
951 2009-10-25 Kaz Kojima <kkojima@gcc.gnu.org>
954 * config/sh/sh.md (stuff_delay_slot): Don't set T_REG in pattern.
956 2009-10-25 Richard Guenther <rguenther@suse.de>
958 * lto-streamer-in.c (unpack_ts_decl_common_value_fields):
959 Stream DECL_RESTRICTED_P.
960 * lto-streamer-out.c (pack_ts_decl_common_value_fields): Likewise.
962 2009-10-25 Richard Sandiford <rdsandiford@googlemail.com>
964 * config/mips/mips.c (mips_restore_gp_from_cprestore_slot): Emit
965 a note when expanding to nothing.
967 2009-10-25 Richard Guenther <rguenther@suse.de>
970 * tree.c (find_decls_types_r): Deal with Java overloading
971 BINFO_VIRTUALS for its own purpose.
973 2009-10-24 Adam Nemet <anemet@caviumnetworks.com>
975 * config/mips/predicates.md (hilo_operand): New predicate.
976 * config/mips/mips.md (<u>mulsidi3_64bit): Change it to a
977 define_insn. Correct !ISA_HAS_EXT_INS length from 24 to 28. Move
978 splitter part from here ...:
979 (<u>mulsidi3_64bit splitter for !ISA_HAS_EXT_INS): ... to here. Swap
980 op0 and op4 to match the DINS case.
981 (<u>mulsidi3_64bit splitter for ISA_HAS_EXT_INS): New splitter.
983 2009-10-24 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
986 * avr.md (QIDI): Add new mode iterator.
987 (sbrx_branch<mode>): Create new zero extract bit, test and jump
988 patterns for all QI thru DI modes combinations.
989 (sbrx_and_branch<mode>): Create new and based bit test and jump
990 patterns for QI thru SI modes.
991 avr.c (avr_out_sbxx_branch): Use only bit number.
993 2009-10-24 Jan Hubicka <jh@suse.cz>
995 * ipa-reference.c (check_call): Noreturn notrhow calls do not write
997 (analyze_function): When analyzing noreturn nothrow call, do not
998 compute written stats; free bitmaps of vars early if possible.
999 (generate_summary): Only update bitmaps if computed.
1000 (propagate): Only dump bitmaps if computed.
1001 (ipa_reference_read_summary): Fix pasto.
1003 2009-10-24 Eric Botcazou <ebotcazou@adacore.com>
1005 * tree-ssa-alias.c (nonaliasing_component_refs_p): Rename into...
1006 (aliasing_component_refs_p): ...this. Return true if there is no
1007 common base and the base access types have the same alias set.
1008 (indirect_ref_may_alias_decl_p): Adjust for above renaming.
1009 (indirect_refs_may_alias_p): Likewise.
1011 2009-10-23 Joseph Myers <joseph@codesourcery.com>
1014 * c-typeck.c (c_finish_stmt_expr): Do not wrap error_mark_node in
1015 a C_MAYBE_CONST_EXPR.
1017 2009-10-23 Michael Meissner <meissner@linux.vnet.ibm.com>
1020 * config/rs6000/rs6000.c (struct machine_function): Add
1021 vsx_or_altivec_used_p to record if vector types are used.
1022 (rs6000_expand_to_rtl_hook): Rename from
1023 rs6000_alloc_sdmode_stack_slot. If VSX, check to see if there are
1024 any vector operations, so if there are, we can set VRSAVE to
1025 non-zero when only floating point vector registers are used.
1026 (TARGET_EXPAND_TO_RTL_HOOK): Use rs6000_expand_to_rtl_hook.
1027 (rs6000_check_vector_mode): Inner function to check if vector
1028 types are used in the code.
1029 (compute_vrsave_mask): If VSX, make sure VRSAVE is non-zero if
1030 vector instructions are used.
1032 * config/rs6000/rs6000.h (HARD_REGNO_CALL_PART_CLOBBERED):
1033 Indicate that VSX registers which overlap floating point
1034 registers, can't be used across a call, since the ABI only states
1035 the scalar part of the register will be saved and restored.
1037 2009-10-23 Joseph Myers <joseph@codesourcery.com>
1040 * alias.c (get_alias_set): Call langhook before returning 0 for
1041 types with structural equality.
1042 * c-common.c (c_common_get_alias_set): Use alias set of element
1043 type for arrays with structural comparison.
1045 2009-10-23 Richard Guenther <rguenther@suse.de>
1048 * cfgexpand.c (expand_call_stmt): Use gimple_has_side_effects and
1049 gimple_call_nothrow_p.
1051 2009-10-23 Richard Guenther <rguenther@suse.de>
1053 PR tree-optimization/41778
1054 * tree-ssa-pre.c (do_regular_insertion): Only insert if a
1055 redundancy along a path in the CFG we want to optimize for speed
1056 is going to be removed.
1057 (execute_pre): Do partial-PRE only if the function is to be
1058 optimized for speed.
1059 (gate_pre): Do not turn off all of PRE when not optimizing a
1062 2009-10-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1064 * builtins.c (fold_builtin_cabs): Use validate_arg().
1065 (fold_builtin_cexp): Fix if-logic.
1066 (fold_builtin_1): Check subtype for BUILT_IN_CIMAG.
1068 2009-10-22 Jeff Law <law@redhat.com>
1070 * ira-lives.c (process_single_reg_class_operands): Update the
1071 hard reg costs for all the hard registers desired by the
1072 single reg class operand.
1074 2009-10-22 Richard Sandiford <rdsandiford@googlemail.com>
1076 * simplify-rtx.c (simplify_replace_fn_rtx): Add a fallback case
1077 for rtxes that aren't handled specially.
1079 2009-10-22 Richard Sandiford <rdsandiford@googlemail.com>
1081 * rtl.h (shallow_copy_rtvec): Declare.
1082 * rtl.c (shallow_copy_rtvec): New function.
1083 * cselib.c (cselib_subst_to_values): Use it. Only modify an
1084 rtx field if the subrtx has changed.
1086 2009-10-22 Anatoly Sokolov <aesok@post.ru>
1088 * config/m32c/m32c.c (m32c_function_value_regno_p): New function.
1089 (m32c_function_value): Make static, add new 'outgoing' argument.
1090 (m32c_libcall_value): Make static, add new 'fun' argument.
1091 (TARGET_FUNCTION_VALUE, TARGET_LIBCALL_VALUE): Declare.
1092 * config/m32c/m32c.h (FUNCTION_VALUE, LIBCALL_VALUE): Remove.
1093 (FUNCTION_VALUE_REGNO_P): Redefine, use m32c_function_value_regno_p.
1094 * config/m32c/m32c-protos.h (m32c_function_value_regno_p): Declare.
1095 (m32c_function_value, m32c_libcall_value): Delete declaration.
1097 2009-10-22 Diego Novillo <dnovillo@google.com>
1099 * Makefile.in (PLUGIN_HEADERS): Add output.h and IPA_UTILS_H.
1101 2009-10-22 Razya Ladelsky <razya@il.ibm.com>
1103 * tree-cfg.c (gimple_duplicate_sese_tail): Fix typos/indentation/white
1106 2009-10-22 Richard Guenther <rguenther@suse.de>
1108 * lto-streamer.h (lto_symtab_merge_cgraph_nodes): Declare.
1109 * lto-symtab.c (struct lto_symtab_entry_def): Add node member.
1110 (lto_symtab_merge): Do not merge cgraph nodes here.
1111 (lto_symtab_resolve_can_prevail_p): Simplify.
1112 (lto_symtab_resolve_symbols): Store cgraph node.
1113 (lto_symtab_merge_decls_1): Simplify. Do not drop non-prevailing
1114 functions from the symtab.
1115 (lto_symtab_merge_cgraph_nodes_1): New function.
1116 (lto_symtab_merge_cgraph_nodes): Likewise.
1118 2009-10-22 Richard Guenther <rguenther@suse.de>
1121 * lto-streamer-out.c (lto_output_location): Stream the
1123 * lto-streamer-in.c (lto_input_location): Likewise.
1125 2009-10-22 Razya Ladelsky <razya@il.ibm.com>
1127 * cfgloopmanip.c (duplicate_subloops): Export.
1128 * tree-parloops.c (loop_parallel_p): Dump if loop is innermost.
1129 (transform_to_exit_first_loop): Duplicate bbs starting from
1130 header up to loop->latch instead of exit->src.
1131 Initialize control variable to the correct number of iterations.
1132 (gather_scalar_reductions): Do not register double reductions.
1133 (parallelize_loops): Dump which loop is tested.
1134 Indicate whether the parallelized loop is inner or not.
1135 Remove the innermost-loop requirement.
1136 * cfgloop.h (duplicate_subloops): Export.
1137 * tree-cfg.c (add_phi_args_after_redirect): New function.
1138 (gimple_duplicate_sese_tail): Remove the no-subloops constraint.
1139 Call duplicate_subloops.
1140 Update number of iterations at the exit condition.
1141 Don't redirect nexits always to the loop exit.
1142 Redirect copied edges from latch to the loop exit.
1144 2009-10-22 Jan Hubicka <jh@suse.cz>
1146 * ipa-cp.c (ipcp_read_summary): Remove now invalid FIXME and
1148 * ipa-inline.c (cgraph_mark_inline_edge,
1149 cgraph_decide_inlining_of_small_function,
1150 cgraph_decide_inlining, inline_read_summary): Disable indirect
1151 inlining for WPA for time being.
1153 PR tree-optimize/40556
1154 * ipa-inline.c (cgraph_early_inlining): Fix iterations condition.
1156 2009-10-22 Richard Guenther <rguenther@suse.de>
1158 * lto-streamer.h (lto_symtab_clear_resolution): Remove.
1159 * lto-symtab.c (lto_symtab_clear_resolution): Likewise.
1161 2009-10-22 Jan Hubicka <jh@suse.cz>
1164 * ipa-reference.c (has_proper_scope_for_analysis): Add fixme about
1166 (check_call): Handle only indirect calls.
1167 (propagate_bits): Update comment.
1168 (write_node_summary_p): Turn bogus check to assert.
1169 (ipa_reference_write_summary): Stream calls_read_all properly.
1170 (ipa_reference_read_summary): Stream in calls_read_all properly.
1171 (read_write_all_from_decl): New function.
1172 (propagate): Handle OVERWRITABLE nodes and external calls here.
1173 * ipa-pre-const.c (check_call): In IPA mode handle indirect
1175 (analyze_function): Do not check visibility here.
1176 (add_new_function): We summary OVERWRITABLE too.
1177 (generate_summary): Stream OVERWRITABLE nodes too.
1178 (propagate): Handle external calls and OVERWRITABLE nodes here.
1179 (local_pure_const): Check visibility here.
1181 2009-10-22 Jan Hubicka <jh@suse.cz>
1183 * ipa-cp.c (ipcp_write_summary, ipcp_read_summary): New functions.
1184 (pass_ipa_cp): Register them.
1185 (ipcp_init_stage): Analyze all functions for whopr/lto.
1186 (ipcp_propagate_stage): Skip external calls.
1187 (ipcp_iterate_stage): Call ipa_update_after_lto_read if needed.
1188 * ipa-reference.c (write_node_summary_p): Fix thinko about
1190 * cgraphunit.c (ipa_passes): When in lto, ne er produce new summaries;
1191 when in ltrans, skip executing of ipa passes since everything
1192 should've been done.
1193 * ipa-inline.c (cgraph_decide_inlining): Remove FIXMEs.
1194 (inline_generate_summary): Likewise.
1195 (inline_read_summary): New function.
1196 (inline_write_summary): New function.
1197 (pass_ipa_inline): Register new hooks.
1198 * ipa-prop.c: Inlcude lto-streamer.h
1199 (ipa_edge_args_vector): Update declaration.
1200 (ipa_count_arguments, ipa_compute_jump_functions,
1201 ipa_free_edge_args_substructures): Move ipa_edge_args_vector into ggc.
1202 (ipa_write_jump_function, ipa_read_jump_function, ipa_write_node_info,
1203 ipa_read_node_info): New static functions.
1204 (ipa_prop_write_jump_functions, ipa_prop_read_jump_functions): Update.
1205 (duplicate_array): Use xmalloc.
1206 (duplicate_ggc_array): New.
1207 (ipa_edge_duplication_hook): Use it.
1208 (ipa_update_after_lto_read): New function.
1209 * ipa-prop.h (ipa_prop_write_jump_functions,
1210 ipa_prop_read_jump_functions): Declare.
1211 (ipa_pass_through_data, ipa_ancestor_jf_data, ipa_member_ptr_cst,
1212 jump_func_value, ipa_member_ptr_cst, ipa_edge_args): Add GTY markers.
1213 (ipa_edge_args_vector): Move into GGC.
1214 (ipa_check_create_edge_args): Update.
1215 (ipa_update_after_lto_read): New.
1216 * passes.c (ipa_write_summaries_1): When in wpa, do not write
1218 (ipa_read_summaries): When in ltrans, so not read summaries.
1219 * lto-streamer.c (lto_get_section_name): Add
1220 LTO_section_jump_functions.
1221 * lto-streamer.h (LTO_section_jump_functions): New section.
1222 (produce_asm): Declare.
1223 * lto-cgraph.c (output_cgraph): Output edges in reverse order.
1224 * lto-streamer-out.c (produce_asm): Export.
1225 * lto-streamer-in.c: Include tree-pass.h
1226 (input_function): Free dominance info when done.
1227 (lto_read_body): Push ipa_inline in ltrans stage.
1228 * gengtype.c (open_base_files): Add ipa-prop.h into includes.
1229 * Makefile.in (GTFILES): Add ipa-prop.h
1231 2009-10-22 Matthias Klose <doko@ubuntu.com>
1233 * doc/install.texi: Document --enable-browser-plugin.
1235 2009-10-21 Vladimir Makarov <vmakarov@redhat.com>
1237 * doc/invoke.texi (fira-loop-pressure): Update default value.
1238 * opts.c (decode_options): Remove default value setting for
1239 flag_ira_loop_pressure.
1240 * config/ia64/ia64.c (ia64_override_options): Set
1241 flag_ira_loop_pressure up for -O3.
1242 * config/rs6000/rs6000.c (rs6000_override_options): Ditto.
1244 2009-10-21 Sebastian Pop <sebastian.pop@amd.com>
1246 PR tree-optimization/41497
1247 * tree-scalar-evolution.c (analyze_evolution_in_loop): Return
1248 chrec_dont_know if the evolution function returned by follow_ssa_edge
1249 is constant in the analyzed loop and is not compatible with the
1250 initial value before the loop.
1251 * tree-chrec.h (no_evolution_in_loop_p): Call STRIP_NOPS.
1253 2009-10-21 Joseph Myers <joseph@codesourcery.com>
1255 * config/sh/sh.c (nonpic_symbol_mentioned_p): Allow UNSPEC_TPOFF.
1257 2009-10-21 Jakub Jelinek <jakub@redhat.com>
1260 * doc/invoke.texi: Document -print-multi-os-directory.
1262 2009-10-21 Jack Howarth <howarth@bromo.med.uc.edu>
1265 * gcc/config/darwin10.h: Use default_emit_unwind_label.
1266 * gcc/config/darwin.c: Disable -freorder-blocks-and-partition
1267 when darwin_emit_unwind_label is used.
1269 2009-10-21 Eric Botcazou <ebotcazou@adacore.com>
1271 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Tweak
1274 2009-10-20 Richard Henderson <rth@redhat.com>
1276 * tree-eh.c (lower_try_finally_copy): Do lower_eh_constructs_1
1277 before emit_post_landing_pad.
1279 2009-10-20 Adam Nemet <anemet@caviumnetworks.com>
1281 * config/mips/mips.c (mips_binary_cost): Add new argument speed.
1282 Use when calling rtx_costs.
1283 (mips_rtx_costs): Fix formatting. Use argument speed rather than the
1284 global optimize_size. Pass speed to mips_binary_cost.
1286 2009-10-20 Jakub Jelinek <jakub@redhat.com>
1288 * config/rs6000/rs6000.c (def_builtin): Set TREE_READONLY instead
1291 2009-10-20 Richard Sandiford <rdsandiford@googlemail.com>
1293 * rtl.h (simplify_replace_fn_rtx): Declare.
1294 (wrap_constant, unwrap_constant): Delete.
1295 * cfgexpand.c (unwrap_constant, wrap_constant): Delete.
1296 (expand_debug_expr): Don't call wrap_constant.
1297 * combine.c (rtx_subst_pair): Only define for AUTO_INC_DEC.
1298 (auto_adjust_pair): Fold into...
1299 (propagate_for_debug_subst): ...here. Only define for AUTO_INC_DEC.
1300 Just return a new value.
1301 (propagate_for_debug): Use simplify_replace_fn_rtx for AUTO_INC_DEC,
1302 otherwise use simplify_replace_rtx.
1303 * cselib.c (wrap_constant): Reinstate old definition.
1304 (cselib_expand_value_rtx_1): Don't wrap constants.
1305 * gcse.c (try_replace_reg): Don't use copy_rtx in the call to
1306 simplify_replace_rtx.
1307 (bypass_block): Fix formatting in calls to simplify_replace_rtx.
1308 * reload1.c (reload): Skip all uses for an insn before adjusting it.
1309 Use simplify_replace_rtx.
1310 * simplify-rtx.c (simplify_replace_fn_rtx): New function,
1312 (simplify_replace_rtx): ...here. Turn into a wrapper for
1313 simplify_replace_fn_rtx.
1314 (simplify_unary_operation): Don't unwrap CONSTs.
1315 * var-tracking.c (check_wrap_constant): Delete.
1316 (vt_expand_loc_callback): Don't call it.
1317 (vt_expand_loc): Likewise.
1319 2009-10-20 Pascal Obry <obry@adacore.com>
1320 Eric Botcazou <ebotcazou@adacore.com>
1322 * config/i386/cygming.h (DWARF_FRAME_REGNUM): Add enclosing parens.
1324 2009-10-20 Michael Matz <matz@suse.de>
1326 * loop-invariant.c (create_new_invariant): Use different magic number.
1328 2009-10-20 Richard Earnshaw <rearnsha@arm.com>
1331 * arm.c (arm_override_options): Forcibly disable hot/cold block
1334 2009-10-20 Alexandre Oliva <aoliva@redhat.com>
1337 * haifa-sched.c (try_ready): Skip debug deps updating speculation
1340 2009-10-20 Richard Guenther <rguenther@suse.de>
1342 * ggc-page.c: Include cfgloop.h.
1343 (struct max_alignment): Drop long double, add void *.
1344 (extra_order_size_table): Add low non-power-of-two multiples
1345 of MAX_ALIGNMENT. Drop small type-based entries, add
1346 tree_type, cgraph_node and loop.
1347 * alloc-pool.c (struct allocation_object_def): Drop long double
1350 2009-10-20 Jakub Jelinek <jakub@redhat.com>
1353 * loop-invariant.c (calculate_loop_reg_pressure): Don't count regs
1354 referenced just in DEBUG_INSNs.
1356 2009-10-20 Richard Guenther <rguenther@suse.de>
1359 * gimple.c (gimple_register_type): Make sure we register
1360 the types main variant first.
1362 2009-10-20 Richard Guenther <rguenther@suse.de>
1364 * gimple.c (gimple_types_compatible_p): Simplify. Move
1365 cheap checks before hashtable queries. Add checks for
1366 TYPE_NONALIASED_COMPONENT and DECL_NONADDRESSABLE_P.
1368 2009-10-20 Eric Botcazou <ebotcazou@adacore.com>
1370 * tree-sra.c (build_ref_for_offset_1) <RECORD_TYPE>: Skip fields
1371 without size or with size that can't be represented as a host integer.
1373 2009-10-20 Alexandre Oliva <aoliva@redhat.com>
1375 * tree-ssa-dce.c (eliminate_unnecessary_stmts): Don't regard
1376 the removal of a debug stmt as a significant change.
1378 2009-10-20 Wolfgang Gellerich <gellerich@de.ibm.com>
1380 * config/s390/s390.md: Added agen condition to operand
1381 forwarding bypasses. Added bypass for early address generation
1382 use of int results. Updated comments.
1384 2009-10-20 Stefan Dösinger <stefan@codeweavers.com>
1386 * config/i386/i386.c: Remove signal.h #include.
1388 2009-10-20 Jie Zhang <jie.zhang@analog.com>
1390 * simplify-rtx.c (simplify_const_unary_operation): Handle SS_ABS.
1391 * doc/rtl.texi: Document ss_abs.
1393 2009-10-19 Jakub Jelinek <jakub@redhat.com>
1395 * c-common.c (c_parse_error): Handle CPP_UTF8STRING.
1396 * c-lex.c (c_lex_with_flags): Likewise. Test C_LEX_STRING_NO_JOIN
1397 instead of C_LEX_RAW_STRINGS.
1398 (lex_string): Handle CPP_UTF8STRING.
1399 * c-parser.c (c_parser_postfix_expression): Likewise.
1400 * c-pragma.h (C_LEX_RAW_STRINGS): Rename to ...
1401 (C_LEX_STRING_NO_JOIN): ... this.
1403 2009-10-19 Anatoly Sokolov <aesok@post.ru>
1405 * config/cris/cris.c (cris_function_value, cris_libcall_value,
1406 cris_function_value_regno_p): New functions.
1407 (cris_promote_function_mode): Update comment.
1408 (TARGET_FUNCTION_VALUE, TARGET_LIBCALL_VALUE): Declare.
1409 * config/cris/cris.h (FUNCTION_VALUE, LIBCALL_VALUE): Remove.
1410 (FUNCTION_VALUE_REGNO_P): Redefine, use cris_function_value_regno_p.
1411 * config/cris/cris-protos.h (cris_function_value_regno_p): Declare.
1413 2009-10-19 Jakub Jelinek <jakub@redhat.com>
1415 * unwind-dw2.c (execute_stack_op): Fix operand order for
1416 DW_OP_le, DW_OP_ge, DW_OP_lt and DW_OP_gt.
1418 2009-10-19 Eric Botcazou <ebotcazou@adacore.com>
1420 * gimple-low.c (struct lower_data): Add cannot_fallthru field.
1421 (lower_stmt) <GIMPLE_BIND>: Add comment.
1422 <GIMPLE_COND, GIMPLE_GOTO, GIMPLE_SWITCH>: Set cannot_fallthru to true
1424 <GIMPLE_RETURN>: Remove the statement if cannot_fallthru is set.
1425 Otherwise lower it and set cannot_fallthru to true.
1426 <GIMPLE_TRY>: Update cannot_fallthru for GIMPLE_TRY_FINALLY and return.
1427 <GIMPLE_CATCH, GIMPLE_EH_FILTER>: Set cannot_fallthru to false.
1428 <GIMPLE_CALL>: Set cannot_fallthru to false for BUILT_IN_SETJMP and
1429 to true for a noreturn call. Do not remove statements.
1430 <GIMPLE_OMP_PARALLEL, GIMPLE_OMP_TASK>: Set cannot_fallthru to false.
1431 Set cannot_fallthru to false on function exit.
1432 (gimple_stmt_may_fallthru) <GIMPLE_SWITCH>: Really return false.
1433 <GIMPLE_ASSIGN>: Remove.
1435 2009-10-19 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
1437 * config/s390/s390.c (s390_z10_optimize_cmp): Don't touch FP compares.
1439 2009-10-19 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
1441 * config/s390/s390.c (s390_z10_optimize_cmp): Use
1442 next/prev_active_insn to skip DEBUG_INSNs as well.
1444 2009-10-19 Joseph Myers <joseph@codesourcery.com>
1446 * config/arm/arm.c (output_move_neon): Use DImode in call to
1449 2009-10-19 Matthias Klose <doko@ubuntu.com>
1452 * config.gcc (arm*-*-linux-*eabi): Use config/t-slibgcc-libgcc.
1454 2009-10-19 Jakub Jelinek <jakub@redhat.com>
1456 * cfgexpand.c (expand_debug_expr): Fail if bitpos < 0 for non-MEM op0.
1458 2009-10-17 Andy Hutchinson <hutchinsonandy@gcc.gnu.org>
1461 * optabs.c (expand_binop): Make mode of shift count expression mode
1462 of shift count not target.
1465 2009-10-17 Eric Botcazou <ebotcazou@adacore.com>
1467 * tree-nested.c (convert_nonlocal_reference_stmt) <GIMPLE_COND>: New
1468 case. Force using values to replace references within the statement.
1469 (convert_local_reference_stmt): Likewise.
1471 2009-10-17 Eric Botcazou <ebotcazou@adacore.com>
1473 * gimple-low.c (lower_stmt) <GIMPLE_CALL>: If the call is noreturn,
1474 remove a subsequent GOTO or RETURN statement.
1476 2009-10-17 Andy Hutchinson <hutchinsonandy@aim.com>
1478 * config/avr.md (*movqi): Add zero as equally preferable constraint
1479 as general register.
1482 2009-10-17 Eric Botcazou <ebotcazou@adacore.com>
1484 * print-tree.c (print_node): Fix string for DECL_STRUCT_FUNCTION.
1486 2009-10-17 Richard Guenther <rguenther@suse.de>
1488 * lto-streamer-in.c (lto_input_location): Try to reuse previous maps.
1490 2009-10-17 Richard Guenther <rguenther@suse.de>
1492 * lto-streamer-in.c (input_gimple_stmt): Fixup FIELD_DECL
1493 operands in COMPONENT_REFs.
1495 2009-10-17 Anatoly Sokolov <aesok@post.ru>
1497 * targhooks.c (default_libcall_value): Don't use LIBCALL_VALUE macro
1498 if not defined. Change type of second argument to const_rtx.
1499 (default_function_value): Call gcc_unreachable if FUNCTION_VALUE
1501 * targhooks.h (default_libcall_value): Update prototype.
1502 * target.h (struct gcc_target): Change type of second argument of
1503 libcall_value to const_rtx.
1504 * config/arm/arm.c (arm_libcall_value): Change type of second argument
1506 (arm_libcall_uses_aapcs_base): Change type of argument to const_rtx.
1507 * doc/tm.texi (TARGET_LIBCALL_VALUE): Revise documentation.
1509 2009-10-17 Jakub Jelinek <jakub@redhat.com>
1512 * debug.h (struct gcc_debug_hooks): Add assembly_start hook.
1513 * cgraphunit.c (cgraph_optimize): Call it.
1514 * dwarf2out.c (dwarf2out_init): Move .cfi_sections printing into...
1515 (dwarf2out_assembly_start): ... here. New hook.
1516 (dwarf2out_debug_hooks): Add dwarf2out_assembly_start.
1517 * debug.c (do_nothing_debug_hooks): Do nothing for assembly_start
1519 * dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Likewise.
1520 * sdbout.c (sdb_debug_hooks): Likewise.
1521 * vmsdbgout.c (vmsdbg_debug_hooks): Add vmsdbgout_assembly_start.
1522 (vmsdbgout_assembly_start): New hook.
1524 2009-10-17 Alexandre Oliva <aoliva@redhat.com>
1526 * rtl.h (RTL_LOCATION): Fix typo.
1528 2009-10-17 Alexandre Oliva <aoliva@redhat.com>
1530 * print-rtl.c (print_rtx): Print locators in asm_operands
1533 2009-10-17 Alexandre Oliva <aoliva@redhat.com>
1536 * sched-deps.c (depl_on_debug_p): New.
1537 (attach_dep_link): Reject debug deps before nondebug deps.
1538 (add_to_deps_list): Insert debug deps after nondebug deps.
1539 (sd_lists_empty_p): Stop at first nonempty list. Disregard debug
1541 (sd_add_dep): Do not reject debug deps.
1542 (add_insn_mem_dependence): Don't count debug deps.
1543 (remove_from_deps): Likewise.
1544 (sched_analyze_2): Set up mem deps on debug insns.
1545 (sched_analyze_insn): Record reg uses for deps on debug insns.
1546 * haifa-sched.c (schedule_insn): Reset deferred debug insn. Don't
1547 try_ready nondebug insn after debug insn.
1548 * ddg.c (create_ddg_dep_from_intra_loop_link,
1549 create_ddg_dep_no_link): Don't reject debug deps.
1551 2009-10-16 Richard Guenther <rguenther@suse.de>
1553 * lto-symtab.c (merge_incomplete_and_complete_type): Remove.
1554 (maybe_merge_incomplete_and_complete_type): Likewise.
1555 (lto_symtab_merge): Do not call them. Do not warn for
1556 complete vs. incomplete compatible types.
1557 (lto_symtab_merge_decls_2): Simplify.
1558 * gimple.c (gimple_force_type_merge): Remove.
1559 (gimple_types_compatible_p): Make it static.
1560 * gimple.h (gimple_force_type_merge): Remove.
1561 (gimple_types_compatible_p): Likewise.
1563 2009-10-16 Jakub Jelinek <jakub@redhat.com>
1565 * dwarf2out.c (mem_loc_descriptor) <case ZERO_EXTRACT>: Cast
1566 DWARF2_ADDR_SIZE to int to avoid signed vs. unsigned warnings.
1568 2009-10-16 Richard Guenther <rguenther@suse.de>
1570 PR tree-optimization/41728
1571 * tree-ssa-dom.c (optimize_stmt): Mark the stmt modified
1572 if fold_stmt did anything.
1574 2009-10-16 Richard Guenther <rguenther@suse.de>
1577 * lto-streamer-in.c (lto_input_tree_ref): Revert last change.
1578 (maybe_fixup_handled_component): New function.
1579 (input_gimple_stmt): Fixup mismatched decl replacements.
1581 2009-10-16 Richard Guenther <rguenther@suse.de>
1584 * lto-streamer-out.c (lto_output_tree_ref): Handle DEBUG_EXPR_DECL
1585 the same as VAR_DECL.
1587 2009-10-16 Richard Guenther <rguenther@suse.de>
1589 * gimple.c (iterative_hash_gimple_type): For integer types
1590 also hash their minimum and maximum values and the string flag.
1591 For array types hash their domain and the string flag.
1593 2009-10-16 Richard Guenther <rguenther@suse.de>
1595 * gimple.c (gimple_types_compatible_p): Restrict completing
1596 types to record or unions. Simplify completion.
1597 Do not merge records or unions with different
1598 TYPE_STRUCTURAL_EQUALITY_P tag.
1599 (iterative_hash_gimple_type): Restrict non-recursing into
1600 pointer targets for records and unions.
1602 2009-10-15 Jakub Jelinek <jakub@redhat.com>
1605 * cfgexpand.c (expand_debug_expr): Handle CONJ_EXPR.
1606 * dwarf2out.c (mem_loc_descriptor): Don't handle
1607 POST_INT/POST_DEC/POST_MODIFY like SUBREG. For SUBREG
1608 punt if it is not lowpart subreg or if inner mode isn't
1611 2009-10-16 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
1613 * config/s390/s390.c (s390_z10_optimize_cmp): Skip notes when
1614 investigating previous or next insns.
1616 2009-10-16 Eric Botcazou <ebotcazou@adacore.com>
1618 * tree-sra.c (build_ref_for_offset_1): Update comment.
1620 2009-10-16 Wolfgang Gellerich <gellerich@de.ibm.com>
1622 * config/s390/s390.md (atype): Added missing values.
1624 2009-10-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1627 * pa.md (casesi): Use sign extended index in call to gen_casesi64p.
1628 (casesi64p): Update pattern to reflect above.
1630 2009-10-15 Steve Ellcey <sje@cup.hp.com>
1632 PR rtl-optimization/41697
1633 * sel-sched-ir.h (_eligible_successor_edge_p): Check successor count.
1635 2009-10-15 Michael Meissner <meissner@linux.vnet.ibm.com>
1638 * config/rs6000/predicates.md: Update copyright year.
1639 * config/rs6000/altivec.md: Ditto.
1641 * config/rs6000/t-rs6000 (TM_H): Add rs6000-builtin.def.
1642 (MD_INCLUDES): Add a2.md.
1644 * config/rs6000/rs6000.c (rs6000_builtin_decls): Change
1645 RS6000_BUILTIN_COUNT to MAX_RS6000_BUILTINS.
1646 (builtin_classify): New static vector to classify various builtins
1647 to get the tree attributes correct.
1648 (def_builtin): Set the attributes of builtins based on what the
1649 builtin does (i.e. memory operation, floating point, saturation
1650 need special attributes, others are pure functions).
1652 * config/rs6000/rs6000.h (enum rs6000_btc): New enum to classify
1654 (enum rs6000_builtins): Include rs6000-builtin.def to define the
1655 builtins. Change the end marker to MAX_RS6000_BUILTINS from
1656 RS6000_BUILTIN_COUNT.
1657 (rs6000_builtin_decls): Change RS6000_BUILTIN_COUNT to
1658 MAX_RS6000_BUILTINS.
1660 * config/rs6000/rs6000-builtin.def: New file that combines the
1661 builtin enumeration name and attributes.
1663 2009-10-15 H.J. Lu <hongjiu.lu@intel.com>
1665 * config/i386/linux.h (ASM_SPEC): Add --32.
1667 2009-10-15 Jakub Jelinek <jakub@redhat.com>
1669 * dwarf2out.c (dwarf_tag_name): Handle DW_TAG_rvalue_reference_type
1670 and DW_TAG_template_alias.
1671 (dwarf_attr_name): Handle DW_AT_main_subprogram,
1672 DW_AT_data_bit_offset, DW_AT_const_expr, DW_AT_enum_class,
1673 DW_AT_linkage_name, DW_AT_GNU_guarded_by, DW_AT_GNU_pt_guarded_by,
1674 DW_AT_GNU_guarded, DW_AT_GNU_pt_guarded, DW_AT_GNU_locks_excluded,
1675 DW_AT_GNU_exclusive_locks_required, DW_AT_GNU_shared_locks_required
1676 and DW_AT_GNU_odr_signature.
1677 (dwarf_form_name): Handle DW_FORM_sec_offset, DW_FORM_exprloc,
1678 DW_FORM_flag_present and DW_FORM_ref_sig8.
1679 (output_signature): Only print name on the first byte.
1680 (output_die): Likewise for dw_val_class_data8.
1682 2009-10-15 Alexander Monakov <amonakov@ispras.ru>
1684 * doc/invoke.texi: Clarify that most optimizations are not enabled
1687 2009-10-15 Richard Guenther <rguenther@suse.de>
1690 * gimple.c (compare_type_names_p): Handle anonymous names
1691 differently based on new mode argument.
1692 (gimple_types_compatible_p): For structs also compare the tags.
1693 (iterative_hash_type_name): Rename to ...
1694 (iterative_hash_name): ... this. Hash all names.
1695 (iterative_hash_gimple_type): Fix hashing the struct tag of
1696 pointer targets. Hash field decl names.
1698 2009-10-15 Richard Guenther <rguenther@suse.de>
1701 * gimple.c (gimple_get_alias_set): Avoid recursing on
1702 invalid type topology.
1704 2009-10-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
1706 * config/spu/spu.c (get_branch_target): Use extract_asm_operands.
1708 2009-10-15 Richard Guenther <rguenther@suse.de>
1710 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
1712 2009-10-15 Jakub Jelinek <jakub@redhat.com>
1714 * config/rs6000/option-defaults.h (OPTION_DEFAULT_SPECS): Don't
1715 add --with-tune{,-32,-64} configured default for -mtune if explicit
1718 2009-10-14 Daniel Gutson <dgutson@codesourcery.com>
1720 * config/arm/neon.md (neon_vshll_n<mode>): Checking Bounds fixed.
1722 2009-10-14 DJ Delorie <dj@redhat.com>
1724 * config/h8300/h8300.c (F): New.
1726 (h8300_emit_stack_adjustment): Call them.
1728 (h8300_push_pop): Likewise.
1729 (h8300_expand_prologue): Likewise.
1730 * config/h8300/h8300.h (DWARF2_DEBUGGING_INFO): Define.
1731 (MUST_USE_SJLJ_EXCEPTIONS): Define.
1732 (INCOMING_RETURN_ADDR_RTX): Define.
1733 (INCOMING_FRAME_SP_OFFSET): Define.
1734 (DWARF_CIE_DATA_ALIGNMENT): Define.
1736 2009-10-14 Jakub Jelinek <jakub@redhat.com>
1738 * stor-layout.c (place_field): Don't emit -Wpadded warnings for
1739 fields in builtin structs.
1740 (finalize_record_size): Likewise.
1742 2009-10-14 Richard Guenther <rguenther@suse.de>
1744 * gimple.c (gtc_ob): New global.
1745 (struct type_pair_d): Replace pointers with type UIDs.
1746 (type_pair_hash): Adjust.
1747 (type_pair_eq): Likewise.
1748 (lookup_type_pair): Likewise. Allocate from an obstack.
1749 (gimple_force_type_merge): Adjust.
1750 (gimple_types_compatible_p): Likewise.
1751 (free_gimple_type_tables): Free the obstack.
1753 2009-10-14 Jakub Jelinek <jakub@redhat.com>
1755 * tree-parloops.c (separate_decls_in_region_debug_bind): Drop debug
1756 stmts setting DEBUG_EXPR_DECLs.
1758 * cfgexpand.c (expand_debug_expr): Ignore zero-length bitfields.
1759 Don't crash if mode1 is VOIDmode.
1761 2009-09-26 Vladimir Makarov <vmakarov@redhat.com>
1763 * params.def (PARAM_IRA_LOOP_RESERVED_REGS): New.
1764 * params.h (IRA_LOOP_RESERVED_REGS): New.
1765 * tree-pass.h (pass_subregs_of_mode_init,
1766 pass_subregs_of_mode_finish): Remove.
1767 * passes.c (pass_subregs_of_mode_init,
1768 pass_subregs_of_mode_finish): Remove.
1769 (pass_reginfo_init): Move before loop optimizations.
1770 * config/i386/i386.h (STACK_REG_COVER_CLASS): Define.
1771 * common.opt (fira-loop-pressure): New.
1772 * toplev.h (flag_ira_loop_pressure): New.
1773 * rtl.h (init_subregs_of_mode, finish_subregs_of_mode): New externals.
1774 * reginfo.c (init_subregs_of_mode, finish_subregs_of_mode):
1775 Make external and void type functions.
1776 (gate_subregs_of_mode_init, pass_subregs_of_mode_init,
1777 pass_subregs_of_mode_finish): Remove.
1778 * ira-costs.c (init_costs): Call init_subregs_of_mode.
1779 * regmove.c: Include ira.h.
1780 (regmove_optimize): Call ira_set_pseudo_classes after IRA based
1781 register pressure calculation in loops.
1782 * loop-invariant.c: Include REGS_H and ira.h.
1783 (struct loop_data): New members max_reg_pressure, regs_ref, and
1785 (struct invariant): New member orig_regno.
1786 (curr_loop): New variable.
1787 (find_exits): Initialize regs_ref and regs_live.
1788 (create_new_invariant): Initialize orig_regno.
1789 (get_cover_class_and_nregs): New.
1790 (get_inv_cost): Make aregs_needed an array. Use regs_needed as an
1791 array. Add code for flag_ira_loop_pressure.
1792 (gain_for_invariant): Make new_regs an array. Add code for
1793 flag_ira_loop_pressure.
1794 (best_gain_for_invariant): Ditto.
1795 (set_move_mark): New parameter gain. Use it for debugging output.
1796 (find_invariants_to_move): Make regs_needed and new_regs an array.
1797 Add code for flag_ira_loop_pressure.
1798 (move_invariant_reg): Set up orig_regno.
1799 (move_invariants): Set up reg classes for pseudos for
1800 flag_ira_loop_pressure.
1801 (free_loop_data): Clear regs_ref and regs_live.
1802 (curr_regs_live, curr_reg_pressure, regs_set, n_regs_set,
1803 get_regno_cover_class, change_pressure, mark_regno_live,
1804 mark_regno_death, mark_reg_store, mark_reg_clobber,
1805 mark_reg_death, mark_ref_regs, calculate_loop_reg_pressure): New.
1806 (move_loop_invariants): Calculate pressure. Initialize curr_loop.
1807 * ira.c (ira): Call ira_set_pseudo_classes after IRA based
1808 register pressure calculation in loops if new regs were added.
1809 Call finish_subregs_of_mode.
1810 * opts.c (decode_options): Set up flag_ira_loop_pressure.
1811 * Makefile.in (loop-invariant.o): Add ira.h.
1813 * doc/invoke.texi (-fira-loop-pressure, ira-loop-reserved-regs):
1815 * doc/tm.texi (STACK_REG_COVER_CLASS): Describe.
1817 2009-10-14 Richard Guenther <rguenther@suse.de>
1819 * lto-symtab.c (lto_symtab_compatible): Fold in ...
1820 (lto_symtab_merge): ... here. Rewrite both to take the
1821 prevailing and a to-be-merged entry and to queue diagnostics properly.
1822 (lto_symtab_resolve_replaceable_p): New predicate for
1824 (lto_symtab_resolve_can_prevail_p): Likewise.
1825 (lto_symtab_resolve_symbols): Rewrite. Fold in code that
1826 handles merging commons by choosing the largest decl. Fold
1827 in code that gives ODR errors.
1828 (lto_symtab_merge_decls_2): Simplify a lot. Emit queued
1830 (lto_symtab_merge_decls_1): Re-structure. Deal with the
1831 case of no prevailing decl here. Diagnose mismatches
1832 in object types here. Drop all but the prevailing decls.
1833 (lto_symtab_prevailing_decl): Return the single prevailing decl.
1834 * lto-streamer-in.c (lto_input_tree_ref): Deal with
1835 VIEW_CONVERT_EXPRs in decl slots. Unshare the tree in this case.
1837 2009-10-14 Richard Guenther <rguenther@suse.de>
1840 * lto-streamer-in.c (input_bb): Replace debug stmts with
1841 nops instead of dropping them.
1843 2009-10-14 Nick Clifton <nickc@redhat.com>
1845 * gcc/doc/extended.texi: Replace the dash character with @minus{}
1846 in situations where it is being used as a minus symbol.
1847 * gcc/doc/tm.texi: Likewise.
1848 * gcc/doc/md.texi: Likewise.
1850 2009-10-14 Jakub Jelinek <jakub@redhat.com>
1852 PR preprocessor/41543
1853 * input.h (BUILTINS_LOCATION): Change to 1 from 2.
1854 Assert BUILTINS_LOCATION < RESERVED_LOCATION_COUNT.
1855 * tree.c: Include intl.h.
1856 (expand_location): Handle BUILTINS_LOCATION.
1857 * Makefile.in (tree.o): Depend on intl.h.
1860 * dwarf2out.c (dwarf2out_var_location): Always clear
1861 last_postcall_label when changing last_label.
1863 2009-10-14 Pascal Obry <obry@adacore.com>
1865 * gcc.c (DEFAULT_SWITCH_CURTAILS_COMPILATION): Add -E.
1866 (process_command): Handle -E as done with -c and -S. Do not add
1867 the target executable suffix to the output file when -E is used.
1868 (main): Adjust error message accordingly.
1870 2009-10-14 Alexandre Oliva <aoliva@redhat.com>
1876 * tree.c (tree_node_structure_for_code): DEBUG_EXPR_DECL uses
1878 (tree_code_size): Likewise.
1880 2009-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1882 * builtins.c (fold_builtin_1): Support complex "arc" functions.
1883 * real.h (HAVE_mpc_arc): Define.
1885 2009-10-14 Kaz Kojima <kkojima@gcc.gnu.org>
1887 * config/sh/sh.c (TARGET_BUILTIN_DECL): Define.
1888 (struct builtin_description): Add fndecl field.
1889 (bdesc): Remove const qualifier. Update initializer.
1890 (sh_media_init_builtins): Remove const qualifier for d. Record
1891 the result of add_builtin_function to the fndecl field.
1892 (sh_builtin_decl): New.
1893 (sh_media_builtin_decl): New.
1895 2009-10-14 Hans-Peter Nilsson <hp@axis.com>
1898 * config/cris/cris.h (SECONDARY_RELOAD_CLASS): Handle reload
1899 requests between special registers.
1901 2009-10-13 Eric Botcazou <ebotcazou@adacore.com>
1903 * dwarf2out.c (mem_loc_descriptor): Accept UNGT as well.
1905 2009-10-13 Richard Henderson <rth@redhat.com>
1907 PR tree-optimization/41377
1908 * tree-eh.c (unsplit_eh): Propagate degenerate PHIs.
1909 (cleanup_empty_eh_merge_phis): New change_region parameter;
1910 pass it on to redirect_eh_edge_1. Update callers.
1911 (cleanup_empty_eh_unsplit): Don't require an existing EH label
1912 at the destination block.
1914 2009-10-13 Basile Starynkevitch <basile@starynkevitch.net>
1916 * passes.c (register_pass): Replaced gcc_unreachable by
1917 fatal_error on failure. Mentions plugins in comments & messages.
1919 2009-10-13 Jakub Jelinek <jakub@redhat.com>
1922 * rtl.h (DEBUG_EXPR_TREE_DECL): Define.
1923 * sched-vis.c (print_value): Use it.
1924 * cselib.c (cselib_hash_rtx): Likewise.
1925 * print-rtl.c (print_rtx): Likewise.
1926 * cfgexpand.c (expand_debug_rtx): Likewise.
1927 * var-tracking.c (vt_expand_loc_callback): Likewise.
1929 2009-10-13 Richard Guenther <rguenther@suse.de>
1932 * opts.c (handle_option): Split out code to handle setting
1933 the options flag var ...
1934 (set_option): ... here.
1935 * opts.h (set_option): Declare.
1936 * lto-opts.c (register_user_option_p): Include -fexceptions
1937 and all position independent code variants.
1938 (handle_common_option): Remove.
1939 (lto_reissue_options): Use set_option.
1941 2009-10-13 Martin Jambor <mjambor@suse.cz>
1943 PR tree-optimization/41661
1944 * ipa-prop.c (compute_complex_pass_through): Allow only operations
1945 that are tcc_comparisons or do not change the type in any
1947 * ipa-cp.c (ipcp_lattice_from_jfunc): Request boolean type when
1948 folding tcc_comparison operations.
1950 2009-10-13 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
1952 * config/s390/s390.c (s390_encode_section_info): Handle BLKmode
1955 2009-10-12 Alexandre Oliva <aoliva@redhat.com>
1961 * tree.def (DEBUG_EXPR_DECL): New.
1962 * rtl.def (DEBUG_EXPR): New.
1963 * gengtype.c (adjust_field_rtx_def): Handle it.
1964 * tree-ssa.c (propagate_var_def_into_debug_stmts): Rename to...
1965 (insert_debug_temp_for_var_def): ... this. Drop support for
1966 moving. Take iterator for def stmt; insert debug stmt before it.
1967 Scan early for use count and kind in debug stmts.
1968 (propagate_defs_into_debug_stmts): Rename to...
1969 (insert_debug_temps_for_defs): ... this. Likewise.
1970 * tree.h (DEBUG_TEMP_UID): New.
1971 * tree.c (next_debug_decl_uid): New.
1972 (make_node_stat): Count debug decls separately.
1973 (copy_node_stat): Likewise.
1974 * cfgexpand.c (expand_debug_expr): Handle DEBUG_EXPR_DECL.
1975 * var-tracking.c (dv_is_decl_p): Recognize it.
1976 (VALUE_RECURSED_INTO): Apply to DEBUG_EXPRs too.
1977 (track_expr_p): Track expanded DEBUG_EXPR_DECLs.
1978 (vt_expand_loc_callback): Expand DEBUG_EXPRs.
1979 (emit_note_insn_var_location): Don't emit notes for DEBUG_EXPR_DECLs.
1980 * cselib.c (rtx_equal_for_cselib_p): Handle DEBUG_EXPR.
1981 (cselib_hash_rtx): Likewise.
1982 (cselib_expand_value_rtx_1): Use callback for DEBUG_EXPR.
1983 * tree-ssa-operands.c (get_expr_operands): Skip DEBUG_EXPR_DECLs in
1985 * emit-rtl.c (verify_rtx_sharing): Handle DEBUG_EXPR and VALUE.
1986 (copy_rtx_if_shared_1, reset_used_flags, set_used_flags): Likewise.
1987 * rtl.c (copy_rtx): Likewise.
1988 (rtx_equal_p_cb, rtx_equal_p): Handle DEBUG_EXPR.
1989 * print-rtl.c (print_rtx): Likewise.
1990 * sched-vis.c (print_value): Likewise.
1991 (print_insn): Handle DEBUG_EXPR_DECL.
1992 * tree-dump.c (dequeue_and_dump): Likewise.
1993 * tree-pretty-print.c (dump_decl_name, dump_generic_node): Likewise.
1994 * gimple-iterator (gsi_replace): Check for same lhs.
1995 (gsi_remove): Insert debug temps.
1996 * tree-ssa-loop-im.c (rewrite_reciprocal): Replace with same lhs.
1997 (move_computations_stmt): Drop explicit propagation into debug stmts.
1998 (rewrite_bittest): Likewise. Use gsi_remove for propagation.
1999 * tree-ssa-reassoc.c (rewrite_expr_tree, linearize_expr): Likewise.
2000 * tree-ssa-sink.c (statement_sink_location): Likewise.
2001 * tree-ssa-forwprop (forward_propagate_addr_expr): Likewise.
2002 * tree-ssanames.c (release_ssa_name): Adjust for rename.
2003 * tree-flow.h: Likewise.
2004 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Don't mark
2005 debug temps without values.
2006 (eliminate_unnecessary_stmts): Don't discard just-inserted
2009 2009-10-12 Hans-Peter Nilsson <hp@axis.com>
2012 * config/cris/cris.md (andu): Check that operand 1 is one of the
2013 general registers. Fix typo in head comment.
2015 2009-10-12 Stefan Dösinger <stefan@codeweavers.com>
2017 * config/i386/i386.md (vswapmov): New.
2018 * config/i386/i386.c (ix86_handle_fndecl_attribute): New.
2019 (ix86_function_ms_hook_prologue): New.
2020 (ix86_expand_prologue): Handle ms_hook_prologue attribute.
2021 * configure.ac: Test for swap suffix support in as.
2022 * configure: Rebuild.
2024 2009-10-12 Jakub Jelinek <jakub@redhat.com>
2027 * config/i386/i386.md (split after *testqi_ext_3_rex64): Only narrow
2028 paradoxical subregs to prevent partial register stalls if the inner
2029 mode is integer mode.
2031 2009-10-12 Uros Bizjak <ubizjak@gmail.com>
2033 * config/i386/i386.md (*setcc_<mode>_2): Remove insn pattern.
2035 2009-10-12 Dodji Seketeli <dodji@redhat.com>
2038 * gcc/dwarf2out.c (template_parameter_pack_die,
2039 gen_formal_parameter_pack_die): Use add_name_and_src_coords_attributes.
2041 2009-10-12 Alexandre Oliva <aoliva@redhat.com>
2044 * tree-into-ssa.c (insert_phi_nodes_for): Build debug bind stmts
2046 (maybe_register_def): Likewise. Take stmt iterator.
2047 (rewrite_update_stmt): Take stmt iterator and pass it on.
2048 (rewrite_update_enter_block): Pass stmt iterator.
2050 2009-10-11 Andrew Pinski <andrew_pinski@playstation.sony.com>
2052 * config/spu/spu.c (TARGET_BUILTIN_DECL): Define.
2053 (spu_builtin_decl): New function.
2055 2009-10-12 Uros Bizjak <ubizjak@gmail.com>
2057 * config/i386/i386.md (SWIM): New mode iterator.
2058 (mov<mode>cc): Macroize expander from mov{qi,hi,si,di}cc patterns
2059 using SWIM mode iterator.
2060 (x86_mov<mode>cc_0_m1): Macroize insn from x86_mov{si,di}cc_0_m1
2061 patterns using SWI48 mode iterator.
2062 (*x86_mov<mode>cc_0_m1_se): Macroize insn from
2063 *x86_mov{si,di}cc_0_m1_se patterns using SWI48 mode iterator.
2064 (*x86_mov<mode>cc_0_m1_neg): New insn pattern.
2065 (*mov<mode>cc_noc): Macroize insn from *mov{hi,si,di}cc_noc
2066 patterns using SWI248 mode iterator.
2067 * config/i386/i386.c (ix86_expand_int_movcc): Update the call to
2068 gen_x86_movdicc_0_m1_rex64 for renamed function
2070 2009-10-11 Jose Ruiz <ruiz@adacore.com>
2071 Eric Botcazou <ebotcazou@adacore.com>
2074 * config/sparc/sol2.h (MD_UNWIND_SUPPORT): Define.
2075 * config/sparc/sol2-unwind.h: New file.
2077 2009-10-11 Olivier Hainque <hainque@adacore.com>
2078 Eric Botcazou <ebotcazou@adacore.com>
2081 * config/i386/sol2.h (MD_UNWIND_SUPPORT): Define.
2082 * config/i386/sol2-unwind.h: New file.
2084 2009-10-11 H.J. Lu <hongjiu.lu@intel.com>
2087 * config/i386/i386.md (addsi_1_zext): Get the proper second
2090 2009-10-11 Richard Sandiford <rdsandiford@googlemail.com>
2092 * simplify-rtx.c (simplify_replace_rtx): Use rtx_equal_p for
2093 all OLD_RTXes, not just REGs. Use copy_rtx to create the
2096 2009-10-11 Richard Guenther <rguenther@suse.de>
2098 * gimple.c (iterative_hash_type_name): Do not handle special
2101 2009-10-11 Uros Bizjak <ubizjak@gmail.com>
2103 * config/i386/i386.md (*setcc_di_1): New insn_and_split pattern.
2104 (*setcc_si_1_and): Ditto.
2105 (*setcc_si_1_movzbl): Ditto.
2106 (*setcc_<mode>_2): Ditto.
2107 (*setcc_qi): Rename from *setcc_1.
2108 (*setcc_qi_slp): Rename from *setcc_2.
2110 (*zero_extendqihi2_movzbw_and splitter): Use ix86_expand_clear.
2111 (*zero_extendqisi2_movzbw_and splitter): Ditto.
2113 * config/i386/i386.c (ix86_expand_clear): Remove reload_completed from
2114 "if" condition, there is already assert with reload_completed present.
2116 2009-10-11 Gerald Pfeifer <gerald@pfeifer.com>
2118 * plugin.c (try_init_one_plugin): Improve constness of variable err.
2120 2009-10-10 Gerald Pfeifer <gerald@pfeifer.com>
2122 * doc/install.texi (Final install): Refer to
2123 http://gcc.gnu.org/bugs/ for bug reporting.
2125 2009-10-10 Peter Bergner <bergner@vnet.ibm.com>
2127 * configure.ac: Add test for dci instruction.
2128 * configure: Regenerate.
2129 * config.in: Likewise.
2130 * config.gcc: Handle --with-cpu=476 and --with-cpu=476fp.
2131 * doc/invoke.texi: Add cpu_type 476 and 476fp.
2132 (-mmulhw): Add 476 to description.
2133 (-mdlmzb): Likewise.
2134 * config/rs6000/t-fprules (MULTILIB_MATCHES_FLOAT): Include -mcpu=476.
2135 * config/rs6000/rs6000.c (processor_costs): Add ppc476_cost.
2136 (processor_target_table): Add 476 and 476fp entries.
2137 (rs6000_override_options): Use ppc476_cost for PROCESSOR_PPC476.
2138 (rs6000_issue_rate): Add CPU_PPC476.
2139 * config/rs6000/rs6000.h (ASM_CPU_476_SPEC): Define.
2140 (ASM_CPU_SPEC): Pass %(asm_cpu_476) for -mcpu=476 and -mcpu=476fp.
2141 (processor_type): Add PROCESSOR_PPC476.
2142 (EXTRA_SPECS): Add asm_cpu_476 string.
2143 * config/rs6000/rs6000.md (define_attr "type"): Add isel attribute.
2144 (define_attr "cpu"): Add ppc476.
2146 Update comments for 476.
2147 (isel_signed, isel_unsigned): Change to use "isel" type attribute.
2148 * config/rs6000/vxworks.h (CPP_SPEC): Handle 464 and 476.
2149 Update copyright year.
2150 * config/rs6000/476.md: New file.
2151 * config/rs6000/40x.md: Add description for "isel" attribute.
2152 Update copyright year.
2153 * config/rs6000/440.md: Likewise.
2154 * config/rs6000/603.md: Likewise.
2155 * config/rs6000/6xx.md: Likewise.
2156 * config/rs6000/7450.md: Likewise.
2157 * config/rs6000/7xx.md: Likewise.
2158 * config/rs6000/8540.md: Likewise.
2159 * config/rs6000/cell.md: Likewise.
2160 * config/rs6000/e300c2c3.md: Likewise.
2161 * config/rs6000/e500mc.md: Likewise.
2162 * config/rs6000/mpc.md: Likewise.
2163 * config/rs6000/power4.md: Likewise.
2164 * config/rs6000/power5.md: Likewise.
2165 * config/rs6000/power6.md: Likewise.
2166 * config/rs6000/power7.md: Likewise.
2167 * config/rs6000/rios1.md: Likewise.
2168 * config/rs6000/rios2.md: Likewise.
2169 * config/rs6000/rs64.md: Likewise.
2171 2009-10-10 Richard Guenther <rguenther@suse.de>
2173 PR tree-optimization/41654
2174 * tree-ssa-ifcombine.c (ifcombine_ifandif): Properly canonicalize
2175 a cond expr before calling gimple_cond_set_condition_from_tree.
2176 (ifcombine_iforif): Likewise.
2178 2009-10-09 Ian Lance Taylor <iant@google.com>
2180 * configure.ac: Use AC_SEARCH_LIBS to find dlopen.
2181 * configure: Rebuild.
2183 2009-10-09 Neil Vachharajani <nvachhar@google.com>
2185 * doc/cpp.texi (Other Directives): Do not list #ident and #sccs as
2188 2009-10-09 Richard Guenther <rguenther@suse.de>
2191 * target-def.h (TARGET_BUILTIN_DECL): Define.
2192 (TARGET_INITIALIZER): Add TARGET_BUILTIN_DECL.
2193 * target.h (struct gcc_target): Add builtin_decl target hook.
2194 * doc/tm.texi (TARGET_BUILTIN_DECL): Document.
2195 * lto-streamer-in.c (lto_get_builtin_tree): Fix handling of
2197 * lto-streamer-out.c (lto_output_tree_pointers): Use sorry,
2198 not gcc_unreachable.
2199 (lto_output_builtin_tree): Sorry if the target does not support
2200 streaming target builtins.
2201 * config/rs6000/rs6000.c (TARGET_BUILTIN_DECL): Define.
2202 (rs6000_builtin_decl): New function.
2203 * config/i386/i386.c (TARGET_BUILTIN_DECL): Define.
2204 (ix86_builtin_decl): New function.
2206 2009-10-09 Jakub Jelinek <jakub@redhat.com>
2208 PR preprocessor/41445
2209 * c-ppoutput.c (do_line_change): New function.
2210 (cb_line_change): Use it.
2211 (scan_translation_unit): Call do_line_change if
2212 avoid_paste or PREV_WHITE and token location is on a different line
2213 than print.src_line.
2216 * dwarf2out.c (dwarf2out_init): Test whether
2217 HAVE_GAS_CFI_SECTIONS_DIRECTIVE is non-zero instead of checking
2220 PR rtl-optimization/41646
2221 * calls.c (expand_call): For BLKmode types returned in registers
2222 avoid likely spilled hard regs in copy_blkmode_from_reg generated
2225 2009-10-09 Richard Guenther <rguenther@suse.de>
2227 PR tree-optimization/41634
2228 * tree-ssa-dom.c (remove_local_expressions_from_table): Assert
2229 we remove the correct elements.
2230 (optimize_stmt): Make sure to update stmt operands before
2231 optimizing redundancies.
2233 2009-10-09 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
2235 * config/s390/s390.md ("prefetch"): Remove stcmh for prefetching.
2237 2009-10-09 Richard Guenther <rguenther@suse.de>
2240 * lto-wrapper.c (ltrans_output_file, flto_out, args_name): New
2242 (lto_wrapper_exit): New function.
2244 (fatal_perror): Likewise.
2245 (fork_execute): Use global args_name, do not free it.
2246 (run_gcc): Use global ltrans_output_file, flto_out, do not free them.
2247 * lto-streamer.h: Remove duplicate prototypes.
2249 2009-10-09 Richard Guenther <rguenther@suse.de>
2251 * cgraph.c (cgraph_create_edge): Check for NULL call_stmt
2252 before calling stmt_can_throw_external.
2254 2009-10-09 Eric Botcazou <ebotcazou@adacore.com>
2256 PR tree-optimization/40071
2257 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Build a ref-all
2258 pointer if the original data reference doesn't conflict with the
2259 created vector data reference. Fix long line.
2261 2009-10-09 Uros Bizjak <ubizjak@gmail.com>
2263 * config/i386/i386.md (any_div): New code iterator.
2264 (u): Handle div and udiv.
2266 (<u>divqi3): Macroize insn from {,u}divqi3 using any_div
2268 (lfloor<MODEF:mode><SWI48:mode>2): Macroize insn from
2269 lfloor<mode>{si,di}2 patterns using SWI48 mode iterator.
2270 (lceil<MODEF:mode><SWI48:mode>2): Macroize insn from
2271 lceil<mode>{si,di}2 patterns using SWI48 mode iterator.
2273 2009-10-08 Joseph Myers <joseph@codesourcery.com>
2275 * gcc.c (main): Remove trailing "." from diagnostics.
2277 2009-10-08 Cary Coutant <ccoutant@google.com>
2279 Add support for debugging with ICF (Identical Code Folding).
2280 * calls.c (debug.h): New #include.
2281 (emit_call_1): Call virtual_call_token debug hook.
2282 * common.opt (-fenable-icf-debug): New option.
2283 * dwarf2out.c (dwarf2_debug_hooks): Add entries for new hooks (two
2284 locations in the source).
2285 (poc_label_num): New variable.
2286 (dcall_entry, vcall_entry): New typedefs.
2287 (dcall_table, vcall_table): New variables.
2288 (struct vcall_insn): New type.
2289 (vcall_insn_table): New variable.
2290 (DEBUG_DCALL_SECTION, DEBUG_VCALL_SECTION): New macros.
2291 (size_of_dcall_table): New function.
2292 (output_dcall_table): New function.
2293 (size_of_vcall_table): New function.
2294 (output_vcall_table): New function.
2295 (dwarf2out_direct_call): New function.
2296 (vcall_insn_table_hash): New function.
2297 (vcall_insn_table_eq): New function.
2298 (dwarf2out_virtual_call_token): New function.
2299 (dwarf2out_virtual_call): New function.
2300 (dwarf2out_init): Allocate new tables and sections.
2301 (prune_unused_types): Mark DIEs referenced from direct call table.
2302 (dwarf2out_finish): Output direct and virtual call tables.
2303 * final.c (final_scan_insn): Call direct_call and virtual_call
2305 * debug.h (struct gcc_debug_hooks): Add direct_call,
2306 virtual_call_token, virtual_call hooks.
2307 (debug_nothing_uid): New function.
2308 * debug.c (do_nothing_debug_hooks): Add dummy entries for new hooks.
2309 (debug_nothing_uid): New function.
2310 * dbxout.c (dbx_debug_hooks): Add dummy entries for new hooks.
2311 (xcoff_debug_hooks): Likewise.
2312 * sdbout.c (sdb_debug_hooks): Likewise.
2313 * vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
2314 * doc/invoke.texi (-fenable-icf-debug): New option.
2316 2009-10-08 Alexandre Oliva <aoliva@redhat.com>
2319 * regmove.c (regmove_backward_pass): Replace src with dst in the
2320 debug insn, and check for dst before rather than after.
2322 2009-10-08 Janis Johnson <janis187@us.ibm.com>
2324 * config/rs6000/rs6000.c (rs6000_delegitimize_address): Remove.
2325 (TARGET_DELEGITIMIZE_ADDRESS): Likewise.
2327 2009-10-08 Jan Hubicka <jh@suse.cz>
2330 * cgraphbuild.c (record_reference): When parameter DATA is NULL,
2331 do not mark cgraph nodes as needed.
2332 (record_references_in_initializer): Add new only_vars parameter.
2333 * cgraph.h (record_references_in_initializer): New parameter.
2334 * varasm.c (assemble_variable): Update call.
2335 * varpool.c (varpool_analyze_pending_decls): Always look for
2338 2009-10-08 Anatoly Sokolov <aesok@post.ru>
2340 * config/avr/avr.c (last_insn_address) Remove variable.
2341 (expand_prologue): Don't initialise last_insn_address variable.
2342 (final_prescan_insn): Don't output insn size.
2343 * config/avr/avr.opt (msize): Remove switch.
2344 * doc/invoke.texi (AVR Options): Remove documentation of -msize
2347 2009-10-08 Adam Nemet <anemet@caviumnetworks.com>
2349 * combine.c (label_tick_ebb_start): Fix comment.
2350 (combine_instructions): Set label_tick and label_tick_ebb_start before
2351 calling setup_incoming_promotions. Start them from 1. Increment
2352 label_tick instead of deriving it from the BB index. Rather than
2353 comparing ticks use the block from the previous iteration to decide
2354 whether to start a new EBB. Remove empty lines before function.
2356 2009-10-08 Michael Matz <matz@suse.de>
2359 * builtins.c (fold_builtin_isascii): Use fold_build2.
2360 (fold_builtin_isdigit): Ditto.
2361 * except.c (duplicate_eh_regions_1): Tolerate NULL labels.
2362 * tree-cfg.c (struct rus_data, remove_useless_stmts_warn_notreached,
2363 remove_useless_stmts_cond, remove_useless_stmts_tf,
2364 remove_useless_stmts_tc, remove_useless_stmts_bind,
2365 remove_useless_stmts_goto, remove_useless_stmts_label,
2366 remove_useless_stmts_1, remove_useless_stmts,
2367 pass_remove_useless_stmts): Remove.
2368 * tree-pass.h (pass_remove_useless_stmts): Don't declare.
2369 * passes.c (init_optimization_passes): Don't add
2370 pass_remove_useless_stmts.
2371 * tree-eh.c (lower_eh_constructs_2): Handle empty cleanups.
2372 * tree.c (free_lang_data_in_decl): Don't clear DECL_INITIAL of
2374 * lto-symtab.c (lto_symtab_register_decl): Accepts DECL_INITIAL
2375 for static constants.
2376 * lto-streamer-out.c (output_gimple_stmt): Handle GIMPLE_NOP.
2377 * lto-streamer-in.c (input_gimple_stmt): Handle GIMPLE_NOP.
2379 2009-10-08 Richard Guenther <rguenther@suse.de>
2381 * gimple.c (free_gimple_type_tables): New function.
2382 * gimple.h (free_gimple_type_tables): Declare.
2384 2009-10-07 Mark Heffernan <meheff@google.com>
2386 * ipa-prop.c (ipa_print_node_params) Only print
2387 names of named arguments.
2389 2009-10-08 Rafael Avila de Espindola <espindola@google.com>
2391 * gcc.c (LINK_COMMAND_SPEC): Pass libc with -pass-through if it is
2392 being statically linked.
2394 2009-10-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2396 * collect2.c (add_lto_object): Only define if OBJECT_FORMAT_NONE.
2398 2009-10-08 Jan Hubicka <jh@suse.cz>
2401 * ipa.c (cgraph_externally_visible_p,
2402 function_and_variable_visibility,
2403 whole_program_function_and_variable_visibility): Skip non-finalized
2406 2009-10-08 Nick Clifton <nickc@redhat.com>
2408 * config/mn10300/mn10300.h (CONSTANT_ADDRESS_P): Do not allow
2411 2009-10-08 Andreas Tobler <a.tobler@schweiz.org>
2414 * config.host: Use config/x-cflags-O1 for powerpc FreeBSD.
2416 2009-10-07 Joseph Myers <joseph@codesourcery.com>
2419 * c-common.c (c_fully_fold_internal): Strip nops from the result
2420 of recursive calls to c_fully_fold_internal.
2421 (c_wrap_maybe_const): New.
2422 (c_save_expr): Use c_wrap_maybe_const.
2423 * c-common.h (c_wrap_maybe_const): Declare.
2424 * c-typeck.c (build_conditional_expr, c_finish_stmt_expr,
2425 build_binary_op): Use c_wrap_maybe_const.
2427 2009-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2429 * real.c: Fix comment to reflect actual exponent size.
2431 2009-10-08 Ben Elliston <bje@au.ibm.com>
2433 * config/rs6000/a2.md: Add FSF comment header.
2435 2009-10-07 Uros Bizjak <ubizjak@gmail.com>
2437 * config/i386/i386.md (any_extend): New code iterator.
2438 (u, s): New code attributes.
2440 (DWIH): Rewrite as code iterator for SI and DI modes.
2441 (DWI): Rewrite as mode attribute.
2442 (dwi): New mode attribute.
2443 (di): Depend on SI mode and DI mode.
2444 (doubleint_general_operand): Remove mode attribute.
2446 (*lea_1): Macroize insn from *lea_1_rex64 and *lea_1 patterns using
2449 (*add<mode>3_doubleword): Use DWIH as the base mode iterator.
2450 (*sub<mode>3_doubleword): Ditto.
2452 (mul<mode>3): Macroize expander from mul{hi,si,di}3 patterns
2453 using SWIM248 mode iterator.
2454 (*mul<mode>3_1): Macroize insn from mul{si,di}3_1 patterns
2455 using SWI48 mode iterator.
2456 (<u>mul<mode><dwi>3): Macroize expander from {,u}mul{sidi,diti}3
2457 patterns using DWIH mode iterator and any_extend code iterator.
2458 (<u>mulqihi3): Macroize expander from {,u}mulqihi3 patterns
2459 using any_extend code iterator.
2460 (*<u>mul<mode><dwi>3_1): Macroize insn from {,u}mul{sidi,diti}3_1
2461 patterns using DWIH mode iterator and any_extend code iterator.
2462 (*<u>mulqihi3_1): Macroize insn from {,u}mulqihi3_1 patterns
2463 using any_extend code iterator.
2464 (<s>mul<mode>3_highpart): Macroize expander from
2465 {s,u}mul{si,di}3_highpart patterns using DWIH mode iterator
2466 and any_extend code iterator.
2467 (*<s>muldi3_highpart_1): Macroize insn from
2468 *{s,u}muldi3_highpart_rex64 patterns using any_extend code iterator.
2469 (*<s>mulsi3_highpart_1): Macroize insn from *{s,u}mulsi3_highpart_1
2470 patterns using any_extend code iterator.
2471 (*<s>mulsi3_highpart_zext): Macroize insn from
2472 *{s,u}mulsi3_highpart_zext patterns using any_extend code iterator.
2474 2009-10-07 Jakub Jelinek <jakub@redhat.com>
2476 * dwarf2out.c (tree_add_const_value_attribute_for_decl): Don't add
2477 DW_AT_const_value if VAR_DIE already has DW_AT_abstract_origin
2478 refering to a DIE with DW_AT_const_value.
2480 2009-10-07 Vladimir Makarov <vmakarov@redhat.com>
2483 * ira-lives.c (check_and_make_def_conflict): Process all operands.
2485 2009-10-06 Jan Hubicka <jh@suse.cz>
2487 * cgraph.c (cgraph_node_can_be_local): Handle externally visible nodes
2490 2009-10-06 Uros Bizjak <ubizjak@gmail.com>
2492 * config/i386/i386.md (*lea_1_rex64, *lea_1, *lea_1_zext,
2493 *lea_2_rex64): Move before *add<mode>_1 pattern.
2495 2009-10-07 Jan Hubicka <jh@suse.cz>
2497 * collect2.c (main): Add -fno-whole-program.
2498 * gcc.c (set_collect_gcc_options): Do not remove whole program here.
2500 2009-10-07 Jan Hubicka <jh@suse.cz>
2502 * lto-symtab.c (lto_cgraph_replace_node): Assert that inline clones
2503 has no address taken.
2504 * cgraph.c (cgraph_mark_needed_node): Assert that inline clones are
2506 (cgraph_clone_node): Clear externally_visible flag for clones.
2507 * cgraph.h (cgraph_only_called_directly_p,
2508 cgraph_can_remove_if_no_direct_calls_p): New predicates.
2509 * tree-pass.h (pass_ipa_whole_program_visibility): Declare.
2510 * ipa-cp.c (ipcp_cloning_candidate_p): Use new predicate.
2511 (ipcp_initialize_node_lattices, ipcp_estimate_growth,
2512 ipcp_insert_stage): Likwise.
2513 * cgraphunit.c (cgraph_decide_is_function_needed): Do not compute
2514 externally_visible flag.
2515 (verify_cgraph_node): Verify that inline clones look right.
2516 (process_function_and_variable_attributes): Do not set
2517 externally_visible flags.
2518 (ipa_passes): Avoid executing small_ipa_passes at LTO stage; they've
2520 * lto-cgraph.c (lto_output_node): Assert that inline clones are not
2522 * ipa-inline.c (cgraph_clone_inlined_nodes): Use new predicates;
2523 clear externally_visible when turning into inline clones
2524 (cgraph_mark_inline_edge): Use new predicates.
2525 (cgraph_estimate_growth): Likewise.
2526 (cgraph_decide_inlining): Likewise.
2527 * ipa.c (cgraph_postorder): Likewise.
2528 (cgraph_remove_unreachable_nodes): Likewise; sanity check
2529 that inline clones are not needed.
2530 (cgraph_externally_visible_p): New predicate.
2531 (function_and_variable_visibility): Add whole_program parameter;
2532 always set externally_visible flag; handle COMDAT function
2534 (local_function_and_variable_visibility): New function.
2535 (gate_whole_program_function_and_variable_visibility): New function.
2536 (whole_program_function_and_variable_visibility): New function.
2537 (pass_ipa_whole_program_visibility): New function.
2538 * passes.c (init_optimization_passes): Add whole program visibility
2540 (do_per_function_toporder, function_called_by_processed_nodes_p): Do
2541 not care about needed/reachable flags.
2542 * varpool.c: Include flags.h
2543 (decide_is_variable_needed): When doing LTO assume whole-program mode.
2544 (varpool_finalize_decl): When we are in LTO read-back, all variables
2546 (varpool_analyze_pending_decls): Skip analyzis of analyzed vars.
2548 2009-10-07 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
2550 * config/s390/tpf.h (TARGET_DEFAULT): Remove MASK_HARD_FLOAT and
2553 2009-10-07 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
2555 * config.gcc: Don't include the makefile fragments intended for
2557 * config/s390/fixdfdi.h: File removed.
2558 * config/s390/libgcc-glibc.ver: File removed.
2559 * config/s390/s390.h: Remove the fixdfdi.h hack.
2560 * config/s390/t-crtstuff: File moved to libgcc dir.
2561 * config/s390/t-linux: Likewise.
2562 * config/s390/t-tpf: libgcc specific parts removed.
2563 * config/s390/t-linux64: Likewise.
2565 2009-10-06 Jerry Quinn <jlquinn@optonline.net>
2567 * Makefile.in (lto-wrapper): Use COMPILER and ALL_COMPILERFLAGS.
2568 (lto-compress.o): Likewise.
2570 2009-10-07 Danny Smith <dannysmith@users.sourceforge.net>
2573 * config/i386/winnt.c (i386_pe_determine_dllexport_p): Don't propagate
2574 dllexport to class members here.
2575 (i386_pe_determine_dllimport_p): Only check static class data for
2577 (i386_pe_encode_section_info): Don't recheck DECL_DLLIMPORT_P.
2578 * config/i386/winnt-cxx.c (i386_pe_type_dllimport_p): Only check
2579 functions for vague linkage.
2580 (i386_pe_type_dllexport_p): Fix formatting.
2581 (maybe_add_dllexport) New function.
2582 (i386_pe_adjust_class_at_definition): Use it to propagate dllexport
2585 2009-10-07 Ben Elliston <bje@au.ibm.com>
2587 * config/rs6000/a2.md: Remove duplicated lines.
2589 2009-10-07 Ben Elliston <bje@au.ibm.com>
2591 * config.gcc (powerpc*-*-*): Handle a2.
2592 * config/rs6000/rs6000.md (cpu): Add ppca2. Include "a2.md".
2593 * config/rs6000/a2.md: New file.
2594 * config/rs6000/rs6000.opt (mno-update): New.
2595 (mupdate): Return to using a mask, not a var.
2596 * config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for a2.
2597 (enum processor_type): Add PROCESSOR_PPCA2.
2598 * config/rs6000/rs6000.c (ppca2_cost): New costs.
2599 (rs6000_override_options): Add "a2" to processor_target_table.
2600 Update rs6000_always_hint logic. Correctly set rs6000_cost for a2.
2601 * doc/invoke.texi (RS/6000 and PowerPC Options): Document -mcpu=a2.
2603 2009-10-06 Uros Bizjak <ubizjak@gmail.com>
2605 * config/i386/i386.md (float<SSEMODEI24:mode><X87MODEF:mode>2):
2606 Use explicit gen_truncxfsf2 and gen_truncxfdf2 references to avoid
2607 reference to nonexistent gen_truncxfxf2 function.
2609 2009-10-06 Uros Bizjak <ubizjak@gmail.com>
2611 * config/i386/i386.md (SWI48, SDWIM, DWI): New mode iterators.
2612 (DWIH, g, di, doubleint_general_operand): New mode attributes.
2613 (general_operand): Handle TI mode.
2614 (add<mode>3): Macroize expander from add{qi,hi,si,di,ti}3 patterns
2615 using SDWIM mode iterator.
2616 (*add<mode>3_doubleword): New insn_and_split pattern. Macroize
2617 pattern from *add{di,ti}3_1 patterns and corresponding splitters
2618 using DWI mode iterator.
2619 (add<mode>3_carry): Macroize insn from add{qi,hi,si,di}3_carry
2620 patterns using SWI mode iterator.
2621 (*add<mode>3_cc): Macroize insn from add{si,di}3_cc patterns
2622 using SWI48 mode iterator.
2623 (*add<mode>_1): Ditto from add{si,di}_1 patterns.
2624 (*add<mode>_2): Ditto from add{si,di}_2 patterns.
2625 (*add<mode>_3): Ditto from add{si,di}_3 patterns.
2626 (*add<mode>_5): Ditto from add{si,di}_5 patterns.
2627 (sub<mode>3): Macroize expander from sub{qi,hi,si,di,ti}3 patterns
2628 using SDWIM mode iterator.
2629 (*sub<mode>3_doubleword): New insn_and_split pattern. Macroize
2630 pattern from *sub{di,ti}3_1 patterns and corresponding splitters
2631 using DWI mode iterator.
2632 (sub<mode>3_carry): Macroize insn from sub{qi,hi,si,di}3_carry
2633 patterns using SWI mode iterator.
2634 (*sub<mode>_1): Ditto from from sub{qi,hi,si,di}_1 patterns.
2635 (*sub<mode>_2): Ditto from sub{qi,hi,si,di}_2 patterns.
2636 (*sub<mode>_3): Ditto from sub{qi,hi,si,di}_3 patterns.
2637 (<plusminus_insn>xf3): Macroize expander from addxf3 and subxf3
2638 patterns using plusminus code iterator.
2639 (<plusminus_insn><mode>3): Macroize expander from add<mode>3 and
2640 sub<mode>3 patterns using plusminus code iterator.
2641 * config/i386/i386.c (override_options): Update the call to
2642 gen_subdi_carry_rex64 for renamed function.
2643 (ix86_expand_int_addcc): Update calls to gen_subdi3_carry_rex64
2644 and gen_adddi3_carry_rex64 for renamed functions. Use indirect
2645 calls to instruction expanders.
2647 2009-10-06 Martin Jambor <mjambor@suse.cz>
2650 * opts.c (decode_options): Run IPA-SRA at -O2.
2652 2009-10-06 Richard Guenther <rguenther@suse.de>
2654 * lto-symtab.c (lto_symtab_entry_hash): Hash strings, not pointers.
2656 2009-10-06 Tobias Burnus <burnus@net-b.de>
2659 * doc/invoke.texi (-flto,-fwhole-program): Make clear that the
2660 -flto and -fwhole-program flags can be combined.
2662 2009-10-06 Ryan Mansfield <rmansfield@qnx.com>
2665 * gcc.c (process_command): Check that -o argument was specified.
2667 2009-10-06 Jerry Quinn <jlquinn@optonline.net>
2669 * gimple.c (gimple_type_hash): Use CONST_CAST_TREE to fix compilation.
2671 2009-10-05 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2673 * c.opt (Wjump-misses-init): Fix typo to enable for ObjC.
2674 * doc/invoke.texi (Warning Options): Annotate allowed languages
2675 for -Wunsuffixed-float-constants.
2677 2009-10-05 Jakub Jelinek <jakub@redhat.com>
2679 * dwarf2out.c (modified_type_die): Don't add DW_AT_name to
2680 DW_TAG_{const,volatile}_type if its DW_AT_type already has the
2681 same name and isn't the main variant.
2684 * dwarf2out.c (loc_by_reference): Removed.
2685 (dw_loc_list_1): New function.
2686 (dw_loc_list): Remove toplev argument, add want_address argument.
2687 Don't look at decl_by_reference_p at all. Use dw_loc_list_1.
2688 (loc_list_from_tree) <case VAR_DECL>: Pass want_address rather than
2689 want_address == 2 to dw_loc_list. For successful dw_loc_list
2690 set have_address to 1 only if want_address is not 0.
2692 2009-10-05 Richard Sandiford <rdsandiford@googlemail.com>
2694 * config/mips/mips-protos.h (mips_trampoline_code_size): Declare.
2695 * config/mips/mips.h (TRAMPOLINE_SIZE): Redefine as the size of
2696 a code block followed by two pointers.
2697 (TRAMPOLINE_ALIGNMENT): Define to 64 for 32-bit targets too.
2698 * config/mips/mips.c (MIPS_LOAD_PTR): New macro.
2699 (MIPS_MOVE): Likewise.
2700 (MIPS_LUI): Likewise.
2701 (MIPS_JR): Likewise.
2702 (MIPS_BAL): Likewise.
2703 (MIPS_NOP): Likewise.
2704 (mips_asm_trampoline_template): Delete.
2705 (mips_trampoline_code_size): New function.
2706 (mips_trampoline_init): Add shorter sequences for all cases
2707 except Pmode == DImoe && !TARGET_USE_PIC_FN_ADDR_REG.
2708 Calculate the opcodes directly, rather than copying from a template.
2709 Only flush the code part of the trampoline.
2710 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Delete.
2712 2009-10-05 Richard Sandiford <rdsandiford@googlemail.com>
2714 * config/mips/mips.h (DWARF_FRAME_RETURN_COLUMN): Replace
2715 GP_REG_FIRST + 31 with RETURN_ADDR_REGNUM.
2716 (INCOMING_RETURN_ADDR_RTX): Likewise.
2717 (FUNCTION_PROFILER): Likewise. Replace GP_REG_FIRST + 1
2719 * config/mips/sdemtk.h (FUNCTION_PROFILER): Replace GP_REG_FIRST + 31
2720 with RETURN_ADDR_REGNUM.
2721 (MIPS_SAVE_REG_FOR_PROFILING_P): Likewise.
2722 * config/mips/mips.c (mips16_build_call_stub): Replace
2723 GP_REG_FIRST + 31 with RETURN_ADDR_REGNUM, GP_REG_FIRST + 1
2724 with AT_REGNUM and 31 with RETURN_ADDR_REGNUM.
2725 (mips_print_operand_punctuation): Likewise.
2726 (mips_frame_set): Likewise.
2727 (mips16e_output_save_restore): Likewise.
2728 (mips_cfun_might_clobber_call_saved_reg_p): Likewise.
2729 (mips_save_reg_p): Likewise.
2730 (mips_return_addr): Likewise.
2731 (mips_set_return_address): Likewise.
2732 (mips_direct_save_slot_move_p): Likewise.
2733 (mips_output_function_prologue): Likewise.
2734 (mips_restore_reg): Likewise.
2735 (mips_expand_epilogue): Likewise.
2736 (mips_epilogue_uses): Likewise.
2737 * config/mips/mips.md (RETURN_ADD_REGNUM): Define.
2738 (*mov<mode>_ra): Use it instead of a hard-coded 31.
2739 (clear_hazard_<mode>): Likewise.
2740 (call_internal): Likewise.
2741 (call_internal_direct): Likewise.
2742 (call_direct_split): Likewise.
2743 (call_value_internal): Likewise.
2744 (call_value_split): Likewise.
2745 (call_value_internal_direct): Likewise.
2746 (call_value_direct_split): Likewise.
2747 (call_value_multiple_internal): Likewise.
2748 (call_value_multiple_split): Likewise.
2750 2009-10-05 Eric Botcazou <ebotcazou@adacore.com>
2751 Jakub Jelinek <jakub@redhat.com>
2753 PR rtl-optimization/41511
2754 * combine.c (record_value_for_reg): Pass explicit values as argument
2755 to get_last_value_validate.
2756 (get_last_value_validate): Document INSN parameter.
2757 For non-readonly MEMs, assume they might have been modified if INSN
2758 was in another basic block.
2759 (get_last_value): Minor reformatting.
2761 2009-10-05 Andrew Pinski <andrew_pinski@playstation.sony.com>
2764 * final.c (asm_str_count): Split out from asm_insn_count.
2765 * rtl.h (asm_str_count): New prototype.
2766 * tree-inline (estimate_num_insns) <case GIMPLE_ASM>: Call
2769 2009-10-05 Sriraman Tallam <tmsriram@google.com>
2771 * doc/plugins.texi: Change plugin_pass to register_pass_info.
2773 2009-10-05 Basile Starynkevitch <basile@starynkevitch.net>
2774 Rafael Espindola <espindola@google.com>
2776 * gengtype.c (write_types): Moved call to write_func_for_structure
2777 into seperate loops.
2779 2009-10-05 Richard Guenther <rguenther@suse.de>
2782 * lto-cgraph.c (output_cgraph): Output toplevel asms.
2783 (input_cgraph_1): Input toplevel asms.
2785 2009-10-05 Richard Guenther <rguenther@suse.de>
2788 * lto-symtab.c (lto_compatible_attributes_p): Remove.
2789 (external_aggregate_decl_p): Likewise.
2790 (lto_symtab_compatible): Re-structure. Remove dead code.
2791 For variables ignore toplevel qualifiers when comparing types.
2792 Issue warnings, not errors for mismatched user-alignment.
2794 2009-10-05 Richard Guenther <rguenther@suse.de>
2798 * lto-symtab.c (struct lto_symtab_base_def): Remove.
2799 (struct lto_symtab_identifier_def): Likewise.
2800 (struct lto_symtab_decl_def): Likewise.
2801 (struct lto_symtab_entry_def): New.
2802 (lto_symtab_identifier_t): Rename to ...
2803 (lto_symtab_entry_t): ... this.
2804 (lto_symtab_decls): Remove.
2805 (lto_symtab_base_hash): Rename to ...
2806 (lto_symtab_entry_hash): ... this.
2807 (lto_symtab_base_eq): Rename to ...
2808 (lto_symtab_entry_eq): ... this.
2809 (lto_symtab_base_marked_p): Rename to ...
2810 (lto_symtab_entry_marked_p): ... this.
2811 (lto_symtab_identifier_marked_p): Remove.
2812 (lto_symtab_decl_marked_p): Likewise.
2813 (lto_symtab_maybe_init_hash_tables): Rename to ...
2814 (lto_symtab_maybe_init_hash_table): ... this.
2815 (lto_symtab_set_resolution_and_file_data): Remove.
2816 (lto_symtab_register_decl): New function.
2817 (lto_symtab_get_identifier): Remove.
2818 (lto_symtab_get): New function.
2819 (lto_symtab_get_resolution): Adjust.
2820 (lto_symtab_get_identifier_decl): Remove.
2821 (lto_symtab_set_identifier_decl): Likewise.
2822 (lto_symtab_merge_decl): Rename to ...
2823 (lto_symtab_merge): ... this. Rewrite.
2824 (lto_symtab_merge_var): Remove.
2825 (lto_symtab_merge_fn): Likewise.
2826 (lto_symtab_prevailing_decl): Adjust.
2827 (lto_cgraph_replace_node): New function.
2828 (lto_symtab_merge_decls_2): Likewise.
2829 (lto_symtab_merge_decls_1): Likewise.
2830 (lto_symtab_fixup_var_decls): Likewise.
2831 (lto_symtab_resolve_symbols): Likewise.
2832 (lto_symtab_merge_decls): Likewise.
2833 (lto_symtab_prevailing_decl): Adjust.
2834 (lto_symtab_get_symtab_def): Remove.
2835 (lto_symtab_get_file_data): Likewise.
2836 (lto_symtab_clear_resolution): Adjust.
2837 (lto_symtab_clear_resolution): Likewise.
2838 * lto-cgraph.c (input_edge): Do not merge cgraph nodes here.
2839 (input_cgraph_1): Likewise.
2840 * lto-streamer-in.c (get_resolution): Do not provide fake
2841 symbol resolutions here.
2842 (deferred_global_decls): Remove.
2843 (lto_register_deferred_decls_in_symtab): Likewise.
2844 (lto_register_var_decl_in_symtab): Change signature, register
2845 variable via lto_symtab_register_decl.
2846 (lto_register_function_decl_in_symtab): Likewise.
2847 (lto_read_tree): Adjust.
2848 * lto-streamer.h (lto_register_deferred_decls_in_symtab): Remove.
2849 (lto_symtab_merge_var): Likewise.
2850 (lto_symtab_merge_fn): Likewise.
2851 (lto_symtab_register_decl): Declare.
2852 (lto_symtab_merge_decls): Likewise.
2854 2009-10-05 Richard Guenther <rguenther@suse.de>
2856 PR tree-optimization/23821
2857 * tree-vrp.c (vrp_finalize): Do not perform copy propagation.
2858 * tree-ssa-dom.c (cprop_operand): Do not propagate copies into
2859 simple IV increments.
2861 2009-10-05 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2863 * config/arm/arm.c (arm_override_options): Really initialize
2864 flag_dwarf2_cfi_asm to 0.
2866 2009-10-05 Doug Kwan <dougkwan@google.com>
2868 PR rtl-optimization/41574
2869 * combine.c (distribute_and_simplify_rtx): Quit if RTX mode is
2870 floating point and we are not doing unsafe math optimizations.
2872 2009-10-03 Simon Baldwin <simonb@google.com>
2873 Cary Coutant <ccoutant@google.com>
2874 Rafael Espindola <espindola@google.com>
2875 Richard Guenther <rguenther@suse.de>
2876 Jan Hubicka <jh@suse.cz>
2877 Doug Kwan <dougkwan@google.com>
2878 H.J. Lu <hongjiu.lu@intel.com>
2879 Bill Maddox <maddox@google.com>
2880 Ryan Mansfield <rmansfield@qnx.com>
2881 Diego Novillo <dnovillo@google.com>
2882 Ollie Wild <aaw@google.com>
2883 Kenneth Zadeck <zadeck@naturalbridge.com>
2885 * lto-cgraph.c: New file.
2886 * lto-compress.c: New file.
2887 * lto-compress.h: New file.
2888 * lto-opts.c: New file.
2889 * lto-section-in.c: New file.
2890 * lto-section-out.c: New file.
2891 * lto-streamer-in.c: New file.
2892 * lto-streamer-out.c: New file.
2893 * lto-streamer.c: New file.
2894 * lto-streamer.h: New file.
2895 * lto-symtab.c: New file.
2896 * lto-wpa-fixup.c: New file.
2897 * lto-wrapper.c: New file.
2899 2009-10-03 Simon Baldwin <baldwin@google.com>
2900 Ben Elliston <bje@au.ibm.com>
2901 Rafael Espindola <espindola@google.com>
2902 Nathan Froyd <froydnj@codesourcery.com>
2903 Jan Hubicka <jh@suse.cz>
2904 Doug Kwan <dougkwan@google.com>
2905 Diego Novillo <dnovillo@google.com>
2906 Kenneth Zadeck <zadeck@naturalbridge.com>
2908 * Makefile.in (enable_lto): New.
2909 (site.exp): If @enable_lto@ is set to 'yes' define ENABLE_LTO.
2910 (LINKER_PLUGIN_API_H): Define.
2911 (LTO_SYMTAB_H): Define.
2912 (LTO_STREAMER_H): Define.
2913 (TREE_VECTORIZER_H): Define.
2914 (INCLUDES): Add LIBELFINC.
2915 (OBJS-common): Add lto-cgraph.o, lto-streamer-in.o,
2916 lto-streamer-out.o, lto-section-in.o, lto-section-out.o, lto-symtab.o,
2917 lto-opts.o, lto-streamer.o, lto-wpa-fixup.o, lto-compress.o.
2918 (MOSTLYCLEANFILES): Add lto-wrapper$(exeext)
2919 (native): Add lto-wrapper$(exeext)
2920 (lto-compress.o, lto-cgraph.o, lto-streamer-in.o,
2921 lto-streamer-out.o, lto-section-in.o, lto-section-out.o,
2922 lto-symtab.o, lto-opts.o, lto-streamer.o, lto-wpa-fixup.o): New rules.
2923 (gimple.o): Add dependency on LTO_HEADER_H and LTO_SECTION_OUT_H.
2924 (varasm.o): Add dependency on tree-iterator.h.
2925 (cgraph.o): Add dependency on cif-code.def.
2926 (ipa-reference.o): Add dependency on LTO_STREAMER_H.
2927 (ipa-pure-const.o): Likewise.
2928 (GTFILES): Add lto-symtab.c.
2929 (install-lto-wrapper): New.
2930 * configure.ac: If 'lto' is in enable_languages, define ENABLE_LTO
2931 and enable_lto. If LIBELFLIBS is set, define HAVE_libelf.
2932 * config.in: Regenerate.
2934 2009-10-03 Rafael Espindola <espindola@google.com>
2935 Diego Novillo <dnovillo@google.com>
2937 * cgraphunit.c (ipa_passes): Prevent lto1 from calling
2938 ipa_write_summaries.
2939 Call execute_ipa_summary_passes for all_regular_ipa_passes and
2941 (cgraph_optimize): Make extern.
2943 2009-10-03 Nathan Froyd <froydnj@codesourcery.com>
2944 Kenneth Zadeck <zadeck@naturalbridge.com>
2946 * toplev.c (in_lto_p): Declare.
2947 * collect2.c (scan_prog_file): Read all the output when reading
2948 information for LTO.
2949 (enum lto_mode_d): Declare.
2951 2009-10-03 Richard Guenther <rguenther@suse.de>
2952 Diego Novillo <dnovillo@google.com>
2954 * gimple.c: Include target.h and alias.h.
2955 (gimple_types): Declare.
2956 (type_hash_cache): Declare.
2957 (gimple_alloc_stat): Make extern.
2958 (gimple_build_eh_must_not_throw): Call
2959 gimple_eh_must_not_throw_set_fndecl.
2960 (struct type_pair_d): Declare.
2961 (type_pair_t): Declare.
2962 (type_pair_hash): New.
2963 (type_pair_eq): New.
2964 (lookup_type_pair): New.
2965 (gimple_force_type_merge): New.
2966 (compare_type_names_p): New.
2967 (compare_field_offset): New.
2968 (gimple_types_compatible_p): New.
2969 (struct sccs): Declare.
2970 (next_dfs_num): Declare.
2971 (iterative_hash_gimple_type): New.
2973 (iterative_hash_type_name): New.
2974 (iterative_hash_gimple_type): New.
2975 (gimple_type_hash): New.
2976 (gimple_type_eq): New.
2977 (gimple_register_type): New.
2978 (print_gimple_types_stats): New.
2979 (gimple_signed_or_unsigned_type): New.
2980 (gimple_unsigned_type): New.
2981 (gimple_signed_type): New.
2982 (gimple_get_alias_set): New.
2983 (gimple_decl_printable_name): Do not use DMGL_TYPES.
2984 * gimple.h (gimple_alloc, gimple_alloc_stat): Declare.
2985 (gimple_force_type_merge): Declare.
2986 (gimple_types_compatible_p): Declare.
2987 (gimple_register_type): Declare.
2988 (print_gimple_types_stats): Declare.
2989 (gimple_unsigned_type): Declare.
2990 (gimple_signed_type): Declare.
2991 (gimple_get_alias_set): Declare.
2992 (gimple_eh_must_not_throw_set_fndecl): New.
2994 2009-10-03 Jan Hubicka <jh@suse.cz>
2995 Kenneth Zadeck <zadeck@naturalbridge.com>
2997 * ipa-pure-const.c: Include lto-streamer.h.
2998 (register_hooks): Factor out of ...
2999 (generate_summary): ... here.
3000 (pure_const_write_summary): New.
3001 (pure_const_read_summary): New.
3002 (pass_ipa_pure_const): Add pure_const_write_summary and
3003 pure_const_read_summary.
3004 * ipa-reference.c: Include lto-streamer.h.
3005 (add_new_function): New.
3006 (remove_node_data): New.
3007 (duplicate_node_data): New.
3008 (ipa_init): Guard against multiple calls.
3009 Move hook setup from analyze_function.
3010 (write_node_summary_p): New.
3011 (ipa_reference_write_summary): New.
3012 (ipa_reference_read_summary): New.
3013 (pass_ipa_reference): Add ipa_reference_write_summary and
3014 ipa_reference_read_summary.
3015 * cgraph.h (cgraph_local_info): Add field lto_file_data.
3016 (struct cgraph_edge): Add fields lto_stmt_uid and
3017 call_stmt_cannot_inline_p.
3018 (cgraph_optimize): Declare.
3019 (cgraph_decide_is_function_needed): Declare.
3020 (reset_inline_failed): Declare.
3021 (enum LTO_cgraph_tags): Declare.
3022 (LTO_cgraph_tag_names): Declare.
3023 (LCC_NOT_FOUND): Define.
3025 2009-10-03 Doug Kwan <dougkwan@google.com>
3026 Rafael Espindola <espindola@google.com>
3027 Jan Hubicka <jh@suse.cz>
3028 Diego Novillo <dnovillo@google.com>
3029 Kenneth Zadeck <zadeck@naturalbridge.com>
3031 * passes.c (all_regular_ipa_passes): New.
3032 (all_ipa_passes): Rename to all_small_ipa_passes.
3033 (init_optimization_passes): Init all_regular_ipa_passes.
3034 * tree-pass.h (all_regular_ipa_passes): New.
3035 (all_ipa_passes): Rename to all_small_ipa_passes.
3036 * passes.c (all_lto_gen_passes): New.
3037 (init_optimization_passes): Initialize all_lto_gen_passes.
3038 (execute_ipa_summary_passes): Make non-static.
3039 (ipa_write_summaries_1): New.
3040 (ipa_write_summaries_2): New.
3041 (ipa_write_summaries): New.
3042 (ipa_write_summaries_of_cgraph_node_set): New.
3043 (ipa_read_summaries_1): New.
3044 (ipa_read_summaries): New.
3045 (execute_ipa_pass_list): Call cgraph_process_new_functions.
3046 (execute_regular_ipa_pass_list): Remove.
3047 (init_optimization_passes): Schedule
3048 pass_rebuild_cgraph_edges and pass_early_inline outside
3049 of pass_all_early_optimizations. Document reason.
3050 (pass_ipa_lto_gimple_out, pass_ipa_lto_wpa_fixup,
3051 pass_ipa_lto_finish_out): New pass.
3052 (pass_ipa_summary_passes): Start and stop timers if the pass has them.
3053 (execute_all_ipa_transforms): New.
3054 (execute_one_pass): Don't call execute_one_ipa_transform_pass.
3055 (dump_properties, debug_properties): New.
3056 * tree-optimize.c (gate_all_early_local_passes): Return
3057 false if we are in lto1.
3058 (tree_rest_of_compilation): Call execute_all_ipa_transforms.
3059 * tree-pass.h (execute_all_ipa_transforms): Declare.
3060 (pass_ipa_function_and_variable_visibility): Declare.
3061 (pass_ipa_early_inline): Declare.
3062 (pass_ipa_lto_gimple_out): Declare.
3063 (pass_ipa_lto_wpa_fixup): Declare.
3064 (pass_ipa_lto_finish_out): Declare.
3065 (all_small_ipa_passes, all_regular_ipa_passes,
3066 all_lto_gen_passes): Declare.
3067 (execute_ipa_summary_passes): Declare.
3068 (execute_all_ipa_transforms): Declare.
3069 (ipa_write_summaries): Declare
3070 (ipa_write_summaries_of_cgraph_node_set): Declare.
3071 (ipa_read_summaries): Declare.
3073 2009-10-03 Doug Kwan <dougkwan@google.com>
3074 Ollie Wild <aaw@google.com>
3076 * ipa-prop.c (ipa_propagate_indirect_call_infos): Do nothing in WPA.
3078 * collect2.c (LTO_MODE_NONE, LTO_MODE_LTO, LTO_MODE_WPA): New enums.
3079 (lto_mode): New variable.
3080 (maybe_run_lto_and_relink): Handle the -fwpa option.
3081 (main): Handle the -fwpa option.
3082 (maybe_unlink_list): New function.
3083 * gcc.c (link_lto_options): Replace -flto with -fwpa.
3084 * common.opt (flto): New flag.
3085 * toplev.c (flag_generate_lto): Declare.
3087 2009-10-03 Simon Baldwin <simonb@google.com>
3089 * common.opt (flto-compression-level): New flag.
3091 * opts.c: Include lto-opts.h.
3092 (handle_option): Call lto_register_user_option for each
3093 valid option handled.
3094 (decode_options): Clear registered options before the options
3097 2009-10-03 Cary Coutant <ccoutant@google.com>
3099 * collect2.c (is_elf): New function.
3100 (scan_prog_file): Require LTO object to be in ELF format.
3102 2009-10-03 Rafael Espindola <espindola@google.com>
3104 * gcc.c (LINK_COMMAND_SPEC): Use the -pass-through option to pass
3105 libgcc to the linker.
3107 * ipa-cp.c (cgraph_gate_cp): Return false if LTRANS is running.
3109 * collect2.c (maybe_run_lto_and_relink): Execute lto-wrapper.
3110 (collect_execute): Add flags argument. Pass flags to pex_run. Update
3112 * collect2.h (collect_execute): Add flags argument.
3113 * tlink.c (tlink_execute): Update call to collect_execute.
3114 * gcc.c (main): Set the COLLECT_LTO_WRAPPER environment variable.
3115 (use_linker_plugin): New.
3116 (use_linker_plugin_spec_function): New.
3117 (LINK_COMMAND_SPEC): Pass plugin options to the linker.
3118 (linker_plugin_file_spec): New.
3119 (lto_wrapper_spec): New.
3120 (lto_gcc_spec): New.
3121 (static_specs): Add linker_plugin_file, lto_wrapper and lto_gcc.
3122 (static_spec_functions): Add use-linker-plugin.
3123 (process_command): Handle -use-linker-plugin.
3124 (main): Use lto_wrapper_spec instead of lto_wrapper. Set
3125 linker_plugin_file_spec and lto_gcc_spec.
3126 (use_linker_plugin_spec_function): New.
3128 2009-10-03 Richard Guenther <rguenther@suse.de>
3132 * tree.h (is_lang_specific): Include LANG_TYPE.
3133 * tree.c (find_decls_types_r): Manually add interesting parts
3134 of TYPE_FIELDS. Walk BINFO_VIRTUALS. Do not walk TYPE_METHODS.
3136 * gimple.c (type_pair_hash): Make symmetric.
3137 (type_pair_eq): Likewise.
3138 (lookup_type_pair): Increase initial hashtable size.
3139 (gimple_force_type_merge): Rely on type-pair symmetry.
3140 (visit): Remove excessive checking code.
3141 (iterative_hash_type_name): Do not hash TYPE_NAME of anonymous unions.
3142 (gimple_register_type): Remove getenv calls, shrink initial
3146 * cgraphunit.c (ipa_passes): Do not remove bodies of extern
3147 inline functions if not generating lto output.
3150 * toplev.c (finalize): In WPA mode remove the asm file.
3152 2009-10-03 Doug Kwan <dougkwan@google.com>
3154 * ipa-inline.c (cgraph_mark_inline): Check
3155 edge->call_stmt_cannot_inline_p instead of calling
3156 gimple_call_cannot_inline_p.
3157 (cgraph_decide_inlining): Do nothing in WPA and LTRANS.
3158 (cgraph_gate_ipa_early_inlining): Return false if in_lto_p is set.
3159 (inline_generate_summary): Do nothing in LTRANS.
3160 * cgraph.c (initialize_inline_failed): Make sure e->call_stmt
3161 exists before calling gimple_call_cannot_inline_p.
3162 (cgraph_create_edge): Set edge->call_stmt_cannot_inline_p.
3163 (cgraph_clone_edge): Add argument STMT_UID. Modify all callers.
3164 Update new_edge->lto_stmt_uid.
3165 * cgraphbuild.c (reset_inline_failed): New.
3167 * common.opt (fwpa): New flag.
3168 (fltrans): New option.
3169 * gcc.c (gcc_lto_option_t): New type.
3170 (current_lto_option): New variable.
3171 (lto_single_spec_function): Remove and is replaced by ..
3172 (lto_option_spec_function): New function.
3173 (LINK_COMMAND_SPEC): Use link_lto_option spec instead of just
3174 passing the -flto flag.
3175 (cc1_options): Separate non-LTO related parts into ..
3176 (cc1_non_lto_options): Non-LTO related options shared by all FEs.
3177 (lto1_options): New spec for lto FE.
3178 (link_lto_options): New spec for handling LTO flags in linker.
3179 (invoke_lto_single): Re-format to fit in 80 column. Replace
3180 lto-single with lto-option.
3181 (static_specs): Add cc1_non_lto_options, lto1_options and
3183 (static_spec_function): Replace lto-single with lto-option.
3184 (process_command): Handle -flto, -fwpa and -fltran by setting
3185 current_lto_option and not passing it to subprocess unconditionally.
3187 2009-10-03 Bill Maddox <maddox@google.com>
3189 Add `gcc' driver support for link-time code generation (LTO).
3191 * collect2.c (enum pass): Add new literal PASS_LTOINFO.
3192 (lto_flag, lto_objects, lto_o_file): New variables.
3193 (struct lto_object, struct lto_object_list): New structures.
3194 (collect_exit, handler): Remove LTO temporary output file on exit.
3195 (add_lto_object): New function.
3196 (maybe_run_lto_and_relink): New function. Perform link time code
3197 generation and relinking for object files containing LTO information.
3198 (main): Invoke maybe_run_lto_and_relink().
3199 (dump_argv): New function. For debugging, currently disabled.
3200 (scan_prog_file): Add LTO information pass.
3201 * gcc.c (LINK_COMMAND_SPEC): Pass `-flto' switch to linker, i.e.,
3203 * toplev.c (compile_file): Emit assembler directive to create
3204 the `gnu_lto_v1' marker symbol when compiling with `-flto'.
3206 2009-10-03 Diego Novillo <dnovillo@google.com>
3208 * c.opt: Add LTO to warn_abi and warn_psabi.
3210 * tree.c (fld_worklist_push): Rename from PUSH. Convert to static
3211 inline function. Ignore language-specific nodes. Update all users.
3212 (find_decls_types_r): Do not traverse the subtrees of
3213 language-specific nodes. Do not traverse DECL_INITIAL for TYPE_DECLs.
3214 * tree.h (is_lang_specific): New.
3215 * langhooks.h (struct lang_hooks_for_decls): Remove
3216 may_need_assembler_name_p. Update all users.
3218 * c-common.c (set_builtin_user_assembler_name): Move ...
3219 * builtins.c (set_builtin_user_assembler_name): ... here.
3220 (is_builtin_name): Add comment
3221 (is_builtin_fn): New.
3222 * except.c (output_ttype): Only call
3223 lookup_type_for_runtime if TYPE is not a runtime type.
3225 * passes.c (register_pass): Call position_pass on
3226 all_small_ipa_passes, all_regular_ipa_passes and all_lto_gen_passes.
3227 * timevar.def (TV_IPA_LTO_GIMPLE_IO): Define.
3228 (TV_IPA_LTO_DECL_IO): Define.
3229 (TV_IPA_LTO_CGRAPH_IO): Define.
3231 (TV_WHOPR_WPA): Define.
3232 (TV_WHOPR_WPA_IO): Define.
3233 (TV_WHOPR_LTRANS): Define.
3234 (TV_WHOPR_WPA_FIXUP): Define.
3235 (TV_WHOPR_WPA_LTRANS_EXEC): Define.
3236 * tree-cfg.c (tree_node_can_be_shared): Make extern.
3237 * tree-flow.h (tree_node_can_be_shared): Declare.
3238 * tree-inline.c (tree_can_inline_p): Check that E has a
3239 statement associated with it.
3240 * tree.c (free_lang_data_in_binf): Factor out of ...
3241 (free_lang_data_in_type): ... here.
3242 Call RECORD_OR_UNION_TYPE_P.
3243 (need_assembler_name_p): Ignore DECL if it does not have TREE_PUBLIC
3244 set. Call lang_hooks.decls.may_need_assembler_name_p if set.
3245 (free_lang_data_in_decl): Do not clear DECL_CONTEXT for CONST_DECLs.
3246 (free_lang_data): Set debug_info_level to DINFO_LEVEL_NONE. Set
3247 write_symbols to NO_DEBUG. Set debug_hooks to do_nothing_debug_hooks.
3248 (gate_free_lang_data): Return true if flag_generate_lto is set.
3249 (walk_tree_1): Call RECORD_OR_UNION_TYPE_P.
3250 * c-common.h (set_builtin_user_assembler_name): Move ...
3251 * tree.h (set_builtin_user_assembler_name): ... here.
3253 * common.opt (flto-report): New flag.
3254 * opts.c (complain_wrong_lang): Do not complain if running lto1.
3255 * collect2.c (scan_prog_file): Send the error output of
3256 'nm' to HOST_BIT_BUCKET.
3258 2009-10-03 Ollie Wild <aaw@google.com>
3260 * langhooks-def.h (lhd_begin_section): New function declaration.
3261 (lhd_write_section): New function declaration.
3262 (lhd_end_section): New function declaration.
3263 (LANG_HOOKS_BEGIN_SECTION): New macro.
3264 (LANG_HOOKS_WRITE_SECTION_DATA): New macro.
3265 (LANG_HOOKS_END_SECTION): New macro.
3266 (LANG_HOOKS_LTO): New macro.
3267 (LANG_HOOKS_INITIALIZER): Add LANG_HOOKS_LTO.
3268 * langhooks.c (output.h): Add include.
3269 (saved_section): New static variable.
3270 (lhd_begin_section): New function.
3271 (lhd_write_section_data): New function.
3272 (lhd_end_section): New function.
3273 * langhooks.h (struct lang_hooks_for_lto): New structure.
3274 (struct lang_hooks): Add member lto.
3275 * Makefile.in (langhooks.o): Add dependency on output.h.
3277 * c-opts.c (c_common_post_options): Handle -flto and -fwhopr.
3279 2009-10-03 Richard Guenther <rguenther@suse.de>
3281 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
3284 2009-10-03 Simon Baldwin <simonb@google.com>
3285 Richard Guenther <rguenther@suse.de>
3286 Janis Johnson <janis187@us.ibm.com>
3287 Doug Kwan <dougkwan@google.com>
3288 Diego Novillo <dnovillo@google.com>
3289 Ramana Radhakrishnan <ramana.r@gmail.com>
3290 Ollie Wild <aaw@google.com>
3292 * doc/install.texi: Add documentation for libelf and --enable-lto.
3293 * doc/invoke.texi: Document -fwpa, -flto, -fwhopr, -fltrans,
3294 -flto-report, -flto-compression-level and -use-linker-plugin.
3295 * doc/sourcebuild.texi: Document use of zlib. Document lto-plugin.
3296 Add section for LTO Testing.
3298 2009-10-02 Cary Coutant <ccoutant@google.com>
3300 Add support for comdat type sections for DWARF v4.
3301 Merge from dwarf4 branch.
3303 * dwarf2out.c (DWARF_TYPE_SIGNATURE_SIZE): New constant.
3304 (dw_die_ref): Define vector type.
3305 (enum dw_val_class): Add dw_val_class_data8.
3306 (struct dw_val_struct): Add v.val_data8.
3307 (comdat_type_node_ref): New type.
3308 (struct die_struct): Move die_symbol into a union; add new field
3309 die_type_node. Change all uses.
3310 (comdat_type_node): New type.
3311 (skeleton_chain_node): New type.
3312 (DWARF_COMDAT_TYPE_UNIT_HEADER_SIZE): New constant.
3313 (comdat_type_list): New variable.
3314 (dwarf_tag_name): Add DW_TAG_type_unit.
3315 (dwarf_attr_name): Add DW_AT_signature.
3316 (add_AT_data8): New function.
3317 (replace_child): New function.
3318 (move_all_children): New function.
3319 (print_signature): New function.
3320 (print_die): Print signature information; add dw_val_class_data8.
3321 (attr_checksum): Support dw_val_class_data8.
3322 (CHECKSUM_STRING): Redefine for DWARF-4 to include trailing NULL byte.
3323 (CHECKSUM_SLEB128, CHECKSUM_ULEB128): New macros.
3324 (checksum_sleb128, checksum_uleb128): New functions.
3325 (checksum_die_context): New function.
3326 (loc_checksum_ordered): New function.
3327 (attr_checksum_ordered): New function.
3328 (struct checksum_attributes): New structure.
3329 (collect_checksum_attributes): New function.
3330 (die_checksum_ordered): New function.
3331 (generate_type_signature): New function.
3332 (same_dw_val_p): Add dw_val_class_data8.
3333 (is_symbol_die): Use new is_declaration_die function.
3334 (is_declaration_die): New function.
3335 (should_move_die_to_comdat): New function.
3336 (clone_die): New function.
3337 (clone_tree): New function.
3338 (clone_as_declaration): New function.
3339 (copy_declaration_context): New function.
3340 (generate_skeleton_ancestor_tree): New function.
3341 (generate_skeleton_bottom_up): New function.
3342 (generate_skeleton): New function.
3343 (remove_child_or_replace_with_skeleton): New function.
3344 (break_out_comdat_types): New function.
3345 (struct decl_table_entry): New type.
3346 (htab_decl_hash): New function.
3347 (htab_decl_eq): New function.
3348 (htab_decl_del): New function.
3349 (copy_ancestor_tree): New function.
3350 (copy_decls_walk): New function.
3351 (copy_decls_for_unworthy_types): New function.
3352 (build_abbrev_table): Don't assert on missing die_symbol when doing
3353 comdat type sections.
3354 (size_of_die): Use DW_FORM_sig8 for external references. Add
3356 (unmark_dies): Don't assert for unmarked dies when doing comdat
3358 (value_format): Support DW_FORM_sig8 and dw_val_class_data8.
3359 (output_signature): New function.
3360 (output_die): Likewise.
3361 (output_compilation_unit_header): Mark output as DWARF version 3
3362 even if generating DWARF 4.
3363 (output_comdat_type_unit): New function.
3364 (output_line_info): Mark output as DWARF version 3 even if generating
3366 (dwarf2out_start_source_file): Don't do eliminate_dwarf2_dups with
3368 (dwarf2out_end_source_file): Likewise.
3369 (prune_unused_types_walk_attribs): Don't follow references into
3370 comdat type sections.
3371 (prune_unused_types_mark): When generating type units, do not mark
3372 children of non-defining declarations of types; do mark children of
3374 (prune_unused_types): Process comdat type sections.
3375 (htab_ct_hash): New function.
3376 (htab_ct_eq): New function.
3377 (dwarf2out_finish): Move types to comdat sections when using DWARF-4.
3378 Add a pointer to the line table from type unit entries so
3379 DW_AT_decl_file has meaning.
3380 * varasm.c (default_elf_asm_named_section): Use identifier name as
3381 comdat key instead of lang hook.
3383 2009-10-02 Neil Vachharajani <nvachhar@google.com>
3385 * gcov-io.c (gcov_open): Open files read-only when MODE < 0.
3387 2009-10-02 Uros Bizjak <ubizjak@gmail.com>
3389 * config/i386/i386.md (SWIM248): New mode iterator.
3390 (divmod<mode>4) Macroize expander from divmoddi4, divmodsi4 and
3391 divmodhi4 patterns using SWIM248 macro.
3392 (*divmod<mode>4): Macroize insn_and_split pattern from
3393 *divmoddi4_cltd_rex64, *divmodsi4_cltd and divmodhi4 insn patterns
3394 and their corresponding splitters usign SWIM248 macro. Split SImode
3395 insn to generate cltd and DImode insn to generate cqto instead of
3396 move+shift when optimizing for size or TARGET_USE_CLTD is in effect.
3397 (*divmoddi4_nocltd_rex64, *divmodsi4_nocltd): Remove insn patterns.
3398 (*divmod<mode>4_noext): Macroize insn from *divmoddi_noext_rex64 and
3399 *divmodsi_noext patterns using SWIM248 macro.
3400 (udivmod<mode>4): Macroize expander from udivmoddi4, udivmodsi4 and
3401 udivmodhi4 patterns using SWIM248 macro.
3402 (*udivmod<mode>4): Macroize insn_and_split pattern from
3403 *udivmoddi4, udivmodsi4 and udivmodhi4 patterns and their
3404 corresponding splitters using SWIM248 macro.
3405 (*udivmod<mode>4_noext): Macroize insn from *udivmoddi4_noext,
3406 *udivmodsi4_noext and *udivmodhi_noext patterns using SWIM248 macro.
3408 2009-10-02 Eric Botcazou <ebotcazou@adacore.com>
3410 * stor-layout.c (layout_type) <ARRAY_TYPE>: Make sure that an array