blob: 75c04fca968166f61160fcaa13a3c5b754146d52 [file] [log] [blame]
2011-12-31 Alexandre Oliva <>
* cselib.h (cselib_add_permanent_equiv): Declare.
(canonical_cselib_val): New.
* cselib.c (new_elt_loc_list): Rework to support value
equivalences. Adjust all callers.
(preserve_only_constants): Retain value equivalences.
(references_value_p): Retain preserved values.
(rtx_equal_for_cselib_1): Handle value equivalences.
(cselib_invalidate_regno): Use canonical value.
(cselib_add_permanent_equiv): New.
* alias.c (find_base_term): Reset locs lists while recursing.
* var-tracking.c (val_bind): New. Don't add equivalences
present in cselib table, compared with code moved from...
(val_store): ... here.
(val_resolve): Use val_bind.
(add_uses): Do not create MOps for addresses. Do not mark
non-REG non-MEM expressions as requiring resolution.
(reverse_op): Record reverse as a cselib equivalence.
(add_stores): Use it. Do not create MOps for addresses.
Do not require resolution for non-REG non-MEM expressions.
Simplify support for reverse operations.
(compute_bb_dataflow): Drop reverse support.
(emit_notes_in_bb): Likewise.
(create_entry_value): Rename to...
(record_entry_value): ... this. Use cselib equivalences.
(vt_add_function_parameter): Adjust.
2011-12-30 Michael Meissner <>
* config/rs6000/rs6000.c (rs6000_inner_target_options): Fix thinko
in setting options via target #pragma or attribute.
2011-12-30 Anatoly Sokolov <>
* config/bfin/bfin.h (REGISTER_MOVE_COST, MEMORY_MOVE_COST): Remove.
* config/bfin/bfin-protos.h (bfin_register_move_cost,
bfin_memory_move_cost): Remove.
* config/bfin/bfin.c (bfin_register_move_cost,
bfin_memory_move_cost): Make static. Change arguments type from
enum reg_class to reg_class_t and from int to bool.
2011-12-30 Nathan Sidwell <>
* gcov.c (total_lines, total_executed): New global vars.
(generate_results): Call executed_summary.
(executed_summary): New function, broken out of ...
(function_summary): ... here. Call it.
* coverage.c (coverage_finish): Also check for local_tick == -1.
* gcov-dump (tag_function): Correct labelling typo.
2011-12-29 Michael Meissner <>
PR target/51623
* config/rs6000/rs6000.c (rs6000_assemble_integer): Delete check
for an initialized pointer being in a text section with
-mrelocatable, since it should never happen.
2011-12-29 Michael Eager <>
* config/microblaze/ Add expander for simple_return,
return, add return_internal and simple_return_internal insns.
2011-12-29 Oleg Endo <>
* config/sh/sh.h (BRANCH_COST): Use sh_branch_cost variable.
* config/sh/sh.c (sh_option_override): Simplify sh_branch_cost
2011-12-28 Ian Lance Taylor <>
* dwarf2out.c (gen_compile_unit_die): Use DW_LANG_Go for Go.
2011-12-28 Michael Meissner <>
PR target/51623
* config/rs6000/rs6000.c (rs6000_assemble_integer): Don't call
unlikely_text_section_p. Instead check for being in a code section.
2011-12-28 Ira Rosen <>
PR tree-optimization/51684
* tree-vect-slp.c (vect_schedule_slp_instance): Get gsi of original
statement in case of a pattern.
(vect_schedule_slp): Likewise.
2011-12-27 Eric Botcazou <>
PR rtl-optimization/51667
* ree.c (insn_merge_code): Delete.
(is_insn_merge_attempted): Likewise.
(get_insn_status): Likewise.
(set_insn_status): Likewise.
(struct ext_cand): Add CODE and MODE fields.
(combine_set_extend): Rename to...
(combine_set_extension): ...this. Use above fields and tidy up.
(transform_ifelse): Likewise.
(get_defs): Return the chain of definitions.
(is_this_a_cmove): Merge into...
(is_cond_copy_insn): ...this. Return bool.
(make_defs_and_copies_lists): Adjust calls to get_defs and simplify.
(merge_def_and_ext): Adjust call to combine_set_extend.
(combine_reaching_defs): Remove calls to {g|s}et_insn_status.
(struct extend_info): Rename to...
(struct re_info): ...this. Add DEF_MAP field.
(add_ext_candidate): Merge into...
(add_removable_extension): ...this. Adjust calls to get_defs. Ensure
reaching definitions are associated with only one kind of extension.
(find_removable_extensions): Create and destroy the definition map.
(find_and_remove_re): Return void. Change 'long' variables to 'int'.
Do not deal with is_insn_merge_attempted.
2011-12-25 Jan Hubicka <>
PR middle-end/48641
* tree-ssa-threadupdate.c (redirect_edges): Watch for overflow.
2011-12-26 Oleg Endo <>
* config/sh/ Add soft atomics ABI description.
(fetchop_name): Use 'or' instead of 'ior'.
(fetchop_insn): Remove.
Don't insert aligning nop after the write-back instruction. Fix
multi-line asm output formatting style.
(atomic_fetch_<fetchop_name><mode>_soft): Likewise.
(atomic_fetch_nand<mode>_soft): Likewise.
(atomic_<fetchop_name>_fetch<mode>_soft): Likewise.
(atomic_nand_fetch<mode>_soft): Likewise.
2011-12-23 Richard Henderson <>
* cfgexpand.c (expand_debug_expr): Don't handle them.
* expr.c (expand_expr_real_2): Likewise.
* fold-const.c (fold_binary_loc): Likewise.
* gimple-pretty-print.c (dump_binary_rhs): Likewise.
* tree-cfg.c (verify_gimple_assign_binary): Likewise.
* tree-inline.c (estimate_operator_cost): Likewise.
* tree-pretty-print.c (dump_generic_node): Likewise.
* tree-vect-generic.c (expand_vector_operations_1): Likewise.
* optabs.c (optab_for_tree_code): Likewise.
(can_vec_perm_for_code_p): Remove.
(expand_binop): Don't try it.
(init_optabs): Don't init vec_extract_even/odd_optab.
* genopinit.c (optabs): Likewise.
* optabs.h (OTI_vec_extract_even, OTI_vec_extract_odd): Remove.
(vec_extract_even_optab, vec_extract_odd_optab): Remove.
* tree-vect-data-refs.c (vect_strided_store_supported): Tidy code.
(vect_permute_store_chain): Use TYPE_VECTOR_SUBPARTS instead of
GET_MODE_NUNITS; check vect_gen_perm_mask return value instead of
asserting vect_strided_store_supported.
(vect_strided_load_supported): Use can_vec_perm_p.
(vect_permute_load_chain): Use VEC_PERM_EXPR.
* doc/generic.texi (VEC_EXTRACT_EVEN_EXPR): Remove.
* doc/md.texi (vec_extract_even, vec_extract_odd): Remove.
2011-12-23 Anatoly Sokolov <>
* config/score/score.h (REGISTER_MOVE_COST, MEMORY_MOVE_COST): Remove.
* config/score/score-protos.h (score_register_move_cost): Remove.
* config/score/score.c (TARGET_REGISTER_MOVE_COST): Define.
(score_register_move_cost): Make static. Change arguments type from
enum reg_class to reg_class_t.
2011-12-23 Jakub Jelinek <>
Richard Henderson <>
* gimple-pretty-print.c (dump_binary_rhs): Don't handle
* expr.c (expand_expr_real_2): Likewise.
* tree-cfg.c (verify_gimple_assign_binary): Likewise.
* cfgexpand.c (expand_debug_expr): Likewise.
* tree-inline.c (estimate_operator_cost): Likewise.
* tree-pretty-print.c (dump_generic_node): Likewise.
* tree-vect-generic.c (expand_vector_operations_1): Likewise.
* fold-const.c (fold_binary_loc): Likewise.
* doc/generic.texi (VEC_INTERLEAVE_HIGH_EXPR,
VEC_INTERLEAVE_LOW_EXPR): Remove documentation.
* optabs.c (optab_for_tree_code): Don't handle
(expand_binop, init_optabs): Remove vec_interleave_high_optab
and vec_interleave_low_optab.
* genopinit.c (optabs): Likewise.
* optabs.h (OTI_vec_interleave_high, OTI_vec_interleave_low): Remove.
(vec_interleave_high_optab, vec_interleave_low_optab): Remove.
* doc/md.texi (vec_interleave_high, vec_interleave_low): Remove
* tree-vect-stmts.c (gen_perm_mask): Renamed to...
(vect_gen_perm_mask): ... this. No longer static.
(perm_mask_for_reverse, vectorizable_load): Adjust callers.
* tree-vectorizer.h (vect_gen_perm_mask): New prototype.
* tree-vect-data-refs.c (vect_strided_store_supported): Don't try
VEC_INTERLEAVE_*_EXPR, use can_vec_perm_p instead of
(vect_permute_store_chain): Generate VEC_PERM_EXPR with interleaving
* config/i386/i386.c (expand_vec_perm_interleave2): If
expand_vec_perm_interleave3 would handle it, return false.
(expand_vec_perm_broadcast_1): Don't use vec_interleave_*_optab.
2011-12-23 Richard Henderson <>
* config/mips/ (UNSPEC_LOONGSON_PINSR_0,
UNSPEC_LOONGSON_PINSR_3): Replace with...
(VWB): New mode iterator.
(V_inner): New mode attribute.
(loongson_vec_init1_<VHB>): New.
(*vec_concatv2si): New.
(and<VWHB>3, ior<VWHB>3, xor<VWHB>3, one_cmpl<VWHB>2): New.
(*loongson_nor): New.
(loongson_pextrh): Un-macro-ify.
(loongson_pmaddhw): Likewise.
(smaxv4hi3, umaxv8qi3, sminv4hi3, uminv8qi3): Likewise.
(loongson_pinsrh_0): Represent with vec_select+vec_concat.
(loongson_pinsrh_1, loongson_pinsrh_2, loongson_pinsrh_3): Likewise.
(*vec_setv4hi, vec_setv4hi): New.
(sdot_prodv4hi): New.
(smax<VWB>3, smin<VWB>3): New.
(reduc_uplus_v8qi): New.
(loongson_pshufh): Remove destination matching input.
(ashl<VWH>3, ashr<VWH>3, lshr<VWH>3): Fix type attribute.
(vec_interleave_high<VWHB>, vec_interleave_low<VWHB>): Remove.
(loongson_punpckhbh, loongson_punpckhhw, loongson_punpckhhw_qi,
loongson_punpckhwd, loongson_punpckhwd_qi, loongson_punpckhwd_hi,
loongson_punpcklbh, loongson_punpcklhw, loongson_punpcklhw_qi,
loongson_punpcklwd, loongson_punpcklwd_qi, loongson_punpcklwd_hi,
vec_perm_const<VWHB>, vec_unpacks_lo_<VHB>, vec_unpacks_hi_<VHB>,
vec_unpacku_lo_<VHB>, vec_unpacku_hi_<VHB>, vec_shl_<VWHBDI>,
vec_shr_<VWHBDI>, reduc_uplus_<VWH>, reduc_splus_<VWHB>,
reduc_smax_<VWHB>, reduc_smin_<VWHB>, reduc_umax_<VWHB>,
reduc_umin_<VB>): New.
* config/mips/ (vec_perm_const_ps): New.
(mips_pul_ps, mips_puu_ps, mips_pll_ps, mips_plu_ps): Expand in
terms of vec_perm_const_ps.
(vec_perm_constv2sf): New.
(vec_initv2sf): Use mips_expand_vector_init.
(vec_concatv2sf): Rename from vec_initv2sf_internal.
(vec_setv2sf): Use vec_perm_const_ps.
(reduc_splus_v2sf, reduc_smin_v2sf, reduc_smax_v2sf): New.
* config/mips/loongson.h (pshufh_u, pshufh_s): Don't pass dest to
the builtin.
* config/mips/mips-modes.def (V16QI, V8HI, V4SI, V4SF): New modes.
* config/mips/mips-protos.h: Update.
* config/mips/mips.c (mips_get_arg_info): Match V2SFmode, not all
(mips_return_mode_in_fpr_p): Likewise.
(mips_cannot_change_mode_class): Allow 8-byte integral mode changes.
(CODE_FOR_loongson_punpckhbh, CODE_FOR_loongson_punpckhhw,
CODE_FOR_loongson_punpckhwd, CODE_FOR_loongson_punpcklbh,
CODE_FOR_loongson_punpcklhw, CODE_FOR_loongson_punpcklwd): Remove.
(mips_builtins): Remove first operand for loongson pshufh builtins.
(MAX_VECT_LEN, struct expand_vec_perm_d): New.
(mips_expand_vselect, mips_expand_vselect_vconcat,
mips_expand_vpc_loongson_even_odd, mips_expand_vpc_loongson_pshufh,
mips_expand_vpc_loongson_bcast, mips_expand_vec_perm_const_1,
mips_expand_vec_perm_const, mips_vectorize_vec_perm_const_ok,
mips_expand_vec_unpack, mips_constant_elt_p, mips_expand_vi_broadcast,
mips_expand_vi_constant, mips_expand_vi_loongson_one_pinsrh,
mips_expand_vi_general, mips_expand_vec_reduc, mips_expand_vec_minmax,
(mips_expand_vector_init): Rewrite.
* config/mips/ (const_2_or_3_operand): New.
(const_0_to_3_operand): New.
2011-12-23 Dmitry Plotnikov <>
* config/arm/ (float<mode><V_cvtto>2): New.
(floatuns<mode><V_cvtto>2): New.
(fix_trunc<mode><V_cvtto>2): New.
(fix_truncuns<mode><V_cvtto>2): New.
* config/arm/ (V_cvtto): New iterator.
2011-12-23 Richard Guenther <>
PR rtl-optimization/50396
* simplify-rtx.c (simplify_binary_operation_1): Properly
guard code that only works for integers.
2011-12-23 Tristan Gingold <>
* config/vms/ (log10): Fix typo.
2011-12-23 Tristan Gingold <>
* config/ia64/vms.h (SUPPORTS_ONE_ONLY): Define.
2011-12-22 Bin Cheng <>
Richard Guenther <>
PR tree-optimization/43491
* tree-ssa-pre.c (eliminate): Don't replace global register
variable when it is the RHS of a single assign.
2011-12-22 Joey Ye <>
* toplev.c (process_options): Fix typo.
2011-12-22 John David Anglin <>
PR middle-end/51252
* config/pa/pa.c (pa_som_tm_clone_table_section): New function.
(som_tm_clone_table_section): Declare.
(pa_file_start_space): Create $TM_CLONE_TABLE$ subspace.
(pa_som_asm_init_sections): Init som_tm_clone_table_section.
* config/pa/som.h (TARGET_ASM_TM_CLONE_TABLE_SECTION): Define.
2011-12-22 Richard Sandiford <>
* doc/ (TARGET_PREPARE_PCH_SAVE): New hook.
* doc/tm.texi: Regenerate.
* target.def (prepare_pch_save): New hook.
* c-family/c-pch.c (c_common_write_pch): Call it.
* config/mips/mips.c (was_mips16_pch_p): Delete.
(mips_set_mips16_mode): Don't refer to was_mips16_pch_p.
(mips_prepare_pch_save): New function.
2011-12-22 Aldy Hernandez <>
PR middle-end/51212
* opts.c (finish_options): Call sorry on -fgnu-tm and
-fnon-call-exceptions combination.
2011-12-22 Jonathan Wakely <>
* doc/invoke.texi (C++ Dialect Options): Add missing options and
move -Wzero-as-null-pointer-constant to ...
(Warning Options): ... here.
2011-12-22 Jonathan Wakely <>
PR target/47643
* doc/invoke.texi (i386 and x86-64 Options): Fix description of
-mtune without -march.
2011-12-21 Richard Earnshaw <>
PR target/51643
* arm.c (arm_function_ok_for_sibcall): Use DECL_WEAK in previous
2011-12-22 Tristan Gingold <>
* config/ia64/ia64.c (ia64_promote_function_mode): Remove.
(ia64_function_value): Call promote_function_mode instead of
* config/ia64/vms.h (PROMOTE_MODE): Define.
2011-12-22 Uros Bizjak <>
PR target/27468
* common/config/alpha/alpha-common.c (alpha_option_optimization_table):
Enable flag_ree at -O2 or higher.
2011-12-22 Richard Guenther <>
PR lto/51650
* lto.c (uniquify_nodes): Register TYPE_DECLs with the
debuginfo machinery.
2011-12-22 Bernd Schmidt <>
* tree-pass.h (pass_reload): Declare.
* ira.c (overall_cost_before, saved_flag_ira_share_spill_slots):
New global variables, moved out of ira.
(do_reload): New static function, split off from the second half
of ...
(ira): ... here.
(gate_ira): Remove.
(pass_ira): Use TV_IRA, set gate to NULL, and set flags to
(rest_of_handle_reload): New static function.
(pass_reload): New.
2011-12-22 Uros Bizjak <>
* common/config/i386/i386-common.c (ix86_option_optimization_table):
Move OPT_free processing from ...
* config/i386/i386.c (ix86_option_override_internal): ... here.
2011-12-21 Richard Earnshaw <>
PR target/51643
* arm.c (arm_function_ok_for_sibcall): Don't try to tailcall a
weak function on bare-metal EABI targets.
2011-12-21 Jonathan Wakely <>
Jim Avera <>
* doc/extend.texi (__builtin_expect): Improve example.
2011-12-21 Uros Bizjak <>
* config/i386/i386.c (ix86_option_override_internal): Enable flag_ree
also for 32bit targets.
2011-12-21 Richard Henderson <>
PR target/51552
* dwarf2cfi.c (dwarf2out_frame_debug): Move any_cfis_emitted code...
(scan_trace): ... here.
2011-12-21 Jason Merrill <>
* doc/standards.texi (C++ language): Update for C++11.
2011-12-21 Jakub Jelinek <>
* tree-vect-patterns.c (vect_operation_fits_smaller_type): Initialize
*op0 and *op1 to NULL_TREE first to avoid warnings.
* calls.c (initialize_argument_information): Initialize base to avoid
PR middle-end/51644
PR middle-end/51647
* tree-eh.c (decide_copy_try_finally): At -O0, return true
even when ndests is not 1, if there are only gimple_clobber_p
(or debug) stmts in the finally sequence.
* tree-inline.c (estimate_num_insns): Return 0 for gimple_clobber_p
2011-12-21 Aldy Hernandez <>
PR middle-end/51472
* trans-mem.c (tm_log_add): Use create_tmp_var_reg.
2011-12-21 Martin Jambor <>
* tree-into-ssa.c (rewrite_update_stmt): Do not dump extra newlines.
(rewrite_update_enter_block): Likewise.
(dump_update_ssa): Likewise.
(update_ssa): Likewise but also dump a newline at the beginning.
2011-12-21 Enkovich Ilya <>
PR target/50038
* implicit-zee.c: Delete.
* ree.c: New file.
* Replace implicit-zee.c with ree.c.
* config/i386/i386.c (ix86_option_override_internal): Rename
flag_zee to flag_ree.
* common.opt (fzee): Ignored.
(free): New.
* passes.c (init_optimization_passes): Replace pass_implicit_zee
with pass_ree.
* tree-pass.h (pass_implicit_zee): Delete.
(pass_ree): New.
* timevar.def (TV_ZEE): Delete.
(TV_REE): New.
* doc/invoke.texi: Add -free description.
2011-12-21 Tristan Gingold <>
* config/vms/vms-protos.h (vms_function_section): New prototype.
* config/vms/vms.c (vms_function_section): New function.
* config/vms/vms.h (TARGET_ASM_FUNCTION_SECTION): Define.
2011-12-21 Richard Guenther <>
PR lto/41159
* tree-outof-ssa.c (insert_value_copy_on_edge): Use the
mode of the pseudo as destination mode. Only assert that
is equal to the promoted mode of the decl if it is a REG.
2011-12-21 Tristan Gingold <>
* config/vms/xm-vms.h (STANDARD_EXEC_PREFIX): Remove define.
2011-12-20 Richard Henderson <>
* config/ia64/ia64.c (MAX_VECT_LEN): New.
(struct expand_vec_perm_d): New.
(ia64_unpack_assemble): Use ia64_expand_vec_perm_const_1.
(expand_vselect, expand_vselect_vconcat): New.
(expand_vec_perm_identity, expand_vec_perm_shrp): New.
(expand_vec_perm_1, expand_vec_perm_broadcast): New.
(expand_vec_perm_interleave_2, expand_vec_perm_v4hi_5): New.
(ia64_expand_vec_perm_const_1, ia64_expand_vec_perm_const): New.
(ia64_vectorize_vec_perm_const_ok): New.
(ia64_expand_vec_setv2sf, ia64_expand_vec_perm_even_odd): New.
* config/ia64/ia64-protos.h: Update.
* config/ia64/ (VEC): New mode iterator.
(vecint): New mode attribute.
(vec_interleave_lowv8qi, vec_interleave_highv8qi): Privatize with '*'.
(vec_interleave_lowv4hi, vec_interleave_highv4hi): Likewise.
(vec_interleave_lowv2si, vec_interleave_highv2si): Likewise.
(vec_interleave_lowv2sf, vec_interleave_highv2sf): Likewise.
(mix1_even, mix1_odd, mux1_alt): Likewise.
(mux1_brcst_qi): Remove '*' from name.
(vec_extract_evenv8qi, vec_extract_oddv8qi): Remove.
(vec_extract_evenv4hi, vec_extract_oddv4hi): Remove.
(vec_extract_evenv2si, vec_extract_oddv2si): Remove.
(vec_extract_evenv2sf, vec_extract_oddv2sf): Remove.
(vec_extract_evenodd_helper): Remove.
(vec_setv2sf): Use ia64_expand_vec_setv2sf.
(vec_pack_trunc_v4hi): Use ia64_expand_vec_perm_even_odd.
(vec_pack_trunc_v2si): Likewise.
(vec_perm_const<VEC>): New.
2011-12-20 Richard Henderson <>
* tree-vect-generic.c (expand_vector_operations_1): Correct tests
for vector types -- use the type not the mode. Fix optab selection
for vector shifts by a scalar. Handle over-large integer modes
like BLKmode.
2011-12-20 Richard Henderson <>
* config/arm/ (*arm_xorsi3): Match iorsi3 and perform
post-reload splitting.
* config/arm/ (*arm_cmpdi_unsigned): Enable for thumb2.
* config/arm/arm.c (arm_select_cc_mode): Use it.
2011-12-20 Richard Sandiford <>
* tree-ssa-math-opts.c (convert_plusminus_to_widen): Restrict
handling of signedness differences to integer types. Only build
a new optype if type1 isn't correct.
2011-12-20 Vladimir Makarov <>
PR target/49865
* ira-costs.c (find_costs_and_classes): Prefer registers even
if the memory cost is the same.
2011-12-20 Joseph Myers <>
* c-decl.c (diagnose_mismatched_decls, grokdeclarator, grokfield)
(finish_struct): Refer to C11 in comments. Use flag_isoc11.
* c-parser.c (c_parser_static_assert_declaration)
(c_parser_static_assert_declaration_no_semi, c_parser_declspecs)
(c_parser_alignas_specifier, c_parser_alignof_expression): Refer
to C11 in comments. Use flag_isoc11.
* c-typeck.c (comptypes_check_different_types): Refer to C11 in
* doc/cpp.texi (Overview): Refer to -std=c11 instead of -std=c1x.
* doc/cppopts.texi (-std=c11, -std=gnu11): Document in preference
to -std=c1x and -std=gnu1x.
* doc/extend.texi (Inline, Alternate Keywords, Other Builtins)
(__builtin_complex, Unnamed Fields): Refer to -std=c11 and C11
instead of -std=c1x and C1X.
* doc/invoke.texi (-std=c11, -std=iso9899:2011): Document in
preference to -std=c1x.
(-std=gnu11): Document in preference to -std=gnu1x.
* doc/standards.texi: Document C11 instead of C1X. Document C11
as actual standard. Document headers required from freestanding
C11 implementations.
* ginclude/float.h, ginclude/stddef.h: Test __STDC_VERSION__ >=
201112L for C11. Update comments to refer to C11.
2011-12-20 Andreas Schwab <>
* configure: Regenerate.
2011-12-20 Bernd Schmidt <>
PR middle-end/51200
* expr.c (store_field): Avoid a direct store if the mode is larger
than the size of the bit field.
* stor-layout.c (layout_decl): If flag_strict_volatile_bitfields,
treat non-volatile bit fields like volatile ones.
* toplev.c (process_options): Disallow combination of
-fstrict-volatile-bitfields and ABI versions less than 2.
* config/arm/arm.c (arm_option_override): Don't enable
flag_strict_volatile_bitfields if the ABI version is less than 2.
* config/h8300/h8300.c (h8300_option_override): Likewise.
* config/rx/rx.c (rx_option_override): Likewise.
* config/m32c/m32c.c (m32c_option_override): Likewise.
* config/sh/sh.c (sh_option_override): Likewise.
2011-12-20 Richard Guenther <>
PR lto/46796
* dwarf2out.c (modified_type_die): When the type variant
chain is corrupt use the types name, if available, instead
of __unknown__.
2011-12-20 Tristan Gingold <>
* config/alpha/alpha.c (alpha_start_function): Adjust condition to
create VMS trampoline entry point.
2011-12-19 Richard Sandiford <>
PR rtl-optimization/42839
* fwprop.c (forward_propagate_subreg): Skip the SIGN/ZERO_EXTEND
optimization if the source register is already extended.
2011-12-19 Richard Sandiford <>
* lower-subreg.c (can_decompose_p): Check every word of a hard
2011-12-19 Sandra Loosemore <>
Tom de Vries <>
PR rtl-opt/50380
* cse.c (find_comparison_args): Detect fixed point and
bail early.
2011-12-19 Aldy Hernandez <>
PR middle-end/51411
* trans-mem.c (ipa_tm_create_version): Unset DECL_WEAK.
2011-12-19 Quentin Neill <>
PR target/48743
* config/i386/driver-i386.c (host_detect_local_cpu): Also check
family to distinguish PROCESSOR_ATHLON.
2011-12-19 Richard Guenther <>
PR lto/51573
* streamer-hooks.h (struct streamer_hooks): Add second
ref_p parameter to write_tree.
(stream_write_tree): Adjust.
(stream_write_tree_shallow_non_ref): New define.
* lto-streamer.h (lto_output_tree): Adjust.
* lto-streamer-out.c (lto_output_tree): Likewise.
* tree-streamer-out.c (streamer_write_chain): Only
force the immediate tree to be streamed as non-reference.
2011-12-19 Martin Jambor <>
PR tree-optimization/51583
* tree-sra.c (load_assign_lhs_subreplacements): Call
force_gimple_operand_gsi when necessary also in case of no
corresponding replacement on the RHS.
2011-12-19 Jakub Jelinek <>
* gimple.h (gimplify_seq_add_stmt): Rename to...
(gimple_seq_add_stmt_without_update): ... this.
* gimplify.c (gimplify_seq_add_stmt): Rename to...
(gimple_seq_add_stmt_without_update): ... this.
(gimplify_seq_add_stmt): New inline wrapper for it.
* tree-vect-patterns.c (append_pattern_def_seq): Use
gimple_seq_add_stmt_without_update instead of gimplify_seq_add_stmt.
PR tree-optimization/51596
* tree-cfg.c (replace_uses_by): Call gimple_purge_dead_eh_edges
when needed.
PR middle-end/51590
PR tree-optimization/51606
* tree-vect-patterns.c (append_pattern_def_seq, new_pattern_def_seq):
New inline functions.
vect_recog_sdivmod_pow2_pattern, vect_recog_mixed_size_cond_pattern,
adjust_bool_pattern_cast, vect_recog_bool_pattern): Use them.
2011-12-19 Richard Guenther <>
PR lto/51572
* tree.c (free_lang_data_in_type): Do not unlink TYPE_DECL
(find_decls_types_r): Walk TYPE_DECLs in TYPE_FIELDS.
* tree-streamer-out.c (write_ts_field_decl_tree_pointers): Do
not stream TREE_CHAIN.
(write_ts_type_non_common_tree_pointers): Stream TYPE_FIELDS
using streamer_write_chain.
* tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
Do not stream TREE_CHAIN.
(lto_input_ts_type_non_common_tree_pointers): Stream TYPE_FIELDS
using streamer_read_chain.
* gimple-streamer-in.c (input_gimple_stmt): Skip non-FIELD_DECLs.
* gimple.c (gimple_canonical_types_compatible_p): Properly
handle trailing non-FIELD_DECLs in TYPE_FIELDS.
2011-12-19 Andreas Schwab <>
* configure: Regenerate.
2011-12-19 Bernd Schmidt <>
* emit-rtl.c (init_emit_once): Initialize const_tiny_rtx[3] for
partial integer modes.
2011-12-19 Andreas Schwab <>
PR target/51532
* config/m68k/m68k.h (FL_CAS, TARGET_CAS): Define.
* config/m68k/m68k.c (FL_FOR_isa_20): Add FL_CAS.
* config/m68k/ Use TARGET_CAS instead of (TARGET_68020 ||
2011-12-18 Anatoly Sokolov <>
* config/ia64/ia64.h (REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P,
* config/ia64/ia64.c (TARGET_LEGITIMATE_ADDRESS_P): Define.
(ia64_reg_ok_for_base_p, ia64_legitimate_address_reg,
ia64_legitimate_address_disp, ia64_legitimate_address_p): New
2011-12-17 Tom de Vries <>
PR tree-optimization/51491
* tree-ssa-ccp.c (insert_clobber_before_stack_restore)
(gsi_prev_dom_bb_nondebug, insert_clobbers_for_var): New function.
(ccp_fold_stmt): Use insert_clobbers_for_var after a successful
(ccp_visit_stmt): Calculate and free dominator info.
2011-12-16 Eric Botcazou <>
* config/sparc/ (UNSPEC_FRAME_BLOCKAGE): New constant.
(frame_blockage): New expander.
(frame_blockage<P:mode>): New instruction.
* config/sparc/sparc.c (sparc_expand_prologue): When the sequence of
instructions establishing the frame isn't atomic, emit frame blockage.
2011-12-16 Tristan Gingold <>
* config/alpha/vms.h (USE_TM_CLONE_REGISTRY): Define.
2011-12-16 Tristan Gingold <>
* config/alpha/alpha.c (alpha_use_linkage): Follow transparent alias.
(alpha_write_one_linkage): Use assemble_name to emit linkage name.
2011-12-16 Tristan Gingold <>
* config/vms/t-vms (vms.o, vms-c.o): Force output filename.
2011-12-16 Tristan Gingold <>
* config/vms/vms.c (VMS_CRTL_GLOBAL): Define.
(vms_patch_builtins): Handle.
* config/vms/ Add an entry for environ.
2011-12-16 Jakub Jelinek <>
PR debug/51557
* sel-sched-ir.c (create_copy_of_insn_rtx): Copy all notes
PR tree-optimization/51576
* tree-cfg.c (replace_uses_by): Call maybe_clean_or_replace_eh_stmt
even if fold_stmt didn't change anything.
2011-12-16 Richard Guenther <>
PR lto/51572
* dwarf2out.c (gen_type_die_with_usage): Use the context of
the TYPE_DECL as well if it is file-scope.
2011-12-15 DJ Delorie <>
* config/rl78/ (return): Rename to rl78_return.
* config/rl78/rl78.c (rl78_expand_epilogue): Use new name.
(rl78_expand_eh_epilogue): Use new name.
(rl78_calculate_death_notes): Likewise.
2011-12-15 Jakub Jelinek <>
* tree-vectorizer.h (struct _stmt_vec_info): Remove pattern_def_stmt
field, add pattern_def_seq.
(NUM_PATTERNS): Bump to 10.
* tree-vect-loop.c (vect_determine_vectorization_factor,
vect_transform_loop): Adjust for pattern def changing from a single
gimple stmt to gimple_seq.
* tree-vect-stmts.c (vect_analyze_stmt, new_stmt_vec_info,
free_stmt_vec_info): Likewise.
* tree-vect-patterns.c (vect_recog_over_widening_pattern,
vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast,
adjust_bool_pattern, vect_mark_pattern_stmts): Likewise.
(vect_recog_sdivmod_pow2_pattern): New function.
(vect_vect_recog_func_ptrs): Add it.
* config/i386/ (vcond<V_256:mode><VI_256:mode>,
vcond<V_128:mode><VI124_128:mode>, vcond<VI8F_128:mode>v2di):
Use general_operand instead of nonimmediate_operand for
operand 5 and no predicate for operands 1 and 2.
* config/i386/i386.c (ix86_expand_int_vcond): Optimize
x < 0 ? -1 : 0 and x < 0 ? 1 : 0 into vector arithmetic
resp. logical shift.
2011-12-15 Georg-Johann Lay <>
* config/avr/avr-protos.h (print_operand): Remove.
(print_operand_address): Remove.
* config/avr/avr.h (PRINT_OPERAND): Remove.
* config/avr/avr.c (TARGET_PRINT_OPERAND): New hook define.
(print_operand_address): Rename to...
(avr_print_operand_address): ...this and make static.
(print_operand): Rename to...
(avr_print_operand): ...this and make static.
(avr_print_operand_punct_valid_p): New static function.
2011-12-15 Andreas Tobler <>
* config/i386/freebsd.h (TARGET_ASM_FILE_END): Define.
2011-12-15 Jakub Jelinek <>
PR c/51360
* c-parser.c (c_parser_omp_clause_num_threads,
c_parser_omp_clause_schedule): Call mark_exp_read.
2011-12-15 Romain Geissler <>
* builtins.def (BUILT_IN_STPNCPY_CHK): New definition.
* builtins.c (expand_builtin, fold_builtin_4, maybe_emit_chk_warning):
* gimple-fold.c (gimple_fold_builtin): Likewise.
* tree-object-size.c (pass_through_call): Likewise.
* tree-ssa-alias.c (ref_maybe_used_by_call_p_1,
call_may_clobber_ref_p_1): Likewise.
* tree-ssa-structalias.c (find_func_aliases_for_builtin_call,
find_func_clobbers): Likewise.
* tree.h (fold_builtin_strncpy_chk): Rename to fold_builtin_stxncpy_chk
* builtins.c (fold_builtin_strncpy_chk): Likewise.
Rewrite stpncpy_chk calls to strncpy_chk calls if returned value is
2011-12-15 Richard Guenther <>
PR lto/51567
* gimple.c (compare_type_names_p): Also compare the TREE_CODE.
(iterative_hash_name): Also hash the TREE_CODE.
(gimple_types_compatible_p_1): For types with a TYPE_DECL
name and a type DECL_CONTEXT recurse to that type.
(iterative_hash_gimple_type): Likewise.
2011-12-15 Iain Sandoe <>
* config/rs6000/rs6000.c (rs6000_emit_prologue): Move update of
VRSave mask to save_world() when that is in use.
2011-12-15 Richard Guenther <>
* lto-wrapper.c (run_gcc): In non-parallel mode remove
ltrans inputs immediately after processing them. In parallel
mode truncate the ltrans inputs in the make rule that processes
them if temporary files are not to be preserved.
2011-12-15 Anatoly Sokolov <>
* config/arm/arm.h (REGISTER_MOVE_COST, MEMORY_MOVE_COST): Remove.
* config/arm/arm.c (arm_memory_move_cost, arm_register_move_cost):
New functions.
2011-12-15 Richard Guenther <>
PR lto/51564
STMT_IN_SSA_EDGE_WORKLIST): Remove no longer existing flag
uses documentation.
(TREE_ASM_WRITTEN): Update documentation to mention its use
on TYPE_DECLs from debug info generation.
* tree-streamer-out.c (pack_ts_base_value_fields): Stream
TREE_ASM_WRITTEN as always zero for TYPE_DECLs, similar to
all other types.
2011-12-15 Georg-Johann Lay <>
PR target/51050
* config/avr/avr.c (expand_epilogue): Don't build SUBREG of fp.
(avr_prologue_setup_frame): Ditto.
2011-12-15 Jakub Jelinek <>
PR debug/51517
* tree-ssa-coalesce.c (coalesce_ssa_name): For !optimize, test
2012-12-15 Richard Guenther <>
PR lto/48437
* lto-streamer-out.c (tree_is_indexable): Exclude block-local
extern declarations.
PR lto/48508
PR lto/48437
* tree-streamer-out.c (streamer_write_chain): Stream DECL_EXTERNAL
2011-12-14 Richard Henderson <>
* config/arm/ (*addsi3_compare0_scratch): Set predicable.
(*compare_negsi_si, *compare_addsi2_op0): Likewise.
(*compare_addsi2_op1, *zeroextractsi_compare0_scratch): Likewise.
(*compareqi_eq0, *arm_cmpsi_insn, *arm_cmpsi_negshiftsi_si): Likewise.
2011-12-14 Richard Guenther <>
* tree-cfg.c (replace_uses_by): Fixup TREE_CONSTANT for
propagating all kinds of constants.
2011-12-14 Richard Guenther <>
PR lto/51497
* lto-streamer-in.c (lto_read_body): Fixup local types
TYPE_CANONICAL and variant chain.
2011-12-14 Richard Guenther <>
* tree.c (free_lang_data_in_type): Do not clear fields
dependent on debuginfo level setting.
(find_decls_types_r): Use TYPE_STUB_DECL rathern than TREE_CHAIN.
* tree.h (TYPE_STUB_DECL): Properly check that we access a type.
2011-12-14 Georg-Johann Lay <>
PR target/50931
* config/avr/ (mulpsi3): New expander.
(*umulqihipsi3, *umulhiqipsi3): New insns.
(*mulsqipsi3.libgcc, *mulpsi3.libgcc): New insns.
(mulsqipsi3, *mulpsi3): New insn-and-splits.
(ashlpsi3): Turn to expander. Move insn code to...
(*ashlpsi3): ...this new insn.
2011-12-14 Richard Guenther <>
* tree-cfg.c (replace_uses_by): Only mark blocks altered
that will make a difference. Only recompute ADDR_EXPR
invariantness if it could possibly have changed. Do so
before folding the statement.
2011-12-13 Eric Botcazou <>
* lto-streamer-out.c (write_symbol): Use proper 64-bit host type.
* lto-cgraph.c (input_cgraph_opt_section): Use 'int' for offsets.
* lto-streamer-in.c (lto_read_body): Likewise.
(lto_input_toplevel_asms): Likewise.
* lto-section-in.c (lto_create_simple_input_block): Likewise.
* ipa-inline-analysis.c (inline_read_section): Likewise.
* ipa-prop.c (ipa_prop_read_section): Likewise.
* df.h (DF_NOTE): Fix typo in comment.
2011-12-13 Aldy Hernandez <>
* trans-mem.c (ipa_tm_create_version_alias): Set DECL_CONTEXT and
2011-12-13 Andreas Krebbel <>
* regmove.c (fixup_match_2): Only access call_used_regs with hard regs.
2011-12-13 Andrew Pinski <>
Adam Nemet <>
* config/mips/mips-cpus.def: Add Octeon2.
* config/mips/mips-tables.opt: Regenerate.
* config/mips/ (define_attr "cpu"): Add Octeon2.
* config/mips/driver-native.c (host_detect_local_cpu): Support Octeon2.
* config/mips/ (octeon_arith): Add Octeon2.
(octeon_condmove): Likewise.
(octeon_load): Rename to ..
(octeon_load_o1): this.
(octeon_load_o2): New reserve.
(octeon_cop_o2): New reserve.
(octeon_store): Match Octeon2 also.
(octeon_brj): Rename to ..
(octeon_brj_o1): this.
(octeon_brj_o2): New reserve.
(octeon_imul3): Rename to ...
(octeon_imul3_o1): this.
(octeon_imul3_o2): New reserve.
(octeon_imul): Rename to ...
(octeon_imul_o1): this.
(octeon_imul_o2): New reserve.
(octeon_mfhilo): Rename to ...
(octeon_mfhilo_o1): This.
(octeon_mfhilo_o2): New reserve.
(octeon_imadd): Rename to ...
(octeon_imadd_o1): this.
(octeon_imadd_o2): New reserve.
(octeon_idiv): Rename to ..
(octeon_idiv_o1): This.
(octeon_idiv_o2_si): New reserve.
(octeon_idiv_o2_di): Likewise.
(octeon_unknown): Match Octeon2 also.
* config/mips/mips.c (mips_rtx_cost_data): Add Octeon2 cost data.
(mips_issue_rate): Octeon2 can issue 2 at a time.
* config/mips/mips.h (TARGET_OCTEON): Match Octeon2 also.
(TARGET_OCTEON2): New define.
(TUNE_OCTEON): Match Octeon2 also.
2011-12-13 Richard Henderson <>
* config/sparc/tso.h: New file.
* config.gcc (sparc-*-linux*, sparc*-*-solaris2*): Use it.
* config/sparc/sparc.c (sparc_option_override): Honor
* config/sparc/sparc.h (SUBTARGET_DEFAULT_MEMORY_MODEL): New.
2011-12-13 Aldy Hernandez <>
PR middle-end/51443
* trans-mem.c (struct diagnose_tm): Remove saw_unsafe.
(diagnose_tm_1): Same.
(ipa_tm_execute): Do not test tm_may_enter_irr before we set it.
(ipa_tm_scan_irr_function): Return gracefully when no
(ipa_tm_scan_irr_block): Believe the user on TM attributes.
2011-12-13 Martin Jambor <>
PR middle-end/50628
* tree-sra.c (propagate_subaccesses_across_link): Do not propagate
sub-accesses of scalar accesses.
2011-12-13 Martin Jambor <>
PR tree-optimization/51362
* ipa-cp.c (estimate_local_effects): When estimated size of a
specialized clone is zero, bump it to one.
2011-12-13 Richard Guenther <>
PR lto/48354
* tree.c (find_decls_types_r): Also walk DECL_ORIGINAL_TYPE.
* tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
* tree-streamer-out.c (write_ts_decl_non_common_tree_pointers):
2011-12-13 Jakub Jelinek <>
2011-12-12 Jakub Jelinek <>
PR tree-optimization/51481
* gimple-fold.c (gimple_fold_call): Call
maybe_clean_or_replace_eh_stmt. Avoid optimization if stmt has EH
edges, but gimple_fold_builtin result can't throw.
2011-12-13 Jakub Jelinek <>
Michael Matz <>
PR tree-optimization/51117
* tree-eh.c (sink_clobbers): New function.
(execute_lower_eh_dispatch): Call it for BBs ending with
internally throwing RESX.
* cfgexpand.c (add_scope_conflicts_1): Add all conflicts only
at the first real instruction.
2011-12-13 Tristan Gingold <>
* final.c (final_scan_insn): Guard the call to begin_epilogue
debug hook.
2011-12-13 Tristan Gingold <>
* vmsdbgout.c (vmsdbgout_write_source_line): New function.
(vmsdbgout_end_prologue): Call vmsdbgout_write_source_line.
(vmsdbgout_begin_epilogue): Likewise.
(vmsdbgout_end_epilogue): Likewise.
(vmsdbgout_source_line): Move code to vmsdbgout_write_source_line.
2011-12-13 Richard Guenther <>
PR middle-end/51481
* tree-cfg.c (replace_uses_by): Pass proper arguments to
2011-12-13 Richard Guenther <>
PR tree-optimization/51519
* ipa-inline.c (edge_badness): Use edge growth in non-guessed
branch probability case as well.
2011-12-13 Revital Eres <>
* modulo-sched.c (mark_loop_unsched): Free bbs.
2011-12-12 Jakub Jelinek <>
PR rtl-optimization/51495
* function.c (thread_prologue_and_epilogue_insns): Don't add
to bb_tail basic blocks that have EDGE_COMPLEX predecessor edges
from basic blocks not needing prologue.
PR tree-optimization/51481
* gimple-fold.c (gimple_fold_call): Call
maybe_clean_or_replace_eh_stmt. Avoid optimization if stmt has EH
edges, but gimple_fold_builtin result can't throw.
2011-12-12 Vladimir Makarov <>
PR rtl-optimization/21617
* ira-color.c (bucket_allocno_compare_func): Don't compare
allocno classes. Compare number of hard registers needed.
2011-12-12 Eric Botcazou <>
PR tree-optimization/50569
* tree-sra.c (build_ref_for_model): Replicate a chain of COMPONENT_REFs
in the expression of MODEL instead of just the last one.
2011-12-12 Jakub Jelinek <>
PR middle-end/51510
* calls.c (internal_arg_pointer_based_exp_scan): Don't use
VEC_safe_grow_cleared if idx is smaller than VEC_length.
2011-12-12 Richard Sandiford <>
PR middle-end/50873
* optabs.c (maybe_legitimize_operand_same_code): Use copy_to_mode_reg
instead of force_reg. Do nothing if the address is already a
non-virtual pseudo register.
2011-12-12 Torvald Riegel <>
* gimplify.c (voidify_wrapper_expr): Add default handling for
outermost wrapper.
2011-12-12 Torvald Riegel <>
* tree-ssa-tail-merge.c (gimple_equal_p): Don't treat transaction
commits as equal.
2011-12-12 Iain Sandoe <>
* config/darwin-sections.def (zobj_const_data_section): Fix over-
length section name.
2011-12-11 Richard Henderson <>
* config/rs6000/rs6000.c (rs6000_expand_interleave): Use
2011-12-11 Jakub Jelinek <>
PR tree-optimization/51485
* tree-vect-data-refs.c (vect_analyze_data_refs): Give up on
DRs in call stmts.
2011-12-11 Patrick Marlier <>
* trans-mem.c (ipa_tm_transform_calls_redirect): Do not remove edge.
2011-12-10 Richard Henderson <>
* config/rs6000/ (altivec_vmrghb): Rewrite pattern as
vec_select + vec_concat.
(altivec_vmrghh, altivec_vmrghw, altivec_vmrghsf, altivec_vmrglb,
altivec_vmrglh, altivec_vmrglw, altivec_vmrglsf): Likewise.
(vec_perm_constv16qi): New.
(vec_extract_evenv4si, vec_extract_evenv4sf, vpkuhum_nomode,
vpkuwum_nomode, vec_extract_oddv8hi, vec_extract_oddv16qi,
vec_interleave_high<VI>, vec_interleave_low<VI>): Remove.
* config/rs6000/ (paired_merge00): Rewrite pattern as
vec_select + vec_concat.
(paired_merge10, paired_merge01, paired_merge11): Likewise.
(vec_perm_constv2sf): New.
(vec_interleave_highv2sf, vec_interleave_lowv2sf,
vec_extract_evenv2sf, vec_extract_oddv2sf): Remove.
* config/rs6000/ (spe_evmergehi): Rewrite pattern as
vec_select + vec_concat.
(spe_evmergehilo, spe_evmergelo, spe_evmergelohi): New.
(vec_perm_constv2si): New.
* config/rs6000/ (vec_interleave_highv4sf,
vec_interleave_lowv4sf, vec_interleave_high<VEC_64>,
vec_interleave_low<VEC_64>): Remove.
* config/rs6000/ (VS_double): New mode attribute.
(vsx_xxpermdi_<VSX_L>_1): Rewrite pattern as vec_select + vec_concat.
(vsx_xxmrghw_<VSX_W>, vsx_xxmrglw_<VSX_W>): Likewise.
(vsx_xxpermdi_<VSX_L>): Change to expander.
(vec_perm_const<VSX_D>): New.
(vsx_mergel_<VSX_D>, vsx_mergeh_<VSX_D>): New.
* config/rs6000/ (const_0_to_1_operand): New.
(const_2_to_3_operand): New.
* config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): New.
(altivec_expand_vec_perm_const): New.
(rs6000_expand_vec_perm_const_1, rs6000_expand_vec_perm_const): New.
(rs6000_vectorize_vec_perm_const_ok): New.
(rs6000_do_expand_vec_perm): New.
(rs6000_expand_extract_even, rs6000_expand_interleave): New.
* config/rs6000/rs6000-builtin.def (VEC_MERGE*): Update rtx codes.
* config/rs6000/rs6000-modes.def: Add double-wide vector modes.
* config/rs6000/rs6000-protos.h: Update.
2011-12-10 Richard Henderson <>
* expr.c (expand_expr_real_2) [VEC_PERM_EXPR]: Avoid passing a
CONST_INT to expand_vec_perm as the selector.
* optabs.c (expand_vec_perm): Assert the selector is of a proper mode.
2011-12-10 Richard Henderson <>
* genmodes.c (struct mode_data): Remove wider_2x member.
(blank_mode): Adjust initializer.
(calc_wider_mode): Use XALLOCAVEC.
(emit_move_wider): Select double-width same-element vectors for
2xwider vectors.
* machmode.h (GET_MODE_2XWIDER_MODE): Update documentation.
* config/i386/i386.c (doublesize_vector_mode): Remove.
(expand_vselect_vconcat): Use GET_MODE_2XWIDER_MODE instead.
2011-12-10 Joern Rennecke <>
* config/epiphany/epiphany.h (USE_LOAD_POST_INCREMENT): Define.
* config/epiphany/epiphany.h (EPIPHANY_RETURN_REGNO): New macro,
broken out of ..
* config/epiphany/epiphany-protos.h (epiphany_start_function): Declare.
* config/epiphany/epiphany.c (epiphany_handle_interrupt_attribute):
Split "timer" value into "timer0" and "timer1".
Handle page_miss, message and wand. Don't handle static_flag.
Adjust warning text.
(epiphany_start_function): New function.
(epiphany_compute_function_type): Split "timer" value into "timer0"
and "timer1". Handle page_miss, message and wand.
Don't handle static_flag.
(epiphany_expand_epilogue): Don't use frame_insn for status / iret
* config/epiphany/epiphany.h: ASM_DECLARE_FUNCTION_NAME: Define.
(enum epiphany_function_type):
2011-12-10 Nathan Sidwell <>
PR gcov-profile/51449
* coverage.c (coverage_end_function): Always process the coverage
2011-12-09 Aldy Hernandez <>
* tree.c (build_common_builtin_nodes): Do not use TM_PURE
attribute unless language has support for TM.
* config/i386/i386.c (ix86_init_tm_builtins): Exit gracefully in
the absence of TM builtins.
2011-12-09 Eric Botcazou <>
* gimple-fold.c (gimple_fold_stmt_to_constant_1) <GIMPLE_UNARY_RHS>:
Also check the TYPE_MODE to recognize useless pointer conversions.
2011-12-09 Jakub Jelinek <>
PR tree-optimization/51117
* tree-eh.c (optimize_clobbers): Don't remove just one
clobber, but all consecutive clobbers before RESX.
Use gimple_clobber_p predicate.
2011-12-09 Michael Meissner <>
* config/rs6000/rs6000.c (altivec_expand_builtin): Call
expand_call to return a valid funciton instead of return
cosnt0_rtx/NULL_RTX if there was an error with the builtin.
(altivec_expand_ld_builtin): Ditto.
(rs6000_inner_target_options): If VSX is selected as a target
attribute or pragma, enable ALTIVEC also.
(rs6000_pragma_target_parse): Call rs6000_option_override_internal
to do all of the standard processing when switching options,
including redefining appropriate macros.
PR rtl-optimization/51469
* varasm.c (default_binds_local_p_1): If the symbol is a gnu
indirect function, mark the symbol as non-local.
2011-12-09 H.J. Lu <>
PR bootstrap/51479
* (errors.o): Restored.
2011-12-09 Richard Guenther <>
PR lto/48042
* tree.c (free_lang_data_in_decl): Remove freeing conditional
on debuginfo level.
2011-12-09 Joern Rennecke <>
PR middle-end/40154
* emit-rtl.c (set_dst_reg_note): New function.
* rtl.h (set_dst_reg_note): Declare.
* optabs.c (expand_binop, expand_absneg_bit): Use set_dst_reg_note.
(emit_libcall_block, expand_fix): Likewise.
* function.c (assign_parm_setup_reg, expand_function_start): Likewise.
* expmed.c (expand_mult_const, expand_divmod): Likewise.
* reload1.c (gen_reload): Likewise.
* dse.c (get_stored_val, get_call_args): Use gen_int_mode.
* expmed.c (expand_divmod): Likewise.
* combine.c (simplify_if_then_else): Likewise.
2011-12-09 Kai Tietz <>
* ira-color.c (print_hard_regs_subforest): Use
HOST_WIDEST_INT_PRINT_DEC instead of %lld.
(allocno_hard_regs): Change type of cost member to HOST_WIDEST_INT.
(add_allocno_hard_regs): Change type of argument cost
* ira-conflict.c (build_conflict_bit_table): Replace use
of long-long by HOST_WIDEST_INT.
2011-12-09 Georg-Johann Lay <>
PR target/51425
* config/avr/ (config/avr/, *sbix_branch_tmp): Use
zero_extract:QIHI instead of zero_extract:HI.
2011-12-09 Jakub Jelinek <>
Andrew Pinski <>
PR tree-optimization/51117
* tree-eh.c (optimize_clobbers): New function.
(execute_lower_eh_dispatch): Call it.
2011-12-09 Richard Guenther <>
PR tree-optimization/51482
* tree-vect-stmts.c (get_vectype_for_scalar_type_and_size):
Make sure to only create REAL_TYPE and INTEGER_TYPE component vectors.
2011-12-09 Kai Tietz <>
* implicit-zee.c (num_realized): Change type to long.
(num_ze_opportunities): Likewise.
2011-12-08 Andrew Pinski <>
* config/mips/mips-cpus.def (octeon+): New CPU.
* config/mips/mips-tables.opt: Regenerate.
* config/mips/mips.h (MIPS_CPP_SET_PROCESSOR): Emit '+' as 'P'.
2011-12-08 Bill Schmidt <>
PR middle-end/39976
* tree-ssa-dom.c (enum expr_kind): Add EXPR_PHI.
(struct hashable_expr): Add struct phi field.
(initialize_hash_element): Handle phis; change to use XCNEWVEC.
(hashable_expr_equal_p): Handle phis.
(iterative_hash_hashable_expr): Likewise.
(print_expr_hash_elt): Likewise.
(free_expr_hash_elt): Likewise.
(dom_opt_enter_block): Create equivalences from redundant phis.
(eliminate_redundant_computations): Handle redundant phis.
(lookup_avail_expr): Handle phis.
2011-12-08 Jakub Jelinek <>
PR tree-optimization/51466
* tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Also copy
2011-12-08 Richard Guenther <>
* tree-ssa-operands.c (add_stmt_operand): Do not mark stmts
volatile when processing operands of an ADDR_EXPR.
(get_indirect_ref_operands): Likewise.
(get_tmr_operands): Likewise.
(get_expr_operands): Likewise.
2011-12-08 Andreas Krebbel <>
PR target/50395
* config/s390/s390.c (s390_mainpool_finish): Emit the jump over
the literal pool as jump insn.
2011-12-08 Richard Guenther <>
PR tree-optimization/49772
* tree-inline.c (optimize_inline_calls): Remove bail out on errors.
2011-12-08 Richard Guenther <>
PR lto/50747
* lto-streamer-out.c (produce_symtab): Remove asserts.
2011-12-08 Richard Guenther <>
PR lto/49945
* lto-streamer-out.c (tree_is_indexable): Localize variably
modified types and their FIELD_DECLs.
2011-12-08 Eric Botcazou <>
PR tree-optimization/51315
* tree.h (get_object_or_type_alignment): Declare.
* expr.c (get_object_or_type_alignment): Move to...
* builtins.c (get_object_or_type_alignment): Add assertion.
* tree-sra.c (tree_non_mode_aligned_mem_p): Rename to...
(tree_non_aligned_mem_p): ...this. Add ALIGN parameter. Look into
MEM_REFs and use get_object_or_type_alignment for them.
(build_accesses_from_assign): Adjust for above change.
(access_precludes_ipa_sra_p): Likewise.
2011-12-08 Richard Guenther <>
PR lto/48437
* lto-streamer-out.c (tree_is_indexable): Exclude block-local
extern declarations.
2011-12-07 Andrew Pinski <>
PR middle-end/45416
* expr.c (do_store_flag): Rewrite code that looks for BIT_AND_EXPR for
2011-12-07 Richard Guenther <>
PR tree-optimization/50823
* ipa-inline.c (edge_badness): Do not account for the number of
remaining calls.
2011-12-07 Martin Jambor <>
PR tree-optimization/50744
* ipa-cp.c (good_cloning_opportunity_p): Assert size_cost is positive,
compute evaluation in HOST_WIDEST_INT.
(safe_add): New function
(propagate_effects): Use safe_add to accumulate effects.
2011-12-06 Joel Sherrill <>
* config/rs6000/rtems.h: Switch to using global_options_set
2011-12-06 David S. Miller <>
* config/sparc/visintrin.h: Add appropriate __VIS__ cpp protection.
2011-12-06 Georg-Johann Lay <>
* config/avr/avr.c (avr_file_start): Fix missing ,
2011-12-06 Jakub Jelinek <>
PR target/51354
* config/i386/i386.c (ix86_emit_leave): Call ix86_add_cfa_restore_note
2011-12-06 Georg-Johann Lay <>
Forward-port from gcc-4_6-branch r181936 2011-12-02.
* config/avr/avr-mcus.def (avr_mcu_types): ATtiny4313 and
AT86RF401 have a 16-bit SP (their manual is bogus).
2011-12-06 Georg-Johann Lay <>
Forward-port from gcc-4_6-branch r181936 2011-12-02.
PR target/51002
* config/avr/ (movhi_sp_r): Set insn condition to
* config/avr/avr.c (output_movhi): Use "clr%B0" instead of "in
%B0,__SP_H__" if AVR_HAVE_8BIT_SP.
(avr_file_start): Only print "__SP_H__ = 0x3e" if !AVR_HAVE_8BIT_SP.
2011-12-06 Georg-Johann Lay <>
PR target/51409
PR target/49868
* config/avr/avr.h (ADDR_SPACE_PGM, ADDR_SPACE_PGM1,
(avr_addrspace_t): New typedef.
(avr_addrspace): New declaration.
* config/avr/avr-c.c (avr_toupper): New static function.
(avr_register_target_pragmas, avr_cpu_cpp_builtins): Use
avr_addrspace to get address space information.
* config/avr/avr.c (avr_addrspace): New variable.
(avr_out_lpm, avr_pgm_check_var_decl, avr_insert_attributes,
avr_asm_named_section, avr_section_type_flags,
avr_asm_select_section, avr_addr_space_address_mode,
avr_addr_space_convert, avr_emit_movmemhi): Use it.
(avr_addr_space_pointer_mode): Forward to avr_addr_space_address_mode.
(avr_pgm_segment): Remove.
2011-12-06 Richard Guenther <>
PR middle-end/50601
* varasm.c (assemble_alias): Move DECL_EXTERNAL implementation
quirk adjustjment ...
* passes.c (rest_of_decl_compilation): ... here.
2011-12-06 Richard Guenther <>
PR middle-end/51436
* gimple-fold.c (gimplify_and_update_call_from_tree): Guard vdef check
for the fact we do not have virtual operands when not optimizing.
2011-12-06 Richard Guenther <>
PR tree-optimization/51245
* tree-ssa-sccvn.c (vn_reference_lookup_or_insert_constant_for_pieces):
New function.
(vn_reference_lookup_3): Use it. Properly valueize all refs we create.
2011-12-06 Iain Sandoe <>
* config/rs6000/rs6000.c (darwin_rs6000_override_options): Initialize
2011-12-06 Richard Guenther <>
PR tree-optimization/51363
* gimple.c (gimple_rhs_has_side_effects): Remove.
* gimple.h (gimple_rhs_has_side_effects): Likewise.
* tree-ssa-dom.c (optimize_stmt): Simplify conditional.
2011-12-06 Alan Modra <>
PR target/50906
* config/rs6000/rs6000.c (rs6000_emit_prologue <TARGET_SPE_ABI>):
Do not mark r11 setup as frame-related. Pass correct offset to
rs6000_emit_savres_rtx. Correct out-of-line rs6000_frame_related
arguments. Correct sp_offset. Remove "offset" fudge from
in-line rs6000_frame_related call. Rename misleading variable.
Fix comments and whitespace. Tidy some expressions.
(rs6000_emit_epilogue <TARGET_SPE_ABI>): Always set frame_reg_rtx
to r11 in out-of-line case. Correct sp_offset. Pass correct
offset to rs6000_emit_savres_rtx. Rename misleading variable.
Fix comments and whitespace. Tidy some expressions.
(rs6000_emit_epilogue <non-TARGET_SPE_ABI>): Add sp_offset
adjustment when !saving_GPRs_inline. Correct register mode
used in address calcs.
(rs6000_emit_epilogue <non-TARGET_SPE_ABI>): Similarly when
2011-12-06 Ramana Radhakrishnan <>
* config/arm/ (*combine_vcvt_f64_<FCVTI32typename>): Fix
formatting character for vmov.f64 case.
2011-12-05 Jakub Jelinek <>
PR tree-optimization/51396
* tree-ssa-math-opts.c (convert_mult_to_fma): Don't optimize
if MUL_RESULT has zero uses.
PR debug/51410
* c-decl.c (pop_scope): Don't add DECL_EXTERNAL decls
for debug info if scope is file_scope.
PR c/51339
* c-decl.c (c_finish_incomplete_decl, finish_decl): Call
relayout_decl instead of layout_decl.
2011-12-05 Richard Sandiford <>
* resource.c (init_resource_info): Only consider EXIT_IGNORE_STACK
if there is in epilogue.
2011-12-05 Richard Sandiford <>
* optabs.c (maybe_emit_sync_lock_test_and_set): Pass a null target
to emit_library_call_value.
(expand_atomic_compare_and_swap): Likewise.
2011-12-05 Vladimir Makarov <>
PR other/50775
* ira-int.h (struct ira_object): Remove add_data.
* ira-build.c (ira_create_object): Remove OBJECT_ADD_DATA
* ira-color.c (object_hard_regs_t, object_hard_regs): Rename to
allocno_hard_regs_t, allocno_hard_regs.
(object_hard_regs_node_t, object_hard_regs_node): Rename to
allocno_hard_regs_node_t and allocno_hard_regs_node.
(struct allocno_color_data): Add new member last_process. Move
profitable_hard_regs, hard_regs_node, and hard_regs_subnodes_start
from object_color_data.
(object_color_data_t, object_color_data, OBJECT_COLOR_DATA): Remove.
(curr_allocno_process): New static variable.
(object_hard_regs_eq, object_hard_regs_htab): Rename to
allocno_hard_regs_eq and allocno_hard_regs_htab.
(init_object_hard_regs, finish_object_hard_regs): Rename to
init_allocno_hard_regs and finish_allocno_hard_regs.
(object_hard_regs_compare, object_hard_regs_node_t): Rename to
allocno_hard_regs_compare and allocno_hard_regs_node_t.
(create_new_object_hard_regs_node): Rename to
(add_new_object_hard_regs_node_to_forest): Rename to
(add_object_hard_regs_to_forest, collect_object_hard_regs_cover):
Rename to add_allocno_hard_regs_to_forest and
(setup_object_hard_regs_nodes_parent): Rename to
(remove_unused_object_hard_regs_nodes): Rename to
(enumerate_object_hard_regs_nodes, object_hard_regs_nodes_num):
Rename to enumerate_allocno_hard_regs_nodes and
(object_hard_regs_nodes, object_hard_regs_subnode_t): Rename to
allocno_hard_regs_nodes and allocno_hard_regs_subnode_t.
(object_hard_regs_subnode, object_hard_regs_subnodes): Rename to
allocno_hard_regs_subnode and allocno_hard_regs_subnodes.
(object_hard_regs_subnode_index): Rename to
(setup_object_hard_regs_subnode_index): Rename to
(get_object_hard_regs_subnodes_num): Rename to
(form_object_hard_regs_nodes_forest): Rename to
(finish_object_hard_regs_nodes_tree): Rename to
(finish_object_hard_regs_nodes_forest): Rename to
(setup_left_conflict_sizes_p): Use allocno data instead of object ones.
Process conflict allocnos once.
(update_left_conflict_sizes_p): Use allocno data instead of object
ones. Change prototype signature.
(empty_profitable_hard_regs): Use allocno data instead of object ones.
(setup_profitable_hard_regs): Ditto.
(get_conflict_profitable_regs): Rename to
get_conflict_and_start_profitable_regs. Use allocno data for
profitable regs calculation.
(check_hard_reg_p): Change prototype signature. Check profitable
regs for allocno not the objects.
(assign_hard_reg): Process conflict allocnos only once for
updating conflict costs.
(setup_allocno_available_regs_num): Use allocno data instead of
object ones. Modify debug output.
(color_pass): Remove initialization and finalization of object
color data.
2011-12-05 Kazu Hirata <>
PR target/51408
* config/arm/ (*minmax_arithsi): Always require the else
clause in the MINUS case.
2011-12-05 Richard Guenther <>
PR tree-optimization/50904
* tree-ssa-loop-im.c (struct mem_ref): Remove vops member.
(memory_references): Remove clobbered_vops and vop_ref_map
members, add all_refs_stored_in_loop member.
(memref_free): Adjust.
(mem_ref_alloc): Likewise.
(gather_mem_refs_stmt): Do not record clobbers, instead
record refs for unanalyzable stmts.
(gather_mem_refs_in_loops): Do not propagate clobbers.
(struct vop_to_refs_elt, vtoe_hash, vtoe_eq, vtoe_free,
record_vop_access, get_vop_accesses, get_vop_stores,
add_vop_ref_mapping): Remove.
(create_vop_ref_mapping_loop): Adjust to simply record all stores.
(analyze_memory_references): Adjust.
(refs_independent_p): Check for not analyzable refs.
(can_sm_ref_p): Likewise.
(ref_indep_loop_p_1): Simplify.
(tree_ssa_lim_finalize): Adjust.
* tree-ssa-loop-im.c (stmt_cost): Simplify, use LIM_EXPENSIVE
rather than magic constants. Assign zero cost to PAREN_EXPR
and SSA_NAME copies. Assign cost proportional to the vector
size for vector constructors.
2011-12-05 Richard Guenther <>
* tree-ssa-alias.h (struct ao_ref_s): Add volatile_p field.
* tree-ssa-alias.c (ao_ref_init): Initialize it.
(ao_ref_init_from_ptr_and_size): Likewise.
(refs_may_alias_p_1): Two volatile accesses conflict.
(ref_maybe_used_by_call_p_1): Likewise.
(call_may_clobber_ref_p_1): Likewise.
* tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Initialize
volatile_p field.
2011-12-05 Richard Guenther <>
* tree-ssa.c (verify_ssa): Verify SSA names in the loop over all SSA
names. Remove SSA operand checking, call verify_ssa_operands.
* tree-ssa-operands.h (verify_ssa_operands): Declare.
* tree-ssa-operands.c (verify_ssa_operands): New function.
2011-12-05 Ramana Radhakrishnan <>
* config/arm/arm.c (vfp3_const_double_for_fract_bits): Define.
* config/arm/arm-protos.h (vfp3_const_double_for_fract_bits): Declare.
* config/arm/ ("Dt"): New constraint.
* config/arm/
(const_double_vcvt_power_of_two_reciprocal): New.
* config/arm/ (FCVTI32typename): New.
(FCVT): New iterator.
(*combine_vcvt_f32_<FCVTI32typename>): New.
(*combine_vcvt_f64_<FCVTI32typename>): New.
2011-12-05 Richard Guenther <>
* cgraph.c (cgraph_create_edge_1): Initialize
call_stmt_cannot_inline_p from the stmt if possible.
(cgraph_make_edge_direct): Likewise.
* gimple-streamer-in.c (input_gimple_stmt): Do not
call gimple_call_set_cannot_inline.
* gimple.h (enum gf_mask): Remove GF_CALL_CANNOT_INLINE, shift values.
(gimple_call_set_cannot_inline): Remove.
(gimple_call_cannot_inline_p): Likewise.
* ipa-inline-analysis.c (initialize_inline_failed): Look
at the edge call_stmt_cannot_inline_p flag.
* ipa-inline.c (can_inline_edge_p): Likewise.
(early_inliner): Only update the edge flag.
* ipa-prop.c (update_indirect_edges_after_inlining): Likewise.
(ipa_modify_call_arguments): Do not call gimple_call_set_cannot_inline.
* cgraphunit.c (assemble_thunk): Likewise.
* gimple-fold.c (gimple_fold_call): Likewise.
* tree.h (CALL_CANNOT_INLINE_P): Remove.
* tree-mudflap.c (mf_xform_statements): Do not modify alloca calls.
* builtins.c (expand_builtin_alloca): With -fmudflap do not expand
alloca calls inline.
* cfgexpand.c (expand_call_stmt): Do not set CALL_CANNOT_INLINE_P.
* gimple.c (gimple_build_call_from_tree): Do not read
* gimplify.c (gimplify_call_expr): Do not copy CALL_CANNOT_INLINE_P.
2011-12-05 Jakub Jelinek <>
Eric Botcazou <>
PR middle-end/51323
PR middle-end/50074
* calls.c (internal_arg_pointer_exp_state): New variable.
internal_arg_pointer_exp_scan): New functions.
(internal_arg_pointer_based_exp): New function.
(mem_overlaps_already_clobbered_arg_p): Use it.
(expand_call): Free internal_arg_pointer_exp_state.cache vector
and clear internal_arg_pointer_exp_state.scan_start.
2011-12-04 Kaz Kojima <>
* config/sh/linux.h (TARGET_DEFAULT): Add MASK_SOFT_ATOMIC.
* config/sh/ New file.
* config/sh/ Include
* config/sh/sh.opt (msoft-atomic): New option.
* doc/invoke.texi (SH Options): Document it.
2011-12-04 Nathan Sidwell <>
* gcov-io.h (struct gcov_info): Replace trailing array with
pointer to array.
* profile.c (branch_prob): Only call renamed
coverage_begin_function once.
* coverage.h (coverage_begin_output): Rename to ...
(coverage_begin_function): ... here.
* coverage.c (struct function_list): Rename to ...
(struct coverage_data): ... this. Update all uses.
(gcov_info_var, gcov_fn_info_type, gcov_fn_info_ptr_type): New globals.
(bbg_file_opened, bbg_function_announced): Remove.
(get_coverage_counts): Adjust message.
(coverage_begin_ouput): Rename to ...
(coverage_begin_function): ... here. Move file opening to
coverage_init. Adjust for being called only once.
(coverage_end_function): Remove bbg file and inhibit further
output here on error.
(build_info_type): Adjust for change to pointer to array.
(build_info): Receive array of function pointers and adjust.
(create_coverage): Break into ...
(coverage_obj_init, coverage_obj_fn, coverage_obj_finish):
... these, and adjust.
(coverage_init): Open the notes file here. Tidy.
(coverage_finish): Call coverage_obj_init etc.
2011-12-04 Ira Rosen <>
PR middle-end/51285
* tree-vect-loop.c (vect_create_epilog_for_reduction): Create exit
phi nodes for outer loop in case of double reduction.
2011-12-04 Jérémie Detrey <>
PR target/51393
* config/i386/avxintrin.h (_mm256_insert_epi64): Declare second
parameter as long long.
2011-12-04 Richard Sandiford <>
PR middle-end/51351
* optabs.c (init_sync_libfuncs): Use "or" rather than "ior"
in the external names.
2011-12-03 Jack Howarth <>
* config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Pass -no_pie for
non-PIC code when targeting 10.7 or later.
2011-12-03 Iain Sandoe <>
* config/darwin.h (STARTFILE_SPEC): Do not use -lbundle1.o when
Darwin >= 10.
(DARWIN_DYLIB1_SPEC): Do not use -ldylib1.10.5.o when Darwin >= 10.
(DARWIN_CRT1_SPEC): Use -lcrt1.10.6.o when Darwin >= 10.
2011-12-03 Jakub Jelinek <>
* fold-const.c (fold_unary_loc): Fold VEC_UNPACK_LO_EXPR,
(fold_binary_loc): Fold VEC_PACK_TRUNC_EXPR,
PR debug/50317
* tree-ssa.c (target_for_debug_bind): Also allow is_gimple_reg_type
vars that aren't referenced.
(tree-ssa-live.c (remove_unused_locals): Don't clear TREE_ADDRESSABLE
of unreferenced local vars.
* cfgexpand.c (expand_debug_expr): For DEBUG_IMPLICIT_PTR allow also
TREE_ADDRESSABLE vars that satisfy target_for_debug_bind.
2011-12-03 Anatoly Sokolov <>
* config/arm/arm.h (LIBCALL_VALUE, FUNCTION_VALUE_REGNO_P): Remove.
* config/arm/arm-protos.h (aapcs_libcall_value): Remove.
* config/arm/arm.c (TARGET_FUNCTION_VALUE_REGNO_P): Define.
(arm_libcall_value_1, arm_function_value_regno_p): New function.
(arm_function_value, arm_libcall_value): Use arm_libcall_value_1.
(aapcs_libcall_value): Make static.
(arm_libcall_value): Add static qualifier.
2011-12-02 Jakub Jelinek <>
PR target/51387
* config/i386/ (mul<mode>3 with VI1_AVX2 iterator): For
V32QImode use { 0,2,..,14,32,34,..,46,16,18,..,30,48,50,..,62 }
permutation instead of extract even permutation.
2011-12-02 Nathan Sidwell <>
* gcov.c (struct arc_info): Add is_throw field.
(struct (block_info): Add exceptional field, reduce flags size to
account for it.
(struct function_info): Add has_catch field.
(struct line_info): Add unexceptional field.
(process_file): Call find_exception_blocks if necessary.
(read_graph_file): Adjust. Note if an exceptional edge is seen.
(find_exception_blocks): New.
(add_line_counts): Set line's unexceptional flag if not exceptional.
(output_branch_count): Note exceptional arcs, lines and blocks.
* gcov-dump.c (tag_arcs): Decode arc flags.
* doc/gcov.texi: Document '=====' lines.
2011-12-02 Anatoly Sokolov <>
* config/ia64/ia64-protos.h (ia64_print_operand,
ia64_print_operand_address): Remove.
* config/ia64/ia64.c (TARGET_PRINT_OPERAND,
(ia64_print_operand_punct_valid_p): New function.
(ia64_print_operand, ia64_print_operand_address): Make static.
2011-12-02 Michael Meissner <>
PR target/51390
* config/rs6000/rs6000.c (def_builtin): Use the correct field to
figure out the function's attributes.
(struct builtin_description): Mark mask field as const since we no
longer need to modify it for SPE and PAIRED builtins.
2011-12-02 Joseph Myers <>
2008-09-18 Andrew Pinski <>
PR rtl-opt/37451
* loop-doloop.c (doloop_modify): New argument zero_extend_p and
zero extend count after the correction to it is done.
(doloop_optimize): Update call to doloop_modify, don't zero extend
count before call.
2008-11-03 Andrew Pinski <>
PR rtl-opt/37782
* loop-doloop.c (doloop_modify): Add from_mode argument that says what
mode count is in.
(doloop_optimize): Update call to doloop_modify.
2011-12-02 Richard Guenther <>
PR lto/47259
* ipa.c (varpool_externally_visible_p): Register variables
are always externally visible.
2011-12-02 Sameera Deshpande <>
* gimple-pretty-print.c (dump_gimple_call): Dereference fn only if
2011-12-02 Martin Jambor <>
PR tree-optimization/50622
* tree-sra.c (load_assign_lhs_subreplacements): Force gimple operand
if both lacc and racc are grp_partial_lhs.
2011-12-01 Kaz Kojima <>
PR target/50814.
* config/sh/sh.c (expand_ashiftrt): Handle TARGET_SH2A same as
(shl_sext_kind): Likewise.
* config/sh/sh.h (SH_DYNAMIC_SHIFT_COST): Likewise.
* config/sh/ (ashlsi3_sh2a, ashrsi3_sh2a, lshrsi3_sh2a): Remove.
(ashlsi3_std): Handle TARGET_SH2A same as TARGET_SH3.
(ashlsi3): Likewise.
(ashrsi3_d): Likewise.
(lshrsi3_d): Likewise.
(lshrsi3): Likewise.
2011-12-01 Diego Novillo <>
PR bootstrap/51346
* ipa-inline.c (can_inline_edge_p): If the edge E has a statement,
use the statement's inline indicator instead of E's.
Remove consistency check.
2011-12-01 Diego Novillo <>
PR bootstrap/51346
2011-11-29 Diego Novillo <>
* gimple.c (gimple_call_set_cannot_inline): Move from gimple.h.
Update field call_stmt_cannot_inline_p from call
graph edge, if needed.
* gimple.h (gimple_call_set_cannot_inline): Move to gimple.c.
2011-12-01 Nathan Sidwell <>
PR gcov-profile/51113
* coverage.c (build_var): Keep coverage variables static.
2011-12-01 Jakub Jelinek <>
PR tree-optimization/51356
* tree-vect-patterns.c (vect_recog_bool_pattern): Give up if
vectype doesn't have VECTOR_MODE_P.
PR debug/50317
* tree-ssa-dce.c (remove_dead_stmt): Add a debug stmt when removing
as unnecessary a store to a variable with gimple reg type.
* tree-ssa-live.c (remove_unused_locals): Clear TREE_ADDRESSABLE bit
on local unreferenced variables.
* cfgexpand.c (expand_gimple_basic_block): Don't emit DEBUG_INSNs
for !target_for_debug_bind variables.
2011-12-01 Patrick Marlier <>
PR middle-end/51273
* cgraph.h (cgraph_call_node_duplication_hooks): Declare.
* cgraph.c (cgraph_call_node_duplication_hooks): Make global.
* cgraphunit.c (cgraph_copy_node_for_versioning): Call it.
2011-12-01 Andrew Pinski <>
PR lto/51198
* tree.c (free_lang_data_in_decl): Clear FIELD_DECL's
2011-12-01 Jakub Jelinek <>
PR tree-optimization/51246
* tree-predcom.c (replace_ref_with): Handle also clobber on the rhs.
PR rtl-optimization/51014
* loop-unroll.c (apply_opt_in_copies): Ignore label DEBUG_INSNs
both from bb and orig_bb.
2011-12-01 Joern Rennecke <>
PR tree-optimization/50802
* tree-vrp.c (simplify_conversion_using_ranges): Rewrite test
considering what happens to ranges during sign changes and/or
intermediate narrowing conversions.
2011-11-30 John David Anglin <>
PR middle-end/50283
* config/pa/ (in_branch_delay): Disallow frame related insns.
(in_nullified_branch_delay): Likewise.
(in_call_delay): Likewise.
2011-11-30 Richard Henderson <>
* predict.c (expr_expected_value_1): Assume compare-and-swap builtin
boolean return is true.
2011-11-30 Jakub Jelinek <>
PR rtl-optimization/51044
* dse.c (emit_inc_dec_insn_before): Ensure new_insn is an instruction
rather than just insn body.
PR target/50725
* function.c (thread_prologue_and_epilogue_insns): If
stack_realign_drap, add drap_reg to SET_UP_BY_PROLOGUE
PR middle-end/51089
* tree-eh.c (cleanup_empty_eh_merge_phis): Add check to
avoid creating duplicate edges here.
(cleanup_empty_eh_unsplit): And remove it in the caller.
2011-11-30 Andrew Pinski <>
PR c/51321
* c-parser.c (c_parser_postfix_expression): Check groktypename results
before looking at the main variant.
2011-11-30 Jakub Jelinek <>
PR rtl-optimization/48721
* sched-deps.c (sched_analyze_insn): For SIBLING_CALL_P set
reg_pending_barrier to TRUE_BARRIER.
PR rtl-optimization/48721
* sched-ebb.c (begin_move_insn): Insert empty unreachable
block after BARRIER if insn is followed by it.
2011-11-30 Richard Henderson <>
* config/sparc/sparc-opts.h (enum sparc_memory_model_type): New.
* config/sparc/sparc.opt (mmemory-model=): New option.
* doc/invoke.texi (Sparc Options): Document it.
* config/sparc/sparc.c (sparc_option_override): Provide default
for sparc_memory_model.
(sparc_emit_membar_for_model): Omit barrier combinations that are
implied by the memory model.
2011-11-30 Richard Henderson <>
* config/sparc/ (I124MODE): New mode iterator.
(memory_barrier): Remove.
(atomic_exchangesi): New.
(swapsi): Rename from *swapsi.
(atomic_test_and_set<I124MODE>): New.
(ldstubqi): Rename from *ldstubqi, merge with expander.
(ldstub<I24MODE>): Rename from *ldstub<I24MODE>, merge with expander.
(sync_lock_test_and_setsi): Remove.
(sync_lock_test_and_set<I12MODE>): Remove.
2011-11-30 Richard Henderson <>
* config/sparc/ ("w"): New.
* config/sparc/ (mem_noofs_operand): New.
* config/sparc/sparc.c (sparc_expand_compare_and_swap_12): Make static.
Generate the boolean result of the atomic_compare_exchange.
(sparc_expand_compare_and_swap): New.
* config/sparc/ (atomic_compare_and_swap<I>): New.
(atomic_compare_and_swap<I48MODE>_1): Rename from
*sync_compare_and_swap<I48MODE>, use mem_noofs_operand.
(*atomic_compare_and_swapdi_v8plus): Rename from
*sync_compare_and_swapdi_v8plus, use mem_noofs_operand.
(sync_compare_and_swap<I12MODE>): Remove.
(sync_compare_and_swap<I48MODE>): Remove.
2011-11-30 Richard Henderson <>
* config/sparc/ (register_or_v9_zero_operand): New.
* config/sparc/ (UNSPEC_ATOMIC): New.
* config/sparc/ (atomic_load<I>): New.
(atomic_loaddi_1, atomic_store<I>, atomic_storedi_1): New.
2011-11-30 Richard Henderson <>
* config/sparc/ (zero_or_v7_operand): New.
* config/sparc/sparc.c (sparc_emit_membar_for_model): New.
* config/sparc/sparc-protos.h: Update.
* config/sparc/ (mem_thread_fence): New.
(memory_barrier): Use sparc_emit_membar_for_model.
(membar, *membar_empty, *membar_storestore, *membar_storeload): New.
(*membar_v8): Accept and ignore the membar mask.
(*membar): Accept and print the membar mask.
2011-11-30 Matthew Gretton-Dann <>
* config/arm/arm.c (arm_issue_rate): Cortex-A15 can triple issue.
* config/arm/ (mul64): New attribute.
(generic_sched): Cortex-A15 is not scheduled generically.
( Include.
* config/arm/ New machine description.
* config/arm/t-arm (MD_INCLUDES): Add
2011-11-30 Matthew Gretton-Dann <>
* config/arm/t-arm (MD_INCLUDES): Ensure all md files are listed.
2011-11-30 Iain Sandoe <>
* doc/ (NEXT_OBJC_RUNTIME): Update macro description.
* doc/tm.texi: Regenerate.
* flags.h (flag_next_runtime): Remove references.
* toplev.c: Likewise.
* defaults.h (NEXT_OBJC_RUNTIME): Provide default.
* gccspec.c (lang_specific_driver): Adjust use of NEXT_OBJC_RUNTIME.
* config/darwin.c (darwin_override_options): Provide default
Objective-C abi settings and target conflict checks.
* config/darwin.h (SUBTARGET_C_COMMON_OVERRIDE_OPTIONS): Remove unused
code. Adjust indenting.
2011-11-29 Joseph Myers <>
* config/sh/sh.h (enum reg_class, REG_CLASS_NAMES)
* config/sh/ (u): New constraint.
2011-11-29 Oleg Endo <>
PR target/51337
* config/sh/sh.c (sh_secondary_reload): Add case when FPUL
register is being loaded from a pseudo in memory.
2011-11-29 DJ Delorie <>
* config.gcc (rl78-*-elf): New case.
* doc/extend.texi: Add RL78 documentation.
* doc/invoke.texi: Likewise.
* doc/md.texi: Likewise.
* doc/contrib.texi: Add RL78.
* doc/install.texi: Add rl78-*-elf.
* config/rl78: New directory for the Renesas RL78.
2011-11-29 Jakub Jelinek <>
PR tree-optimization/51247
* tree-vrp.c (extract_range_from_assert): For signed 1-bit precision
types instead of adding 1 subtract -1 and instead of subtracting 1
add -1 to avoid overflows.
2011-11-29 Andrew MacLeod <>
PR target/50123
* optabs.c (maybe_optimize_fetch_op): New. Look for more optimal
instructions for a FECTH_OP or OP_FECTH sequence.
(expand_atomic_fetch_op): Call maybe_optimize_fetch_op.
2011-11-29 Uros Bizjak <>
* config/i386/ (UNSPEC_LDA, UNSPEC_STA): New unspecs.
(movdi_via_fpu): Remove.
(loaddi_via_fpu): New insn pattern.
(storedi_via_fpu): Ditto.
(atomic_loaddi_fpu): Use loaddi_via_fpu and storedi_via_fpu.
(atomic_storedi_fpu): Ditto.
* reg-stack.c (get_true_reg): Handle UNSPEC_LDA.
(subst_stack_regs_pat): Handle UNSPEC_STA.
2011-11-29 Uros Bizjak <>
* config/i386/ (*floathi<mode>2_i387_with_temp): Do not
allocate scratch memory for alternative 0.
2011-11-29 Michael Meissner <>
* config/rs6000/rs6000-builtins.def: Completely rewrite builtin
handling to centralize more of the builtins in this file. Change
some builtin enumerations to be more consistant. Use a new mask
to hold the current builtins, including SPE and PAIRED builtins
which no longer are set via target_flags masks. Add
-mdebug=builtin debug support. For power machines, define all
Altivec and VSX buitins when the compiler starts, but don't allow
the use of a builtin unless the appropriate switch is used, or
#pragma GCC target is used to change the options. If the user
uses #pragma GCC target, update the appropriate hardware macros.
* common/config/rs6000/rs6000-common.c (rs6000_handle_option): Ditto.
* config/rs6000/rs6000.opt (rs6000_builtin_mask): Ditto.
* config/rs6000/rs6000-c.c (rs6000_macro_to_expand): Ditto.
(rs6000_define_or_undefine_macro): Ditto.
(rs6000_target_modify_macros): Ditto.
(rs6000_cpu_cpp_builtins): Ditto.
(altivec_overloaded_builtins): Ditto.
(altivec_build_resolved_builtin): Ditto.
* config/rs6000/rs6000.c (rs6000_target_modify_macros_ptr): Ditto.
(rs6000_builtin_info): Ditto.
(def_builtin): Ditto.
(enable_mask_for_builtins): Ditto.
(DEBUG_FMT_X): Ditto.
(rs6000_debug_reg_global): Ditto.
(rs6000_builtin_mask_calculate): Ditto.
(rs6000_option_override_internal): Ditto.
(rs6000_builtin_conversion): Ditto.
(rs6000_builtin_vectorized_function): Ditto.
(bdesc_3arg): Ditto.
(bdesc_dst): Ditto.
(bdesc_2arg): Ditto.
(builtin_description_predicates): Ditto.
(bdesc_altivec_preds): Ditto.
(bdesc_spe_predicates): Ditto.
(bdesc_spe_evsel): Ditto.
(bdesc_paired_preds): Ditto.
(bdesc_abs): Ditto.
(bdesc_1arg): Ditto.
(rs6000_overloaded_builtin_p): Ditto.
(rs6000_expand_unop_builtin): Ditto.
(bdesc_2arg_spe): Ditto.
(spe_expand_builtin): Ditto.
(rs6000_invalid_builtin): Ditto.
(rs6000_expand_builtin): Ditto.
(rs6000_init_builtins): Ditto.
(spe_init_builtins): Ditto.
(paired_init_builtins): Ditto.
(altivec_init_builtins): Ditto.
(builtin_function_type): Ditto.
(rs6000_common_init_builtins): Ditto.
(rs6000_builtin_reciprocal): Ditto.
(rs6000_builtin_mask_names): Ditto.
(rs6000_pragma_target_parse): Ditto.
(rs6000_function_specific_print): Ditto.
* config/rs6000/rs6000.h (MASK_DEBUG_BUILTIN): Ditto.
(enum rs6000_btc): Ditto.
(RS6000_BTC_*): Ditto.
(RS6000_BTM_*): Ditto.
(enum rs6000_builtins): Ditto.
* config/rs6000/rs6000-protos.h (rs6000_overloaded_builtin_p): Ditto.
(rs6000_target_modify_macros): Ditto.
(rs6000_target_modify_macros_ptr): Ditto.
* config/rs6000/ (unsfloat<VEC_int><mode>2): Use the
standard name for converting vector unsigned values to floating
is handled by machine independent code.
* config/rs6000/rs6000.c (TARGET_VECTORIZE_BUILTIN_CONVERSION): Ditto.
(rs6000_builtin_conversion): Ditto.
2011-11-29 Dodji Seketeli <>
* tree-diagnostic (struct loc_t): Rename into struct loc_map_pair.
(maybe_unwind_expanded_macro_loc): Adjust.
2011-11-29 David Edelsohn <>
Aldy Hernandez <>
* trans-mem.c (ipa_tm_create_version_alias): Mangle new_decl
(ipa_tm_create_version): Same.
2011-11-29 Bernd Schmidt <>
* haifa-sched.c (recompute_todo_spec): Simplify and correct the
code checking for a clobber of a condition register when deciding
whether to predicate.
2011-11-29 Diego Novillo <>
* gimple.c (gimple_call_set_cannot_inline): Move from gimple.h.
Update field call_stmt_cannot_inline_p from call graph edge, if needed.
* gimple.h (gimple_call_set_cannot_inline): Move to gimple.c.
2011-11-29 Sameera Deshpande <>
* config/arm/ (arm_movdi): Update NEG_POOL_RANGE.
(movdf_soft_insn): Likewise.
* config/arm/ (thumb2_movdf_fpa): Likewise.
* config/arm/ (neon_mov<mode>): Likewise.
* config/arm/ (movdi_vfp): Likewise.
(movdi_vfp_cortexa8): Likewise.
(movdf_vfp): Likewise.
2011-11-29 Jakub Jelinek <>
PR middle-end/50074
* expr.c (expand_expr_addr_expr_1): Don't call force_operand for
EXPAND_SUM modifier.
2011-11-29 Ira Rosen <>
PR tree-optimization/51301
* tree-vect-patterns.c (vect_recog_over_widening_pattern): Check that
the last statement doesn't convert to a bigger type than the original
type of the computation.
2011-11-28 Richard Henderson <>
* config/rs6000/rs6000.c (rs6000_expand_atomic_compare_and_swap):
Handle overlap between retval and oldval. Always compute boolval
from CR0 EQ value.
2011-11-28 Jakub Jelinek <>
PR debug/50317
* tree-ssa.c (execute_update_addresses_taken): Remove
var ={v} {CLOBBER} stmts instead of rewriting them into
var_N ={v} {CLOBBER}.
PR middle-end/50907
* function.c (convert_jumps_to_returns): When redirecting an edge
succ to EXIT_BLOCK_PTR, clear EDGE_CROSSING flag.
PR tree-optimization/50078
* tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Copy over
TREE_THIS_VOLATILE also from the old to new lhs resp. rhs.
PR tree-optimization/50682
* tree-eh.c (maybe_remove_unreachable_handlers): New function.
* tree-flow.h (maybe_remove_unreachable_handlers): New prototype.
* tree-optimize.c (execute_cleanup_cfg_post_optimizing): Call it.
2011-11-28 Georg-Johann Lay <>
* doc/extend.texi (AVR Built-in Functions): Add documentation for
__builtin_avr_map8 and __builtin_avr_map16.
* config/avr/ Document new %t and %T asm output codes.
(define_c_enum "unspec"): Add UNSPEC_MAP_BITS.
(adjust_len): Add map_bits.
(map_bitsqi, map_bitshi): New insns.
* config/avr/avr-protos.h (avr_out_map_bits): New.
* config/avr/avr-protos.c (print_operand): Implement %t and %T.
(adjust_insn_length): Handle ADJUST_LEN_MAP_BITS.
(avr_double_int_push_digit): New function.
(avr_map, avr_revert_map, avr_swap_map, avr_id_map): New functions.
(avr_sig_map, avr_map_hamming_byte): New functions.
(avr_out_swap_bits, avr_out_revert_bits, avr_move_bits,
avr_out_map_bits): New functions.
(enum avr_builtin_id): Add AVR_BUILTIN_MAP8, AVR_BUILTIN_MAP16.
(avr_init_builtins): Populate __builtin_avr_map8, __builtin_avr_map16.
(bdesc_2arg): Add __builtin_avr_map8, __builtin_avr_map16 ...
(avr_expand_builtin): ...and expand them.
* config/avr/avr-c.c (avr_cpu_cpp_builtins): New built-in defines:
2011-11-27 Richard Sandiford <>
PR target/51278
* config/mips/mips.c (mips_rtx_costs): Handle baddu.
2011-11-27 Richard Sandiford <>
* config/mips/mips.c (mips16_unextended_reference_p): Test for BLKmode.
2011-11-27 Richard Sandiford <>
* config/mips/mips-protos.h (mips_emit_binary): Declare.
* config/mips/mips.c (mips_emit_binary): Make global.
(mips_set_mips16_mode): Turn off -mfix-r4000 in MIPS16 mode.
(mips_conditional_register_usage): Don't treat LO and HI as
register operands in MIPS16 mode.
(mips_mulsidi3_gen_fn): Use {u,}mulsidi3_{32,64}bit_mips16
for MIPS16 code.
* config/mips/ (muldiv_target_operand): New predicate.
(move_operand): Allow hilo_operand.
* config/mips/ (mul<mode>3): Explicitly specify LO as the
target of MIPS16 multiplies, then move it into the target register.
(mul<mode>3_internal, *macc2, *msac2): Use muldiv_target_operand.
(<u>mulsidi3_32bit_mips16): New expander.
(<u>mulsidi3_32bit): Use muldiv_target_operand.
(<u>mulsidi3_32bit_r4000): Disable for ISA_HAS_DSP.
(<u>mulsidi3_64bit): Require !TARGET_MIPS16. Split into
(<u>mulsidi3_64bit_mips16): New expander.
(<u>mulsidi3_64bit_split): Likewise, using expansions from
two previous define_splits.
(<u>mulsidi3_64bit_hilo, *muls<u>_di, <u>msubsidi4): Use
(<su>mulsi3_highpart): Use <su>mulsi3_highpart_split for MIPS16 code.
(<su>mulsi3_highpart_internal): Require !TARGET_MIPS16.
Split into <su>mulsi3_highpart_split.
(<su>mulsi3_highpart_split): New expander.
(<su>muldi3_highpart): Turn into a define_expand.
Use <su>muldi3_highpart_split for MIPS16 code.
(<su>muldi3_highpart_internal): Renamed from <su>muldi3_highpart.
Require !TARGET_MIPS16. Split into <su>muldi3_highpart_split.
(<su>muldi3_highpart_split): New expander.
(<u>mulditi3): Explicitly specify LO as the target of MIPS16
multiplies, then move it into the target register.
(<u>mulditi3_internal, <u>maddsidi4): Use muldiv_target_operand.
(divmod<mode>4, udivmod<mode>4): Turn into define_expands.
Use <u>divmod<mode>4_split for MIPS16 code, then explicitly
move LO into operand 0.
(divmod<mode>4_internal, udivmod<mode>4_internal): Renamed
from <u>divmod<mode>4. Use muldiv_target_operand.
Require !TARGET_MIPS16. Split into <u>divmod<mode>4_split.
(<u>divmod<mode>4_split): New expander.
(<u>divmod<GPR:mode>4_hilo_<HILO:mode>): Use muldiv_target_operand.
(mfhi<GPR:mode>_<HILO:mode>): Use hilo_operand.
2011-11-27 Richard Sandiford <>
* hard-reg-set.h (target_hard_regs): Add x_accessible_reg_set
and x_operand_reg_set.
(accessible_reg_set, operand_reg_set): New macros.
* reginfo.c (init_reg_sets): Initialize accessible_reg_set and
(saved_accessible_reg_set, saved_operand_reg_set): New variables.
(save_register_info): Save them.
(restore_register_info): Restore them.
(init_reg_sets_1): Limit operand_reg_set to accessible_reg_set.
Remove NO_REGS registers from operand_reg_set. Treat members
of operand_reg_set as fixed.
* recog.c (general_operand): Check operand_reg_set rather than NO_REGS.
(register_operand, nonmemory_operand): Likewise.
* varasm.c (make_decl_rtl): Always use DECL_MODE as the mode of
register variables. Check accessible_reg_set and operand_reg_set.
* config/mips/mips.c (mips_conditional_register_usage): Remove
inaccessible register from accessible_reg_set, rather than just
making them fixed.
2011-11-27 Gerald Pfeifer <>
* config/pa/pa-linux.h (TARGET_GAS): Remove comment.
2011-11-26 Richard Henderson <>
* config/arm/arm.c (arm_init_libfuncs): Call init_sync_libfuncs
for Linux.
2011-11-26 Richard Henderson <>
* optabs.c (expand_atomic_fetch_op): Always return result.
* optabs.c (init_sync_libfuncs_1): Include max in iteration.
* omp-low.c (expand_omp_atomic): Assume anything aligned to
2011-11-26 Richard Henderson <>
* config/m68k/ (UNSPECV_CAS_1, UNSPECV_CAS_2): New.
(I): New mode iterator.
(xz): New mode attribute.
* config/m68k/ New file.
* config/m68k/linux.h (TARGET_INIT_LIBFUNCS): New.
* config/m68k/m68k.c (m68k_init_sync_libfuncs): New.
2011-11-26 Nathan Sidwell <>
PR gcov-profile/51297
* gcov.c (main): Allocate initial names and sources arrays.
(find_source): Don't check for null name or source arrays here.
2011-11-26 Jakub Jelinek <>
PR rtl-optimization/49912
* cfgrtl.c (rtl_verify_flow_info_1): Ignore also EDGE_PRESERVE bit
when counting n_branch.
2011-11-26 Uros Bizjak <>
* config/i386/ (movdi_via_fpu): Add %Z insn suffixes.
2011-11-26 Joern Rennecke <>
PR middle-end/50074
* calls.c (mem_overlaps_already_clobbered_arg_p):
Return false if no outgoing arguments have been stored so far.
2011-11-25 Georg-Johann Lay <>
* config/avr/avr.c (print_operand): Support code = 'i' for CONST_INT.
2011-11-24 Andrew MacLeod <>
PR other/51011
* tree.h (is_builtin_name): No longer external.
* builtins.c (is_builtin_name): Make static.
* varasm.c (incorporeal_function_p): __sync and __atomic external calls
are not incorporeal and may need asm label processing.
2011-11-25 Georg-Johann Lay <>
PR target/50566
* config/avr/avr-protos.h (avr_log_t): Add field .builtin.
* config/avr/avr-log.c (avr_log_set_avr_log): Initialize it.
Don't bypass TARGET_ALL_DEBUG. Print self-info with ?.
(avr_log_vadump): Support %D and %X to print double_int.
(avr_double_int_pop_digit): New static function.
(avr_dump_double_int_hex): New static function.
2011-11-24 Enkovich Ilya <>
PR target/51287
* config/i386/i386.c (distance_non_agu_define_in_bb): Fix insn
attr check.
2011-11-24 Andrew MacLeod <>
* optab.c (maybe_emit_atomic_exchange): New. Try to emit an
atomic_exchange pattern.
(maybe_emit_sync_lock_test_and_set): New. Try to emit an exchange
using __sync_lock_test_and_set.
(maybe_emit_compare_and_swap_exchange_loop): New. Try to emit an
exchange using a compare_and_swap loop.
(expand_sync_lock_test_and_set): New. Expand sync_lock_test_and_set.
(expand_atomic_test_and_set): New. Expand test_and_set operation.
(expand_atomic_exchange): Use new maybe_emit_* functions.
(expand_atomic_store): Use new maybe_emit_* functions.
* builtins.c (expand_builtin_sync_lock_test_and_set): Call
expand_sync_lock_test_and_set routine.
(expand_builtin_atomic_exchange): Remove parameter from call.
(expand_builtin_atomic_clear): Use atomic_clear pattern if present.
(expand_builtin_atomic_test_and_set): Add target and simply call
(expand_builtin): Add target to expand_builtin_atomic_test_and_set.
* expr.h (expand_atomic_exchange): Add parameter.
(expand_sync_lock_test_and_set): New prototype.
(expand_atomic_test_and_set, expand_atomic_clear): New prototypes.
2011-11-24 H.J. Lu <>
PR target/51134
* config/i386/i386.h (processor_costs): Revert revision 181357.
* config/i386/i386.c (cost models): Likewise.
(core_cost): Likewise.
(promote_duplicated_reg): Likewise.
(promote_duplicated_reg_to_size): Likewise.
(processor_target): Likewise.
(expand_set_or_movmem_via_loop_with_iter): Likewise.
(expand_set_or_movmem_via_loop): Likewise.
(emit_strset): Likewise.
(expand_movmem_epilogue): Likewise.
(expand_setmem_epilogue): Likewise.
(expand_movmem_prologue): Likewise.
(expand_setmem_prologue): Likewise.
(expand_constant_movmem_prologue): Likewise.
(expand_constant_setmem_prologue): Likewise.
(decide_alg): Likewise.
(decide_alignment): Likewise.
(ix86_expand_movmem): Likewise.
(ix86_expand_setmem): Likewise.
(ix86_slow_unaligned_access): Likewise.
* config/i386/ (strset): Likewise.
* config/i386/ (vec_dupv4si): Likewise.
(vec_dupv2di): Likewise.
2011-11-24 Georg-Johann Lay <>
* config/avr/ (*rotlhi2.15): Set length to 4.
2011-11-24 Razya Ladelsky <>
* tree-data-ref.c (initialize_data_dependence_relation): Update
comment for the self dependence case.
(compute_self_dependence): Remove.
* tree-vect-data-refs.c (vect_analyze_data_refs): Remove call to
2011-11-24 Alan Modra <>
* c-decl.c (warn_if_shadowing): Don't warn if shadowed
identifier is from system header.
2011-11-23 Jakub Jelinek <>
PR target/51261
* config/i386/i386.c (decide_alg): Initialize *dynamic_check
even if !optimize.
2011-11-23 Vladimir Makarov <>
PR rtl-optimization/48455
* doc/invoke.texi (-fira-region): Document default values.
* flags-types.h (enum ira_region): Add new value
* common.opt (fira-region): Set up initial value to
* toplev.c (process_options): Set up flag_ira_region depending on
-O options.
* ira.c (ira.c): Remove optimize guard for ira_build.
2011-11-23 Chung-Lin Tang <>
PR rtl-optimization/50496
* jump.c (redirect_jump): Assert fail on nlabel == NULL_RTX
only after epilogue is created. Add comments.
2011-11-22 Richard Henderson <>
* config/ia64/ia64.c (ia64_expand_atomic_op): Add model parameter.
Generate the barrier required for the memory model.
(rtx_needs_barrier): Handle UNSPEC_FETCHADD_REL, UNSPEC_CMPXCHG_REL.
* config/ia64/ia64-protos.h: Update.
* config/ia64/ (UNSPEC_FETCHADD_REL): New.
* config/ia64/ (mem_thread_fence): New.
(atomic_load<IMODE>, atomic_store<IMODE>): New.
(atomic_compare_and_swap<IMODE>): New.
(cmpxchg_acq_<I124MODE>, cmpxchg_acq_di): New.
(atomic_exchange<IMODE>): New.
(xchg_acq_<IMODE>): Rename from sync_lock_test_and_set<IMODE>.
(atomic_<FETCHOP><IMODE>, atomic_nand<IMODE>): New.
(atomic_fetch_<FETCHOP><IMODE>, atomic_fetch_nand<IMODE>): New.
(atomic_<FETCHOP>_fetch<IMODE>, atomic_nand_fetch<IMODE>): New.
(fetchadd_rel_<I48MODE>): New.
(sync_<FETCHOP><IMODE>, sync_nand<IMODE>): Remove.
(sync_old_<FETCHOP><IMODE>, sync_old_nand<IMODE>): Remove.
(sync_new_<FETCHOP><IMODE>, sync_new_nand<IMODE>): Remove.
(sync_compare_and_swap<IMODE>): Remove.
(sync_lock_release<IMODE>): Remove.
* config/ia64/ Use define_c_enum for UNSPEC_*
and UNSPECV_* constants.
2011-11-22 Tom de Vries <>
PR rtl-optimization/50764
* sched-deps.c (sched_analyze_insn): Make sure frame-related insns are
not moved past preceding jump.
2011-11-22 Jeff Law <>
* doc/contrib.texi: Add entry for David Binderman.
2011-11-22 Andreas Krebbel <>
* postreload.c (reload_combine): Mark reg_state as invalid at
volatile insns if there has been a use already.
2011-11-21 Aldy Hernandez <>
* opts.c (finish_options): Do not fail for -fgnu-tm.
* gimple-streamer-out.c (output_gimple_stmt): Handle
* gimple-streamer-in.c (input_gimple_stmt): Same.
* lto-cgraph.c (input_overwrite_node): Read tm_clone bit.
(lto_output_node): Write tm_clone bit.
2011-11-22 Ian Lance Taylor <>
* doc/install.texi (Configuration): Correct doc of
--enable-build-poststage1-with-cxx: it is not experimental.
2011-11-22 Jakub Jelinek <>
PR tree-optimization/51074
* fold-const.c (fold_binary_loc): Fix up VEC_INTERLEAVE_*_EXPR
handling for BYTES_BIG_ENDIAN.
* optabs.c (can_vec_perm_for_code_p): Likewise.
2011-11-22 Michael Matz <>
PR other/51125
* trans-mem.c (expand_block_tm): Ignore clobbers.
2011-11-22 Iain Sandoe <>
* config/darwin.h (ENDFILE_SPEC): New.
(DARWIN_CRT1_SPEC): Add crttms.o.
(STARTFILE_SPEC): Likewise for dynamic libs and bundles.
* config/i386.h (ENDFILE_SPEC): Amend to include crttme.o.
2011-11-22 Michael Matz <>
PR c++/51264
* tree.c (iterative_hash_expr): Remove break after return.
2011-11-22 Iain Sandoe <>
* target.def (tm_clone_table_section): New hook.
* doc/tm.texi: Regenerate.
* varasm.c (dump_tm_clone_pairs): Use target tm_clone_table_section.
* output.h (default_clone_table_section): New prototype.
* config/darwin.h (TARGET_ASM_TM_CLONE_TABLE_SECTION): New.
* config/darwin-protos.h (darwin_tm_clone_table_section): New prototype.
* config/darwin.c (darwin_tm_clone_table_section): New.
2011-11-21 Torvald Riegel <>
* trans-mem.c (diagnose_tm_1): Print an expression instead of a
declaration in error messages for indirect calls.
2011-11-21 David S. Miller <>
* config/sparc/sparc.c (sparc_regmode_natural_size): New function
implementing REGMODE_NATURAL_SIZE taking into consideration vector
(sparc_modes_tieable_p): Similarly for MODES_TIEABLE_P.
* config/sparc/sparc-protos.h (sparc_regmode_natural_size,
sparc_modes_tieable_p): Declare.
* gcc/config/sparc/sparc.h (REGMODE_NATURAL_SIZE,
MODES_TIEABLE_P): Use new helper functions.
2011-11-16 Andreas Krebbel <>
PR middle-end/50325
* expmed.c (store_bit_field_1): Use extract_bit_field on big
endian targets if the source cannot be exactly covered by word
mode chunks.
2011-11-21 Jakub Jelinek <>
PR debug/50827
* var-tracking.c (loc_cmp): For ENTRY_VALUEs use ENTRY_VALUE_EXP
macro instead of XEXP.
2011-11-21 Andreas Tobler <>
* configure: Regenerate.
2011-11-21 Georg-Johann Lay <>
* config/avr/avr.c (output_reload_in_const): Loading a byte with 0
must not affect cc0.
* config/avr/ (*movhi, *movpsi, *movsi, *movsf): Zero to any
register does not change cc0. Same for any constant to ld-register.
2011-11-21 Uros Bizjak <>
* config/i386/ (unspec) <UNSPEC_MOVNTQ, UNSPEC_PFRCP,
Move from config/i386/
* config/i386/ (unspec) <UNSPEC_MOVNT,UNSPEC_MOVU, UNSPEC_LDDQU,
* config/i386/ (unspec) <UNSPEC_LFENCE, UNSPEC_SFENCE,
(sse2_lfence): Move from config/i386/
(*sse2_lfence): Ditto.
(sse_sfence): Ditto.
(*sse_sfence): Ditto.
(sse2_mfence): Ditto.
(mfence_sse2): Ditto. Rename from *sse2_mfence. Enable also
(mem_thread_fence): Use mfence_sse2.
2011-11-21 Georg-Johann Lay <>
* config/avr/avr.h (struct base_arch_s): Add field sfr_offset.
* config/avr/avr-devices.c: Ditto. And initialize it.
* config/avr/avr-c.c (avr_cpu_cpp_builtins): New built-in define
* config/avr/avr-protos.h (out_movqi_r_mr, out_movqi_mr_r): Remove.
(out_movhi_r_mr, out_movhi_mr_r): Remove.
(out_movsi_r_mr, out_movsi_mr_r): Remove.
* config/avr/ (*cbi, *sbi): Use %i instead of %m-0x20.
(*, * Ditto.
* config/avr/avr.c (out_movsi_r_mr, out_movsi_mr_r): Make static.
(print_operand): Implement "%i" to print address as I/O address.
(output_movqi): Clean up call of out_movqi_mr_r.
(output_movhi): Clean up call of out_movhi_mr_r.
(avr_file_start): Use avr_current_arch->sfr_offset instead of
magic -0x20. Use TMP_REGNO, ZERO_REGNO instead of 0, 1.
(avr_out_sbxx_branch): Use %i instead of %m-0x20.
(out_movqi_r_mr, out_movqi_mr_r): Ditto. And make static.
(out_movhi_r_mr, out_movhi_mr_r): Ditto. And use avr_asm_len.
(out_shift_with_cnt): Clean up code: Use avr_asm_len.
(output_movsisf): Use output_reload_insisf for all CONSTANT_P sources.
(avr_out_movpsi): USE avr_out_reload_inpsi for all CONSTANT_P sources.
Clean up call of avr_out_store_psi.
(output_reload_in_const): Don't cut symbols longer than 2 bytes.
(output_reload_insisf): Filter CONST_INT_P or CONST_DOUBLE_P to
try if setting pre-cleared register is advantageous.
(avr_out_plus_1): Use gen_int_mode instead of GEN_INT.
2011-11-20 Joey Ye <>
* expr.c (expand_expr_real_1): Correctly handle strict volatile
bitfield loads smaller than mode size.
2011-11-20 Richard Henderson <>
* config/mips/mips.c (mips_init_libfuncs): Call init_sync_libfuncs.
2011-11-20 Uros Bizjak <>
PR target/51235
* config/i386/i386.c (ix86_expand_vcond): Generate TARGET_XOP
patterns for supported mode only.
PR target/51236
* config/i386/i386.c (ix86_expand_builtin)
<IX86_BUILTIN_GATHERALTSIV4DI>: Use CODE_FOR_avx2_gathersiv4di.
2011-11-20 Uros Bizjak <>
* config/i386/ (UNSPEC_MOVNTI): Remove.
(UNSPEC_MOVNTQ): New unspec.
* config/i386/ (sse_movntq): Rename from sse_movntdi.
* config/i386/ (sse2_movnti<mode>): Use UNSPEC_MOVNT instead of
(STORENT_MODE): Add DI and V4DI modes.
2011-11-20 Nathan Sidwell <>
PR gcov-profile/51113
* coverage.c (build_var): Propagate visibility for public
decls. Use make_decl_one_only for PIC correctness.
* gcc.misc-tests/gcov-13.c: Check gcovpart-13b coverage
* gcc.misc-tests/gcov-16.c: New.
* gcc.misc-tests/gcov-17.c: New.
* g++.dg/gcov/gcov-8.C: New.
* g++.dg/gcov/gcov-9.C: New.
* g++.dg/gcov/gcov-10.C: New.
2011-11-19 Eric Botcazou <>
PR rtl-optimization/51187
* reorg.c (relax_delay_slots): Do not consider a jump useless if there
is a barrier between the jump and its target label.
2011-11-19 Patrick Marlier <>
PR middle-end/51211
* tracer.c (ignore_bb_p): Don't copy GIMPLE_TRANSACTION.
2011-11-19 Eric Botcazou <>
* expmed.c (store_bit_field_1): Revert bogus formatting change.
2011-11-19 Richard Earnshaw <>
PR target/50493
* config/arm/arm.c (neon_disambiguate_copy): Correctly handle partial
overlap of src and dest operands.
2011-11-19 Iain Sandoe <>
* config/darwin.h (ASM_DEBUG_SPEC): New.
* config/darwin9.h (ASM_DEBUG_SPEC): New.
2011-11-18 Jan Hubicka <>
* config/i386/i386.c (atom_cost): Disable SSE loop until alignment
issues are fixed.
2011-11-18 Anatoly Sokolov <>
* config/cris/cris.c (cris_function_value_regno_p): Make static.
* config/cris/cris.h (FUNCTION_VALUE_REGNO_P): Remove.
* config/cris/cris-protos.h (cris_function_value_regno_p): Remove.
2011-11-18 H.J. Lu <>
PR target/33944
* doc/extend.texi: Document __builtin_ia32_movnti64.
* config/i386/emmintrin.h (_mm_stream_si64): New.
* config/i386/i386-builtin-types.def: Add VOID_FTYPE_PLONGLONG_LONGLONG.
* config/i386/i386.c (ix86_builtins): Add IX86_BUILTIN_MOVNTI64.
(bdesc_special_args): Update __builtin_ia32_movnti. Add
(ix86_expand_special_args_builtin): Handle
* config/i386/ (UNSPEC_MOVNTI): New.
* config/i386/ (sse2_movntsi): Renamed to ...
(sse2_movnti<mode>): This.
2011-11-18 Georg-Johann Lay <>
PR target/49868
* config/avr/avr.h (base_arch_s): Add field n_segments.
(INIT_EXPANDERS): New define.
* config/avr/avr-protos.h (avr_mem_pgmx_p): New.
(avr_init_expanders): New.
(avr_emit_movmemhi, avr_out_movmem): New.
(avr_xload_libgcc_p): New.
* config/avr/avr-c.c (avr_register_target_pragmas): Register
address spaces __pgm1, __pgm2, __pgm3, __pgm4 __pgm5, __pgmx.
(avr_cpu_cpp_builtins): Add built-in defines __PGM1,
__PGM2, __PGM3, __PGM4, __PGM5, __PGMX.
* config/avr/avr-devices.c (avr_arch_types): Set field n_segments.
* config/avr/avr.c (AVR_SECTION_PROGMEM): Change define to cover
3 bits instead of just 1.
(xstring_empty, xstring_e, rampz_rtx): New static GTYed variables.
(progmem_section): Change from section to array of sections.
(progmem_section_prefix): New static variable.
(avr_file_start): Print set for __RAMPZ__
(avr_option_override): Move initialization of RTXes from here...
(avr_init_expanders): this new function.
(avr_pgm_segment): New static function.
(avr_decl_pgm_p): Handle error_mark_node.
(avr_mem_pgmx_p, avr_decl_pgmx_p): New static functions.
(avr_out_xload, avr_find_unused_d_reg): New static functions.
(expand_prologue, expand_epilogue): Use rampz_rtx.
(print_operand): Hande CONST_STRING.
(avr_xload_libgcc_p): New static function.
(avr_out_lpm_no_lpmx, avr_out_lpm): Handle ELPM.
(avr_progmem_p): Return 2 for 24-bit flash address space.
(avr_out_sbxx_branch): Clean-up code from ASn macros.
(out_movqi_r_mr, out_movqi_mr_r): Ditto. And recognize RAMPZ's
address and print symbolically.
(avr_asm_named_section, avr_section_type_flags,
avr_encode_section_info, avr_asm_select_section,
avr_addr_space_address_mode, avr_addr_space_pointer_mode,
avr_addr_space_legitimate_address_p, avr_addr_space_convert,
avr_addr_space_legitimize_address): Handle new address spaces.
(avr_output_progmem_section_asm_op): New static function.
(avr_asm_init_sections): Initialize progmem_section[].
(adjust_insn_length): Handle ADJUST_LEN_XLOAD, ADJUST_LEN_MOVMEM.
(avr_const_address_lo16): New static function.
(avr_assemble_integer): Use it to handle 3-byte integers.
(avr_emit_movmemhi, avr_out_movmem): New functions.
* config/avr/ (nox_general_operand): Handle new
address spaces.
* config/avr/ (unspec): Add UNSPEC_MOVMEM.
(adjust_len): Add xload, movmem.
(SP_ADDR): New define_constants.
(isa): Add "lpm", "lpmx", "elpm", "elpmx".
(enabled): Handle them.
(load<mode>_libgcc): New expander.
(*load.<mode>.libgcc): Rename to load_<mode>_libgcc.
(xload8_A, xload<mode>_A): New insn-and-splits.
(xload_8, xload_<mode>_libgcc, xload_<mode>, loadmem_elpm): New insns.
(mov<mode>): Handle new address spaces.
(movmemhi): Rewrite using avr_emit_movmemhi.
(MOVMEM_r_d): New mode attribute.
(movmem_<mode>, movmem_qi_elpm): New insns.
(setmemhi, *clrmemqi, *clrmemhi, strlenhi, *strlenhi): Unquote
C-code. Use label instead of hard-coded instrunction lengths.
2011-11-18 Martin Jambor <>
PR tree-optimization/50605
* gimple.c (is_gimple_ip_invariant_address): Also handle MEM_REFs
of IPA invariant decls.
2011-11-18 Bill Schmidt <>
* tree-outof-ssa.c (insert_back_edge_copies): Add call to
2011-11-18 Iain Sandoe <>
PR target/49992
* Remove ranlib special-casing for Darwin.
* configure: Regenerate.
2011-11-18 Uros Bizjak <>
PR tree-optimization/51118
* fold-const.c (fold_checksum_tree): Check for TS_TYPED structure
before using TREE_TYPE accessor on expr.
2011-11-17 Jan Hubicka <>
PR bootstrap/51134
* i386.c (atom_cost): Fix 32bit memset description.
(expand_set_or_movmem_via_loop_with_iter): Output proper bounds check
for epilogue loops.
(expand_movmem_epilogue): Handle epilogues up to size 15 w/o producing
byte loop.
(decide_alg): sse_loop is not useable wthen SSE2 is disabled;
when not optimizing always use rep movsb or lincall; do not produce
word sized loops when optimizing memset for size (to avoid need
for large constants).
(ix86_expand_movmem): Get into sync with ix86_expand_setmem;
choose unroll factors better; always do 128bit moves when producing
SSE loops; do not produce loopy epilogue when size is too small.
(promote_duplicated_reg_to_size): Do not look into desired alignments
when doing vector expansion.
(ix86_expand_setmem): Track better when promoted value is available;
choose unroll factors more sanely. Output loopy epilogue only
when needed.
2011-11-17 Steve Ellcey <>
PR middle-end/51144
* output.h (fprint_w): Remove.
* final.c (fprint_w): Remove.
(output_addr_const): Change fprint_w back to fprintf.
2011-11-17 Andrew Pinski <>
* config/host-linux.c (TRY_EMPTY_VM_SPACE): Define for MIPS.
2011-11-17 Andrew MacLeod <>
* builtins.c (expand_builtin): Remove 4th parameter representing
weak/strong mode when __atomic_compare_exchange becomes a library call.
2011-11-17 Richard Henderson <>
* config/rs6000/rs6000.c (rs6000_expand_atomic_compare_and_swap): Get
new pseudo for target after convert_modes.
(rs6000_expand_atomic_exchange, rs6000_expand_atomic_op): Likewise.
2011-11-17 Richard Henderson <>
* config/rs6000/rs6000.c (rs6000_expand_atomic_compare_and_swap): Get
new pseudo for target after convert_modes.
(rs6000_expand_atomic_exchange, rs6000_expand_atomic_op): Likewise.
2011-11-17 Richard Henderson <>
* builtins.c (expand_builtin_mem_thread_fence): Remove.
(expand_builtin_mem_signal_fence): Remove.
(expand_builtin_atomic_thread_fence): Use expand_mem_thread_fence.
(expand_builtin_sync_synchronize): Likewise.
(expand_builtin_atomic_signal_fence): Use expand_mem_signal_fence.
* optabs.c (expand_asm_memory_barrier): Split out from
(expand_mem_thread_fence): New, a combination of code from
expand_builtin_mem_thread_fence and expand_builtin_sync_synchronize.
(expand_mem_signal_fence): Moved and renamed from
(expand_atomic_exchange): Use expand_mem_thread_fence.
(expand_atomic_load, expand_atomic_store): Likewise.
* expr.h, optabs.h: Update decls.
2011-11-17 Bin Cheng <>
PR rtl-optimization/50663
* cprop.c (implicit_set_indexes): New global variable.
(insert_set_in_table): Add additional parameter and record implicit
set information.
(hash_scan_set): Add additional parameter and pass it to above.
(hash_scan_insn): Pass false to hash_scan_set.
(compute_hash_table_work): Pass true to hash_scan_set.
(compute_cprop_data): Add implicit set to AVIN of block which the
implicit set is recorded for.
(one_cprop_pass): Handle implicit_set_indexes array.
2011-11-17 Michael Matz <>
PR middle-end/50644
PR middle-end/50741
* tree-ssa-live.c (mark_all_vars_used_1): Recurse only for decls of
current function.
(remove_unused_locals): Ditto.
2011-11-16 Richard Henderson <>
* config/alpha/alpha.c (alpha_split_compare_and_swap_12): Copy
ALIAS_SET_MEMORY_BARRIER when creating a new memory.
(alpha_split_atomic_exchange_12): Likewise.
* config/rs6000/rs6000.c (rs6000_adjust_atomic_subword): Likewise.
2011-11-16 Joseph Myers <>
* config/i386/i386elf.h (PREFERRED_DEBUGGING_TYPE): Remove.
2011-11-16 David Edelsohn <>
* config/rs6000/rs6000.c (rs6000_xcoff_section_type_flags):
Default to minimum alignment if decl is NULL.
2011-11-16 Uros Bizjak <>
* config/i386/ (round<mode>2_vec_pack_sfix): Optimize V2DFmode
sequence for AVX.
(<sse4_1>_round<ssemodesuffix>_vec_pack_sfix<avxsizesuffix>): Ditto.
2011-11-16 Venkataramanan Kumar <>
* doc/invoke.texi: Document AMD bdver1 and btver1.
2011-11-16 Richard Earnshaw <>
Bernd Schmidt <>
Sebastian Huber <>
PR target/49641
* config/arm/arm.c (store_multiple_sequence): Avoid cases where
the base reg is stored iff compiling for Thumb1.
2011-11-16 Razya Ladelsky <>
PR tree-optimization/49960
* tree-data-ref.c (initialize_data_dependence_relation): Add
Remove call to compute_self_dependence.
(compute_affine_dependence): Remove the !DDR_SELF_REFERENCE condition.
(compute_self_dependence): Remove old code. Add call to
(compute_all_dependences): Remove call to compute_self_dependence.
Add call to compute_affine_dependence.
2011-11-16 Andreas Krebbel <>
PR middle-end/50325
* expmed.c (store_bit_field_1): Use extract_bit_field on big
endian targets if the source cannot be exactly covered by word
mode chunks.
2011-11-15 Joseph Myers <>
* config/i386/i386elf.h (ASM_OUTPUT_ASCII): Change STRING_LIMIT to
2011-11-15 Richard Henderson <>
* config/alpha/alpha.c (alpha_pre_atomic_barrier): New.
(alpha_post_atomic_barrier): New.
(alpha_split_atomic_op): New memmodel argument; honor it.
(alpha_split_compare_and_swap): Take array of operands. Honor
memmodel; always set bool output
(alpha_expand_compare_and_swap_12): Similarly.
(alpha_split_compare_and_swap_12): Similarly.
(alpha_split_atomic_exchange): Similarly. Rename from
(alpha_expand_atomic_exchange_12): Similarly. Rename from
(alpha_split_atomic_exchange_12): Similarly. Rename from
* config/alpha/alpha-protos.h: Update.
* config/alpha/ (UNSPECV_CMPXCHG): New.
* config/alpha/ ("w"): New.
* config/alpha/ (mem_noofs_operand): New.
* config/alpha/ (atomic_compare_and_swap<mode>): Rename from
sync_compare_and_swap<mode>; add the new parameters.
(atomic_exchange<mode>): Update from sync_test_and_set<mode>.
(atomic_fetch_<op><mode>): Update from sync_old_<op><mode>.
(atomic_<op>_fetch<mode>): Update from sync_new_<op><mode>.
(atomic_<op><mode>): Update from sync_<op><mode>.
2011-11-16 Tom de Vries <>
* tree-ssa-tail-merge.c (replace_block_by): Add frequency of bb2 to bb1.
2011-11-16 Alan Modra <>
PR rtl-optimization/51051
PR bootstrap/51086
* function.c (thread_prologue_and_epilogue_insns): Guard
emitting return with single_succ_p test.
2011-11-15 Joern Rennecke <>
* config/epiphany/ (mov<mode>cc): Fix code to
get mode from CMP_OP1 if CMP_OP0 is VOIDmode.
2011-11-15 Uros Bizjak <>
* config/i386/ (vec_pack_trunc_v2df): Optimize sequence for AVX.
(vec_pack_sfix_trunc_v2df): Ditto.
(vec_pack_sfix_v2df): Ditto.
(vec_pack_sfix_trunc_v4df): Generate fix_truncv4dfv4si2 and
avx_vec_concatv8si patterns.
(vec_pack_sfix_v4df): Generate avx_cvtpd2dq256 and
avx_vec_concatv8si patterns.
2011-11-15 Torvald Riegel <>
* c-parser.c (c_parser_transaction_expression): Require parentheses
when parsing transaction expressions.
2011-11-15 Tristan Gingold <>
* incpath.c (get_added_cpp_dirs): New function.
* incpath.h (get_added_cpp_dirs): Declare.
* config/vms/vms-c.c (vms_c_register_includes): New function.
(vms_std_modules): New variable.
* config/vms/vms.h (TARGET_EXTRA_INCLUDES): Define.
(vms_c_register_includes): Declare.
2011-11-15 Tristan Gingold <>
* c-family/c-pragma.h (pragma_extern_prefix): Declare.
* c-family/c-pragma.c (pragma_extern_prefix): Make it public.
* config/vms/vms-c.c (saved_extern_prefix): New variable.
(vms_pragma_extern_prefix): New function.
(vms_c_register_pragma): Register vms_pragma_extern_prefix.
2011-11-15 Georg-Johann Lay <>
PR target/49868
* config/avr/avr.h (ADDR_SPACE_PGM): New address spaces.
* config/avr/avr-protos.h (avr_mem_pgm_p): New.
(avr_load_libgcc_p): New.
(avr_register_target_pragmas): New.
(asm_output_external_libcall): Remove.
(avr_log_t): Add field "progmem". Order alphabetically.
* config/avr/avr-log.c (avr_log_set_avr_log): Set avr_log.progmem.
* config/avr/avr-c.c (langhooks.h): New include.
(avr_register_target_pragmas): New function. Register address
space __pgm.
(avr_cpu_cpp_builtins): Add built-in define __PGM.
* config/avr/avr.c: Include "c-family/c-common.h".
(avr_addr_space_subset_p): ...this new static function.
(avr_addr_space_convert): ...this new static function.
(avr_addr_space_address_mode): ...this new static function.
(avr_addr_space_pointer_mode): ...this new static function.
(avr_addr_space_legitimate_address_p): ...this new static function.
(avr_addr_space_legitimize_address): ...this new static function.
(avr_mode_code_base_reg_class): Handle address spaces.
(avr_regno_mode_code_ok_for_base_p): Ditto.
(lpm_addr_reg_rtx, lpm_reg_rtx, all_regs_rtx): New static variables.
(avr_option_override): Initialize them.
(output_reload_in_const): Use all_regs_rtx. Fix signedness of loop
(avr_pgm_segment): New static function.
(avr_decl_pgm_p, avr_mem_pgm_p): New static functions.
(avr_out_lpm, avr_out_lpm_no_lpmx): New static functions.
(output_movqi, output_movhi, output_movsisf, avr_out_movpsi): Call
avr_out_lpm to handle loads from progmem.
(avr_load_libgcc_p): New static function.
(avr_progmem_p): Test if decl is in flash.
(avr_pgm_pointer_const_p): New static function.
(avr_nonconst_pointer_addrspace): New static function.
(avr_pgm_check_var_decl): New static function.
(avr_insert_attributes): Use it. Change error message to report
cause (progmem or address space) when code wants to write to flash.
(avr_section_type_flags): Unset section flag SECTION_BSS for
data in progmem.
* config/avr/ (nop_general_operand): New predicate.
(nox_general_operand): New predicate.
* config/avr/ (LPM_REGNO): New define_constant.
(load<mode>_libgcc): New expander.
(*load.<mode>.libgcc): New insn.
(mov<mode>): Handle loads from non-generic AS.
(movmemhi): Ditto. Propagate address space information to newly
created MEM.
(movqi_insn, *movhi, *movpsi, *movsi, *movsf): Change predicate #1
to nox_general_operand.
(ashrqi3, ashrhi3, ashrsi3): Change predicate #1 to
(ashlqi3, *ashlqi3, ashlhi3, ashlsi3): Ditto.
(lshrqi3, *lshrqi3, lshrhi3, lshrsi3): Ditto.
(split-lpmx): New split.
(*ashlhi3_const, *ashlsi3_const, *ashrhi3_const, *ashrsi3_const,
*lshrhi3_const, *lshrsi3_const): Indent, unquote C.
2011-11-15 Maxim Kuvyrkov <>
* ipa-cp.c (ipa_value_from_jfunc): Make global.
(ipa_cst_from_jfunc): Remove, use ipa_value_from_jfunc instead.
(get_indirect_edge_target): Rename, make global.
(devirtualization_time_bonus, estimate_local_effects,)
(ipcp_discover_new_direct_edges): Update.
* ipa-inline-analysis.c (evaluate_conditions_for_edge):
Generalize to also handle types. Rename to ...
(evaluate_properties_for_edge): Use instead of
(estimate_edge_devirt_benefit): New function.
(estimate_calls_size_and_time): Use it.
(estimate_node_size_and_time, estimate_ipcp_clone_size_and_time,)
(inline_merge_summary): Update.
(do_estimate_edge_time, do_estimate_edge_growth): Update. Calculate
parameter information at the call site and pass it on to subroutines.
* tree-inline.c (estimate_num_insns): Distinguish between direct and
indirect calls.
(init_inline_once): Set size and time costs or indirect calls.
* tree-inline.h (eni_weights): Add indirect_call_cost.
2011-11-15 Tom de Vries <>
PR tree-optimization/51005
* tree-ssa-tail-merge.c (delete_basic_block_same_succ): Rename to
(update_worklist): Inline purge_bbs.
(purge_bbs, unlink_virtual_phi, update_vuses, vop_at_entry)
(delete_block_update_dominator_info): Remove.
(replace_block_by): Remove update_vops parameter. Partially evaluate
for update_vops == false.
(apply_clusters): Remove update_vops parameter. Remove update_vops
argument in replace_block_by call.
(update_debug_stmts): Remove MAY_HAVE_DEBUG_STMTS test.
(tail_merge_optimize): Remove update_vops argument to apply_clusters.
Remove call to purge_bbs. Add calls to calculate_dominance_info and
free_dominance_info. Add MAY_HAVE_DEBUG_STMTS before calling
update_debug_stmts. Mark vop var for renaming, if necessary.
2011-11-15 Bernd Schmidt <>
PR rtl-optimization/51051
* cfgrtl.c (cfg_layout_can_merge_blocks_p): Return FALSE if the
move would cause fallthrough into the exit block.
2011-11-14 Richard Henderson <>
* config/rs6000/rs6000.c (emit_load_locked): Assert the mode is
(emit_store_conditional): Likewise.
(rs6000_pre_atomic_barrier, rs6000_post_atomic_barrier): New.
(rs6000_adjust_atomic_subword): New.
(rs6000_mask_atomic_subword, rs6000_finish_atomic_subword): New.
(rs6000_expand_atomic_op): Rename from rs6000_emit_sync; rewrite
for pre-reload expansion.
(rs6000_split_compare_and_swap, rs6000_split_compare_and_swapqhi,
rs6000_expand_compare_and_swapqhi): Merge into ...
(rs6000_expand_atomic_compare_and_swap): ... here. New function.
rs6000_split_lock_test_and_set; expand immediately. Handle
QImode and HImode.
* config/rs6000/ (UNSPEC_LWSYNC): Move and rename
* config/rs6000/ (fetchopsi_constr, fetchopdi_constr): Remove.
(mem_thread_fence): New.
(hwsync): Rename from memory_barrier.
(*hwsync): Rename from *sync_internal.
(lwsync, *lwsync): Mirror hwsync implementation.
(isync): Don't reference memory.
(loadsync): New.
(atomic_load<INT>, atomic_store<INT>): New.
(ATOMIC): New mode iterator.
(load_locked<ATOMIC>): Rename from load_locked_<GPR>.
(store_conditional<ATOMIC>): Rename from store_conditional_<GPR>.
(sync_compare_and_swap<GPR>): Remove.
(sync_compare_and_swaphi, sync_compare_and_swapqi): Remove.
(sync_compare_and_swapqhi_internal): Remove.
(sync_lock_test_and_set<GPR>): Remove.
(sync_<FETCHOP><INT1>): Remove.
(*sync_<FETCHOP>si_internal, *sync_<FETCHOP>di_internal): Remove.
(sync_nand<INT1>, *sync_nand<GPR>_internal): Remove.
(sync_old_<FETCHOP><GPR>): Remove.
(*sync_old_<FETCHOP>si_internal): Remove.
(*sync_old_<FETCHOP>di_internal): Remove.
(sync_old_nand<INT1>): Remove.
(*sync_old_nand<GPR>_internal): Remove.
(sync_new_<FETCHOP><GPR>): Remove.
(*sync_new_<FETCHOP>si_internal): Remove.
(*sync_new_<FETCHOP>di_internal): Remove.
(sync_new_nand<INT1>): Remove.
(*sync_new_nand<GPR>_internal): Remove.
(*atomic_andsi, *atomic_anddi): Remove.
(*sync_addshort_internal, *sync_subshort_internal): Remove.
(*sync_andsi_internal, *sync_boolsi_internal): Remove.
(*sync_boolcshort_internal): Remove.
(sync_lock_release<INT1>): Remove.
(atomic_compare_and_swap<INT1>): New.
(atomic_exchange<INT1>): New.
(atomic_<FETCHOP><INT1>, atomic_nand<INT1>): New.
(atomic_fetch_<FETCHOP><INT1>, atomic_fetch_nand<INT1>): New.
(atomic_<FETCHOP>_fetch<INT1>, atomic_nand_fetch<INT1>): New.
2011-11-14 Uros Bizjak <>
* config/i386/ (round<mode>2): Use register_operand for
operand 1 predicate.
(round<mode>2_sfix): Ditto.
(round<mode>2_vec_pack_sfix): Ditto for operand 1 and operand 2.
2011-11-14 Nathan Sidwell <>
* gcov.c (canonicalize_name): Protect use of S_ISLNK.
2011-11-14 Jan Hubicka <>
PR target/51126
* config/i386/i386.c (core cost model): Correct pasto.
2011-11-14 Uros Bizjak <>
* config/i386/ (round<mode>2_sfix): New expander.
(round<mode>2_vec_pack_sfix): Ditto.
(<sse4_1>_round<ssemodesuffix>_sfix<avxsizesuffix>): Ditto.
(<sse4_1>_round<ssemodesuffix>_vec_pack_sfix<avxsizesuffix>): Ditto.
* config/i386/builtin-types.def (V4SI_FTYPE_V4SF_ROUND,
V8SI_FTYPE_V4DF_V4DF_ROUND): New builtin types.
* config/i386/i386.c (ix86_builtins): Add
(bdesc_args): Add __builtin_ia32_{floorpd,ceilpd}_vec_pack_sfix{,256},
__builtin_ia32_roundps_az_sfix{,256} descriptions.
(ix86_expand_sse_round_vec_pack_sfix): New.
(ix86_expand_args_builtin): Handle V4SI_FTYPE_V4SF_ROUND,
V8SI_FTYPE_V4DF_V4DF_ROUND types. Check last argument of
CODE_FOR_sse4_1_roundpd_vec_pack_sfix, CODE_FOR_sse4_1_roundps_sfix,
CODE_FOR_avx_roundpd_vec_pack_sfix256 and CODE_FOR_avx_roundps_sfix256.
(ix86_builtin_vectorized_function): Handle
2011-11-14 Jan Hubicka <>
PR middle-end/50598
* cgraph.h (varpool_externally_visible_p): Declare.
(varpool_add_new_variable): Declare.
* tree-emultls.c (get_emutls_init_templ_addr,
new_emutls_decl): Use varpool_add_new_variable.
* ipa.c (varpool_externally_visible_p): Export.
* varpool.c (varpool_add_new_variable): New function.
2011-11-14 Michael Zolotukhin <>
Jan Hubicka <>
* config/i386/i386.h (processor_costs): Add second dimension to
stringop_algs array.
* config/i386/i386.c (cost models): Initialize second dimension of
stringop_algs arrays.
(core_cost): New costs based on generic64 costs with updated stringop
(promote_duplicated_reg): Add support for vector modes, add
(promote_duplicated_reg_to_size): Likewise.
(processor_target): Set core costs for core variants.
(expand_set_or_movmem_via_loop_with_iter): New function.
(expand_set_or_movmem_via_loop): Enable reuse of the same iters in
different loops, produced by this function.
(emit_strset): New function.
(expand_movmem_epilogue): Add epilogue generation for bigger sizes,
use SSE-moves where possible.
(expand_setmem_epilogue): Likewise.
(expand_movmem_prologue): Likewise for prologue.
(expand_setmem_prologue): Likewise.
(expand_constant_movmem_prologue): Likewise.
(expand_constant_setmem_prologue): Likewise.
(decide_alg): Add new argument align_unknown. Fix algorithm of
strategy selection if TARGET_INLINE_ALL_STRINGOPS is set; Skip sse_loop
(decide_alignment): Update desired alignment according to chosen move
(ix86_expand_movmem): Change unrolled_loop strategy to use SSE-moves.
(ix86_expand_setmem): Likewise.
(ix86_slow_unaligned_access): Implementation of new hook
* config/i386/ (strset): Enable half-SSE moves.
* config/i386/ (vec_dupv4si): Add expand for vec_dupv4si.
(vec_dupv2di): Add expand for vec_dupv2di.
2011-11-14 Dimitrios Apostolou <>
PR bootstrap/51094
PR middle-end/51116
* config/elfos.h (TARGET_ASM_INTERNAL_LABEL): Remove.
* varasm.c (default_elf_internal_label): Remove.
2011-11-14 Kai Tietz <>
* gcov.c (generate_results): Add missing semicolon and correct indent.
2011-11-14 Ira Rosen <>
PR bootstrap/51112
* tree-vect-stmts.c (vectorizable_condition): Initialize comp_vectype.
2011-11-14 Mingjie Xing <>
* doc/invoke.texi (Wunused-result): Change @pxref{Variable Attributes}
to @pxref{Function Attributes}.
2011-11-13 Oleg Endo <>
PR target/50694
New macros.
(DRIVER_SELF_SPECS): Use new macros to filter out unsupported options
taking the default configuration into account.
2011-11-13 Jonathan Wakely <>
* doc/install.texi (Specific): Fix anchor for
2011-11-13 Nathan Sidwell <>
* gcov.c (source_prefix, source_length): New globals.
(flag_relative_only): Likewise.
(print_usage, options, process_args): Update.
(generate_results): Use, check
flag_relative_only. Adjust messages.
(find_source): Check source_prefix.
(output_lines): Use, adjust messages.
* doc/gcov.texi (Invoking Gcov): Document new options.
2011-11-12 Jason Merrill <>
PR c++/51060
* gimplify.c (gimplify_target_expr): Add a clobber to the cleanup.
(gimplify_modify_expr): Don't try to simplify it.
2011-11-12 Dimitrios Apostolou <>
PR bootstrap/51094
* config/elfos.h (STRING_ASM_OP): Define.
* varasm.c (default_elf_asm_output_limited_string): Use it.
PR bootstrap/51094
* gcc/ Check for stpcpy declaration.
* system.h: Declare it if not.
*, configure: Regenerate.
2011-11-12 Richard Henderson <>
* config/rs6000/ (fix_trunc<SFDF>si2_stfiwx): Use
nonimmediate_operand for the destination.
(fixuns_trunc<SFDF>si2_stfiwx): Likewise.
* builtins.c (expand_builtin_compare_and_swap): If target is const0,
don't pass the target to expand_atomic_compare_and_swap.
(expand_builtin_atomic_compare_exchange): Likewise.
* config/sh/linux.h (TARGET_INIT_LIBFUNCS): New.
* config/sh/sh.c (sh_init_sync_libfuncs): New.
* config/pa/pa-linux.h (TARGET_SYNC_LIBCALL): New.
* config/pa/pa.h (TARGET_SYNC_LIBCALL): New default.
* config/pa/pa.c (pa_init_libfuncs): Use init_sync_libfuncs.
2011-11-12 Iain Sandoe <>
PR target/45233
* config/rs6000/rs6000.c (rs6000_legitimize_reload_address):
Only expand a symbol ref. into an access when the entity is defined
in the TU.
2011-11-12 Jan Hubicka <>
PR bootstrap/50822
* cgraphunit.c (output_weakrefs): Output really only weakrefs.
2011-11-12 Nathan Sidwell <>
* gcov.c (struct name_map): New.
(names, n_names, a_names): New global vars.
(print_usage): Adjust usage.
(generate_results): Canonicalize main file name.
(release_structures): Adjust.
(name_search, name_sort): New callbacks.
(find_source): Look for and create a canonical name.
(canonicalize_name): New.
(make_gcov_file_name): Reimplement and fix mangling.
(mangle_name): New.
* doc/gcov.texi: Update documentation about path preservation.
2011-11-11 David S. Miller <>
* config/sparc/linux.h (ASM_GENERATE_INTERNAL_LABEL): Delete.
* config/sparc/linux64.h (ASM_GENERATE_INTERNAL_LABEL): Delete.
2011-11-11 Jakub Jelinek <>
* config/i386/i386-protos.h (ix86_maybe_emit_epilogue_vzeroupper):
New prototype.
* config/i386/i386.c (ix86_maybe_emit_epilogue_vzeroupper): New
(ix86_expand_epilogue): Use it.
* config/i386/ (return, simple_return): Call it in the
PR tree-optimization/51091
* tree-stdarg.c (execute_optimize_stdarg): Ignore TREE_CLOBBER_P
rhs also in the va_list_simple_ptr case.
PR tree-optimization/51058
* tree-vect-slp.c (vect_remove_slp_scalar_calls): New function.
(vect_schedule_slp): Call it.
* tree-vect-stmts.c (vectorizable_call): If slp_node != NULL,
don't replace scalar calls with setting of their lhs to zero here.
PR tree-optimization/51074
* fold-const.c (vec_cst_ctor_to_array, fold_vec_perm): New functions.
(fold_binary_loc): Handle VEC_EXTRACT_EVEN_EXPR,
(fold_ternary_loc): Handle VEC_PERM_EXPR with VECTOR_CST or
* tree-ssa-propagate.c (valid_gimple_rhs_p): Handle ternary
* tree-vect-generic.c (lower_vec_perm): Mask sel_int elements
to 0 .. 2 * elements - 1.
2011-11-11 Richard Henderson <>
* gimple-pretty-print.c (dump_gimple_omp_atomic_load): Dump needed.
(dump_gimple_omp_atomic_store): Likewise.
* optabs.c (can_atomic_exchange_p): New.
* optabs.h (can_atomic_exchange_p): Declare.
* omp-low.c (expand_omp_atomic_load): Implement.
(expand_omp_atomic_store): Likewise.
(expand_omp_atomic): Update for new arguments to load/store.
2011-11-11 Eric Botcazou <>
* cprop.c: Adjust outdated comments throughout.
(hash_scan_set): Rename PAT parameter into SET.
(cprop_pavloc): Rename into...
(cprop_avloc): ...this.
(cprop_absaltered): Rename into...
(cprop_kill): ...this.
(alloc_cprop_mem): Adjust for above renaming.
(free_cprop_mem): Likewise.
(compute_cprop_data): Likewise.
(compute_local_properties): Rename TRANSP parameter into KILL and
adjust throughout. Rework comments.
(try_replace_reg): Fix long line.
(cprop_jump): Likewise.
(constprop_register): Fix prototype and take INSN last.
(cprop_insn): Adjust calls to above function. Fix long lines.
(bypass_block): Likewise.
(one_cprop_pass): Likewise.
2011-11-11 Uros Bizjak <>
* config/alpha/elf.h (ELF_ASCII_ESCAPES): Rename from ESCAPES.
2011-11-11 Jason Merrill <>
* varasm.c (default_elf_asm_output_limited_string): #ifdef
(default_elf_asm_output_ascii): Likewise.
2011-11-11 Uros Bizjak <>
PR target/50762
* config/i386/ (j): New address constraint.
* config/i386/ (lea_address_operand): Redefine as
special predicate.
* config/i386/ (*lea_3_zext): Use "j" constraint for operand 1.
(*lea_4_zext): Ditto.
2011-11-11 David S. Miller <>
2011-11-05 David S. Miller <>
* config/sparc/ (UNSPEC_SHORT_LOAD): New unspec.
(zero-extend_v8qi_vis, zero_extend_v4hi_vis): New expanders.
*zero_extend_v4hi_<P:mode>_insn): New insns.
* config/sparc/sparc.c (vector_init_move_words,
vector_init_prepare_elts, sparc_expand_vector_init_vis2,
sparc_expand_vector_init_vis1): New functions.
(vector_init_bshuffle): Rewrite to handle more cases and make use
of locs[] array prepared by vector_init_prepare_elts.
(vector_init_fpmerge, vector_init_faligndata): Delete.
(sparc_expand_vector_init): Rewrite using new infrastructure.
2011-11-11 Jakub Jelinek <>
* opts-common.c (generate_canonical_option): Free opt_text
it it has been allocated here and not stored anywhere.
* tree-vect-slp.c (vect_free_slp_tree): Also free SLP_TREE_CHILDREN
(vect_create_new_slp_node): Don't allocate node before checking stmt
(vect_free_oprnd_info): Remove FREE_DEF_STMTS argument, always
free def_stmts vectors and additionally free oprnd_info.
(vect_build_slp_tree): Adjust callers. Call it even if
stop_recursion. If vect_create_new_slp_node or
vect_build_slp_tree fails, properly handle freeing memory.
If it succeeded, clear def_stmts in oprnd_info.
2011-11-11 Dimitrios Apostolou <>
multiple lines for readability.
* output.h (fprint_whex, fprint_w, fprint_ul, sprint_ul): Declare.
(ASM_OUTPUT_LABELREF): Call fputs instead of asm_fprintf.
* dwarf2asm.c (dw2_assemble_integer, dw2_asm_output_data,
dw2_asm_data_uleb128, dw2_asm_delta_uleb128,
dw2_asm_delta_sleb128): Convert fprintf calls to the new functions.
* dwarf2out.c (dwarf2out_source_line): Call fprint_ul instead of
* final.c (fprint_whex, fprint_w, fprint_ul, sprint_ul): New functions
serving as fast replacements for fprintf integer to string conversions.
(sprint_ul_rev): Internal helper for the above.
(output_addr_const) <CONST_INT>: Don't use fprintf.
* varasm.c: Fix some whitespace inconsistencies.
(default_elf_asm_output_limited_string): New.
(default_elf_asm_output_ascii): Likewise.
(default_elf_internal_label): Likewise.
* config/elfos.h (ASM_GENERATE_INTERNAL_LABEL): Use sprint_ul and
stpcpy instead of sprintf.
(TARGET_ASM_INTERNAL_LABEL): Define as default_elf_internal_label.
provide the same functionality.
* config/i386/i386.c (print_reg): Call fprint_ul instead of fprintf.
2011-11-10 Andrew MacLeod <>
* doc/extend.texi: Document __atomic_test_and_set and __atomic_clear.
2011-11-10 Andrew MacLeod <>
PR middle-end/51038
* builtins.c (expand_builtin_atomic_clear): New. Expand atomic_clear.
(expand_builtin_atomic_test_and_set): New. Expand atomic test_and_set.
(expand_builtin): Add cases for test_and_set and clear.
* sync-builtins.def (BUILT_IN_ATOMIC_TEST_AND_SET): New.
2011-11-10 Roberto Agostino Vitillo <>
PR debug/50983
* dwarf2out.c (set_cur_line_info_table): Restore the last is_stmt
value in the current line table.
2011-11-10 Nathan Sidwell <>
* gcov.c (struct function_info): Make src an index, not a pointer.
(struct source_info): Remove index and next source fields.
(fn_end): New static var.
(sources_index): Remove.
(sources): Now a pointer to an array, not a list.
(n_sources, a_sources): New.
(process_file): Adjust for changes to read_graph_file. Insert
functions into source lists and check line numbers here.
(generate_results): Only allocate lines for sources with
contents. Adjust for source array.
(release_structures): Likewise.
(find_source): Return source index, adjust for source array.
(read_graph_file): Return function list. Don't insert into source
lists here.
(read_count_file): Take list of functions.
(solve_flow_graph): Reverse the arc lists here.
(add_line_counts): Adjust for source array.
2011-11-10 Jakub Jelinek <>
PR middle-end/51077
* tree-object-size.c (addr_object_size): Check TREE_CODE of
MEM_REF's operand rather than code of the MEM_REF itself.
2011-11-10 Andrew MacLeod <>
PR rtl-optimization/51040
* optabs.c (expand_atomic_fetch_op): Patchup code for NAND should
be AND followed by NOT.
* builtins.c (expand_builtin_atomic_fetch_op): Patchup code for NAND
should be AND followed by NOT.
2011-11-10 Jakub Jelinek <>
* vec.h (VEC_BASE): If base is at offset 0 in the structure,
use &(P)->base even if P is NULL.
PR rtl-optimization/51023
* combine.c (simplify_comparison) <case SIGN_EXTEND>: Don't use
val_signbit_known_clear_p for signed comparison narrowing
optimization. Don't check for non-VOIDmode, use
<case ZERO_EXTEND>: Don't check for non-VOIDmode.
Optimize even when const_op is equal to GET_MODE_MASK (mode),
don't optimize if const_op is negative.
2011-11-10 Richard Guenther <>
PR tree-optimization/51042
* tree-ssa-pre.c (phi_translate_1): Avoid recursing on
self-referential expressions. Refactor code to avoid duplication.
2011-11-10 Richard Guenther <>
PR tree-optimization/51070
* tree-loop-distribution.c (generate_builtin): Do not replace
the loop with a builtin if the partition contains statements which
results are used outside of the loop.
(pass_loop_distribution): Verify and collect.
2011-11-10 Richard Guenther <>
PR tree-optimization/51030
* tree-ssa-phiopt.c (jump_function_from_stmt): New function.
(value_replacement): Use it to handle trivial non-empty
intermediate blocks.
2011-11-10 Richard Guenther <>
PR middle-end/51071
* gimple.c (gimple_has_side_effects): Remove checking code
that doesn't belong here.
2011-11-10 Ira Rosen <>
PR tree-optimization/51058
* tree-vect-slp.c (vect_get_constant_vectors): Handle CALL_EXPR.
2011-11-10 Jakub Jelinek <>
PR tree-optimization/51000
* tree-vect-patterns.c (vect_recog_bool_pattern): If adding
a pattern stmt for a bool store, adjust DR_STMT too.
Don't handle bool conversions to single bit precision lhs.
* tree-vect-stmts.c (vect_remove_stores): If next is a pattern
stmt, remove its related stmt and free its stmt_vinfo.
(free_stmt_vec_info): Free also pattern stmt's vinfo and
pattern def stmt's vinfo.
* tree-vect-loop.c (destroy_loop_vec_info): Don't try to
free pattern stmt's vinfo here.
(vect_transform_loop): When calling vect_remove_stores,
do gsi_next first and don't call gsi_remove. If not strided
store, free stmt vinfo for gsi_stmt (si) rather than stmt.
2011-11-09 Jakub Jelinek <>
PR target/50911
* config/i386/i386.c (expand_vec_perm_interleave2): If d->vmode is
V4SImode, !TARGET_SSE2 and punpck[lh]* is needed, change dremap.vmode
to V4SFmode.
* function.h (requires_stack_frame_p): New prototype.
* function.c (requires_stack_frame_p): No longer static.
* config/i386/i386.c (ix86_finalize_stack_realign_flags): If
stack_realign_fp was just a conservative guess for a function
which doesn't use sp/fp/argp at all, clear frame_pointer_needed
and stack realignment.
2011-11-09 Paolo Carlini <>
PR preprocessor/51061
* incpath.c (merge_include_chains): Make sure to not pass null
pointers to free_path.
2011-11-09 Paolo Carlini <>
* doc/invoke.texi ([Option Summary, C++ Language Options]):
Add -Wzero-as-null-pointer-constant.
2011-11-07 Matthew Gretton-Dann <>
* config/arm/arm-cores.def: Add -mcpu=cortex-a7.
* config/arm/arm-tables.opt: Regenerate.
* config/arm/ Likewise.
* config/arm/bpabi.h (BE8_LINK_SPEC): Add Cortex A-7.
* doc/invoke.texi: Document -mcpu=cortex-a7.
2011-11-09 Richard Guenther <>
2011-11-09 Richard Guenther <>
* tree-cfg.c (verify_gimple_call): Verify that
gimple_call_cannot_inline_p is returning a conservative
correct result according to gimple_check_call_matching_types.
2011-11-09 Richard Guenther <>
PR tree-optimization/51039
* tree-cfg.c (verify_gimple_call): Verify that
gimple_call_cannot_inline_p is returning a conservative
correct result according to gimple_check_call_matching_types.
* ipa-inline-analysis.c (estimate_function_body_sizes): Remove
code dealing with un-inlinablility.
* gimple-streamer-in.c (input_gimple_stmt): Update the
non-inlinable flag.
2011-11-09 Richard Guenther <>
PR tree-optimization/51039
* tree-inline.c (setup_one_parameter): Always perform a
valid gimple type change.
(declare_return_variable): Likewise.
2011-11-09 Jakub Jelinek <>
* config/rs6000/ (vcondv4sfv4si, vcondv4siv4sf,
vconduv4sfv4si): New patterns.
* config/rs6000/rs6000.c (rs6000_emit_vector_cond_expr): Handle
different dest_mode from comparison mode.
2011-11-09 Richard Guenther <>
* gimple-fold.c (canonicalize_constructor_val): Mark
address-taken variables addressable.
2011-11-09 Ira Rosen <>
PR tree-optimization/51015
* tree-vect-loop.c (vect_determine_vectorization_factor): Expect
vectype to be set for pattern def stmts.
2011-11-09 Alan Modra <>
* function.c (bb_active_p): Delete.
(dup_block_and_redirect, active_insn_between): New functions.
(convert_jumps_to_returns, emit_return_for_exit): New functions,
split out from..
(thread_prologue_and_epilogue_insns): Delete
shadowing variables. Don't do prologue register clobber tests
when shrink wrapping already failed. Delete all last_bb_active
code. Instead compute tail block candidates for duplicating
exit path. Remove these from antic set. Duplicate tails when
reached from both blocks needing a prologue/epilogue and
blocks not needing such.
* ifcvt.c (dead_or_predicable): Test both flag_shrink_wrap and
* bb-reorder.c (get_uncond_jump_length): Make global.
* bb-reorder.h (get_uncond_jump_length): Declare.
* cfgrtl.c (rtl_create_basic_block): Comment typo fix.
(rtl_split_edge): Likewise. Warning fix.
(rtl_duplicate_bb): New function.
(rtl_cfg_hooks): Enable can_duplicate_block_p and duplicate_block.
* (function.o): Update dependencies.
2011-11-08 Ulrich Weigand <>
Georg-Johann Lay <>
* doc/ (MODE_CODE_BASE_REG_CLASS): Add address space
* doc/tm.texi: Regenerate.
* config/cris/cris.h (MODE_CODE_BASE_REG_CLASS): Add address
space argument.
* config/bfin/bfin.h (MODE_CODE_BASE_REG_CLASS): Likewise.
* config/avr/avr.h (MODE_CODE_BASE_REG_CLASS): Add address space
* config/avr/avr-protos.h (avr_mode_code_base_reg_class): Ditto.
(avr_regno_mode_code_ok_for_base_p): Ditto.
* config/avr/avr.c (avr_mode_code_base_reg_class): Ditto.
(avr_regno_mode_code_ok_for_base_p): Ditto.
(avr_reg_ok_for_addr_p): Pass AS down to
* addresses.h (base_reg_class): Add address space argument.
(ok_for_base_p_1): Add address space argument. Pass to
(regno_ok_for_base_p): Add address space argument. Pass to
* regrename.c (scan_rtx_address): Add address space argument.
Pass address space to regno_ok_for_base_p and base_reg_class.
Update recursive calls.
(scan_rtx): Pass address space to scan_rtx_address.
(build_def_use): Likewise.
* regcprop.c (replace_oldest_value_addr): Add address space
argument. Pass to regno_ok_for_base_p and base_reg_class.
Update recursive calls.
(replace_oldest_value_mem): Pass address space to
(copyprop_hardreg_forward_1): Likewise.
* reload.c (find_reloads_address_1): Add address space argument.
Pass address space to base_reg_class and regno_ok_for_base_p.
Update recursive calls.
(find_reloads_address): Pass address space to base_reg_class,
regno_ok_for_base_p, and find_reloads_address_1.
(find_reloads): Pass address space to base_reg_class.
(find_reloads_subreg_address): Likewise.
* ira-costs.c (record_reg_classes): Update calls to base_reg_class.
(ok_for_base_p_nonstrict): Add address space argument. Pass to
(record_address_regs): Add address space argument. Pass to
base_reg_class and ok_for_base_p_nonstrict. Update recursive calls.
(record_operand_costs): Pass address space to record_address_regs.
(scan_one_insn): Likewise.
* caller-save.c (init_caller_save): Update call to base_reg_class.
* ira-conflicts.c (ira_build_conflicts): Likewise.
* reload1.c (maybe_fix_stack_asms): Likewise.
2011-11-08 Michael Matz <>
* gengtype.c (write_field_root): Avoid out-of-scope access of newv.
* tree-stdarg.c (execute_optimize_stdarg): Accept clobbers.
* tree.h (TREE_CLOBBER_P): New macro.
* gimple.h (gimple_clobber_p): New inline function.
* gimplify.c (gimplify_bind_expr): Add clobbers for all variables
that go out of scope and live in memory.
* tree-ssa-operands.c (get_expr_operands): Transfer volatility also
for constructors.
* cfgexpand.c (decl_to_stack_part): New static variable.
(add_stack_var): Allocate it, and remember mapping.
(fini_vars_expansion): Deallocate it.
(stack_var_conflict_p): Add early outs.
(visit_op, visit_conflict, add_scope_conflicts_1,
add_scope_conflicts): New static functions.
(expand_used_vars_for_block): Don't call add_stack_var_conflict, tidy.
(expand_used_vars): Add scope conflicts.
(expand_gimple_stmt_1): Expand clobbers to nothing.
(expand_debug_expr): Ditto.
* tree-pretty-print.c (dump_generic_node): Dump clobbers nicely.
* tree-ssa-live.c (remove_unused_locals): Remove clobbers that
refer to otherwise unused locals.
* tree-sra.c (build_accesses_from_assign): Ignore clobbers.
* tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Clobbers of
SSA names aren't necessary.
(propagate_necessity): Accept and ignore constructors on the rhs, tidy.
* gimple.c (walk_gimple_op): Accept constructors like mem_rhs.
* tree-ssa-structalias.c (find_func_aliases): Clobbers don't store
any known value.
* tree-ssa-sccvn.c (vn_reference_lookup_3): Ditto, in particular they
don't zero-initialize something.
* tree-ssa-phiopt.c (cond_if_else_store_replacement_1): Ignore
clobber RHS, we don't want PHI nodes with those.
2011-11-08 Jakub Jelinek <>
* config/i386/i386.c (ix86_preferred_simd_mode): Even for TARGET_AVX
if not TARGET_PREFER_AVX128 return 32-byte integer vectors.
2011-11-08 Richard Guenther <>
PR tree-optimization/51012
* ipa-prop.c (update_indirect_edges_after_inlining): Fixup
non-inlinable state.
* cgraph.c (cgraph_make_edge_direct): Likewise.
2011-11-08 Eric Botcazou <>
PR rtl-optimization/47698
* ifcvt.c (noce_operand_ok): Move around comment.
2011-11-08 Richard Guenther <>
PR lto/50999
* lto-opts.c (append_to_collect_gcc_options): Split out from...
(lto_write_options): ... here. Prepend frontend specific flags.
2011-11-08 Jakub Jelinek <>
* config/i386/ (*avx_vperm2f128<mode>3_nozero): Emit mask
0x12 and 0x20 as vinsert[fi]128 instead of vperm2[fi]128.
* tree-vect-stmts.c (vectorizable_call): Add SLP_NODE argument.
Handle vectorization of SLP calls.
(vect_analyze_stmt): Adjust caller, add call to it for SLP too.
(vect_transform_stmt): Adjust vectorizable_call caller, remove
* tree-vect-slp.c (vect_get_and_check_slp_defs): For calls start
with op_idx 3.
(vect_build_slp_tree): Allow CALL_EXPR.
2011-11-08 Richard Guenther <>
* gimple-fold.c (canonicalize_constructor_val): Make sure
we have referenced vars setup before adding to them.
2011-11-07 Richard Henderson <>
Aldy Hernandez <>
Andrew MacLeod <>
Torvald Riegel <>
Merged from transactional-memory.
* gtm-builtins.def: New file.
* trans-mem.c: New file.
* trans-mem.h: New file.
* opts.c (finish_options): Error out when using -flto and -fgnu-tm.
* config/i386/i386.c: Define TARGET_VECTORIZE* transactional variants.
(ix86_handle_tm_regparm_attribute, struct bdesc_tm,
ix86_builtin_tm_load, ix86_builtin_tm_store,
ix86_init_tm_builtins): New.
(ix86_init_builtins): Initialize TM builtins.
(struct ix86_attribute_table): Add "*tm regparm".
* config/i386/i386-builtin-types.def (PV2SI): Define.
(PCV2SI): Define.
* doc/invoke.texi (C Dialect Options): Document -fgnu-tm and
* doc/tm.texi: Regenerate.
* attribs.c (apply_tm_attr): New.
(init_attributes): Allow '*' prefix for overrides.
(register_attribute): Likewise.
* builtin-attrs.def (ATTR_TM_TMPURE, ATTR_TM_REGPARM): New.
* builtin-types.def (BT_FN_I[1248]_VPTR, BT_FN_FLOAT_VPTR,
* builtins.def: Include gtm-builtins.def. Add comments regarding
transactional memory synchronization.
* c-parser.c (struct c_parser): Add in_transaction.
(c_parser_transaction, c_parser_transaction_expression,
c_parser_transaction_cancel, c_parser_transaction_attributes): New.
(c_parser_attribute_any_word): Split out from c_parser_attributes.
(c_parser_statement_after_labels): Handle RID_TRANSACTION*.
(c_parser_unary_expression): Same.
* c-tree.h (c_finish_transaction): Declare.
* c-typeck.c (c_finish_transaction): New.
(build_function_call_vec): Call tm_malloc_replacement.
* calls.c (is_tm_builtin): New.
(flags_from_decl_or_type): Add ECF_TM_BUILTIN and ECF_TM_PURE.
* cfgbuild.c (make_edges): Add edges for REG_TM notes.
* cfgexpand.c (expand_call_stmt): Call
(gimple_expand_cfg): Free the tm_restart map.
(mark_transaction_restart_calls): New.
* cfgrtl.c (purge_dead_edges): Look for REG_TM notes.
* cgraph.c (dump_cgraph_node): Handle tm_clone.
* cgraph.h (struct cgraph_node): Add tm_clone field.
(decl_is_tm_clone): New.
(struct cgraph_local_info): Add tm_may_enter_irr.
(cgraph_copy_node_for_versioning): Declare.
* cgraphunit.c (cgraph_copy_node_for_versioning): Export;
copy analyzed from old version.
* combine.c (distribute_notes): Handle REG_TM notes.
* common.opt: Add -fgnu-tm.
* crtstuff.c (__TMC_LIST__, __TMC_END__): New.
(__do_global_dtors_aux): Deregister clone table.
(frame_dummy): Register clone table.
* emit-rtl.c (try_split): Handle REG_TM. Early return if no function
* gimple-low.c (lower_stmt): Handle GIMPLE_EH_ELSE and
(gimple_stmt_may_fallthru): Handle GIMPLE_EH_ELSE.
* gimple-pretty-print.c: Include trans-mem.h.
(dump_gimple_fmt): Add %x.
(dump_gimple_call): Dump arguments for calls to _ITM_beginTransaction.
(dump_gimple_eh_else, dump_gimple_transaction): New.
(dump_gimple_stmt): Handle GIMPLE_EH_ELSE and GIMPLE_TRANSACTION.
* gimple.c (gimple_build_eh_else, gimple_build_transaction): New.
(walk_gimple_seq): Honor removed_stmt. Document usage of removed_stmt
(walk_gimple_op): Handle GIMPLE_TRANSACTION.
(walk_gimple_stmt): Initialize and honor removed_stmt.
(gimple_copy): Handle GIMPLE_EH_ELSE and GIMPLE_TRANSACTION.
* gimple.h (struct gimple_statement_eh_else,
gimple_statement_transaction, GTMA_*): New.
(gimple_statement_d): Add gimple_statement_eh_else and
(gimple_build_eh_else, gimple_build_transaction,
gimple_fold_call, diagnose_tm_safe_errors): Declare.
(get_call_expr_in): Remove prototype.
(gimple_has_substatements): Add GIMPLE_EH_ELSE and GIMPLE_TRANSACTION.
(gimple_eh_else_n_body, gimple_eh_else_e_body,
gimple_eh_else_set_n_body, gimple_eh_else_set_e_body,
gimple_transaction_body, gimple_transaction_label,
gimple_transaction_label_ptr, gimple_transaction_subcode,
gimple_transaction_set_body, gimple_transaction_set_label,
gimple_transaction_set_subcode): New.
(struct walk_stmt_info): Use BOOL_BITFIELD; add removed_stmt.
* gimplify.c (create_tmp_var_name): Use clean_symbol_name.
(voidify_wrapper_expr): Handle TRANSACTION_EXPR.
(gimplify_transaction): New.
(gimplify_expr): Handle TRANSACTION_EXPR.
* gsstruct.def (GSS_EH_ELSE, GSS_TRANSACTION): New.
* ipa-inline.c (can_inline_edge_p): Do not inline TM safe calling
TM pure functions.
* Add trans-mem.o and dependencies.
(BUILTINS_DEF): Add gtm-builtins.def.
(gimple-pretty-print.o): Depend on TRANS_MEM_H.
(GTFILES): Add trans-mem.c.
* output.h (record_tm_clone_pair, finish_tm_clone_pairs,
get_tm_clone_pair): Declare.
* params.def (PARAM_TM_MAX_AGGREGATE_SIZE): New.
* passes.c (init_optimization_passes): Place transactional memory
* print-tree.c (print_node): Dump tm-clone.
* recog.c (peep2_attempt): Handle REG_TM.
* reg-notes.def (TM): New.
* rtlanal.c (alloc_reg_note): Handle REG_TM.
* target.def (builtin_tm_load, builtin_tm_store): New.
* targhooks.c (default_builtin_tm_load_store): New.
* targhooks.h (default_builtin_tm_load_store): Declare.
* timevar.def (TV_TRANS_MEM): New.
* toplev.c (compile_file): Call finish_tm_clone_pairs.
* tree-cfg.c (make_edges): Handle GIMPLE_TRANSACTION.
(cleanup_dead_labels): Handle GIMPLE_TRANSACTION. Avoid unnecessary
writes into the statements to update labels.
(is_ctrl_altering_stmt): Add TM ending statements. Handle
(verify_gimple_transaction): New.
(verify_gimple_stmt): Handle GIMPLE_TRANSACTION.
(verify_gimple_in_seq_2): Handle GIMPLE_EH_ELSE and GIMPLE_TRANSACTION.
(gimple_redirect_edge_and_branch): Handle TM_TRANSACTION.
(dump_function_to_file): Display [tm-clone] if applicable.
* tree-eh.c (struct_ptr_eq): Make inline and move to tree.h.
(struct_ptr_hash): Same.
(collect_finally_tree): Handle GIMPLE_EH_ELSE.
(replace_goto_queue_1): Likewise.
(get_eh_else): New.
(honor_protect_cleanup_actions): Handle GIMPLE_EH_ELSE.
(lower_try_finally_nofallthru): Likewise.
(lower_try_finally_onedest): Likewise.
(lower_try_finally_copy): Likewise.
(lower_try_finally_switch): Likewise.
(lower_try_finally): Likewise.