Ulrich Weigand [Tue, 26 Jun 2012 09:05:48 +0000 (09:05 +0000)]
re PR regression/53729 (PR53636 fix caused bb-slp-16.c to FAIL on sparc64 and powerpc64)
PR tree-optimization/53729
PR tree-optimization/53636
* tree-vect-slp.c (vect_slp_analyze_bb_1): Delay call to
vect_verify_datarefs_alignment until after statements have
been marked as relevant/irrelevant.
* tree-vect-data-refs.c (vect_verify_datarefs_alignment):
Skip irrelevant statements.
(vect_enhance_data_refs_alignment): Use STMT_VINFO_RELEVANT_P
instead of STMT_VINFO_RELEVANT.
(vect_get_data_access_cost): Do not check for supportable
alignment before calling vect_get_load_cost/vect_get_store_cost.
* tree-vect-stmts.c (vect_get_store_cost): Do not abort when
handling unsupported alignment.
(vect_get_load_cost): Likewise.
Janis Johnson [Mon, 25 Jun 2012 22:01:34 +0000 (22:01 +0000)]
profopt.exp: Make prof_option_list local to profopt-execute.
* lib/profopt.exp: Make prof_option_list local to profopt-execute.
* g++.dg/tree-prof/tree-prof.exp (PROFOPT_OPTIONS): Define after
including profopt.opt; save and restore existing value.
* g++.dg/bprob/bprob.exp: Likewise.
* gcc.dg/matrix/matrix.exp: Likewise.
* gcc.dg/tree-prof/tree-prof.exp: Likewise.
* gcc.misc-tests/bprob.exp: Likewise; also replace formerly-ignored
PROFOPT_OPTIONS.
i386: Delete sse sdot_prod; add sdot_prodv4si for xop
Now that we support mult_even/odd hooks, the vectorizer can
generate the exact same code for plain sse dot_prod by itself,
as well as other reductions other than plus.
i386: Cleanup and unify widening multiply patterns
Prepares for exposing builtin_mul_widen_even/odd hooks
for more efficient reduction. Adds QImode multiplication.
Shares code between mulv4si3 and the widening multiplies.
re PR debug/53740 (--enable-checking=yes,rtl bootstrap failure with ada)
gcc/
PR debug/53740
* df.h (dead_debug_add): Remove third argument.
* df-problems.c (dead_debug_add): Likewise. Use the REGNO of the
REG that we want to replace instead.
(dead_debug_insert_temp): Use the REGNO of the reg that we want
to replace instead of DF_REF_REGNO. Require there to always be
at least one such use. Check for cases where the same location
has more than df_ref associated with it.
(df_note_bb_compute): Remove third dead_debug_add argument.
* dce.c (word_dce_process_block): Likewise.
Tristan Gingold [Mon, 25 Jun 2012 08:25:43 +0000 (08:25 +0000)]
winnt.c (i386_pe_seh_end_prologue): Move code to ...
2012-06-25 Tristan Gingold <gingold@adacore.com>
* config/i386/winnt.c (i386_pe_seh_end_prologue): Move code to ...
(seh_cfa_adjust_cfa): ... that function.
(seh_emit_stackalloc): Do not emit out of range values.
* config/i386/i386.md: Delete unused UNSPEC_REG_SAVE,
UNSPEC_DEF_CFA constants.
* config/i386/i386.h (SEH_MAX_FRAME_SIZE): Define.
* config/i386/i386.c (ix86_frame_pointer_required): Required
for very large frames on SEH target.
(ix86_compute_frame_layout): Save area is before frame pointer
on SEH target. Handle very large frames.
(ix86_expand_prologue): Likewise.
Steven Bosscher [Sun, 24 Jun 2012 13:22:29 +0000 (13:22 +0000)]
system.h: Poison ASM_BYTE_OP and ASM_OUTPUT_BYTE.
* system.h: Poison ASM_BYTE_OP and ASM_OUTPUT_BYTE.
* vmsdbgout: Do not undefine it if defined.
Rename local ASM_BYTE_OP definition to VMS_ASM_BYTE_OP.
* config/microblaze/microblaze/h: Do no define ASM_BYTE_OP.
* config/mep/mep.h: Do not define ASM_OUTPUT_BYTE.
PR target/53749
* config/i386/i386.c (ix86_rtx_costs): Add reasonable costs for
V*QImode shifts and multiply.
(ix86_expand_vecop_qihi): Support shifts.
* config/i386/i386.md (any_shift): New code iterator.
* config/i386/sse.md (ashlv16qi3): Merge ...
(<any_shiftrt>v16qi3): ... into ...
(<any_shift><VI1_AVX2>3): ... here. Use ix86_expand_vecop_qihi
to support SSE and AVX.
* tree-flow.h (parallelized_function_p): Declare.
* tree-parloops.c (parallelized_function_p): Export.
* graphite.c (graphite_transform_loops): Do not run graphite on
already parallel functions.
Alan Modra [Fri, 22 Jun 2012 12:14:12 +0000 (21:44 +0930)]
rs6000.c (rs6000_pre_atomic_barrier): Pass in and return mem.
* config/rs6000/rs6000.c (rs6000_pre_atomic_barrier): Pass in and
return mem. Convert to indirect addressing if not indirect or
indexed. Adjust all callers.
Meador Inge [Thu, 21 Jun 2012 20:20:30 +0000 (20:20 +0000)]
re PR c/53702 (ICE with -Wall and nested functions and unused typedef)
PR c/53702
* c-decl.c (c_push_function_context): Restore the behavior to reuse
the language function allocated for -Wunused-local-typedefs.
(c_pop_function_context): If necessary, clear the language function
created in c_push_function_context. Always clear out the
x_cur_stmt_list field of the restored language function.
testsuite/
* gcc.dg/Wunused-local-typedefs.c: New testcase.
* dwarf2out.c (is_cu_die, is_namespace_die, is_class_die,
add_AT_pubnames, add_enumerator_pubname, want_pubnames): New functions.
(comdat_type_struct): New field 'skeleton_die'.
(breakout_comdat_types): Update it.
(add_pubname): Rework logic. Call is_class_die, is_cu_die and
is_namespace_die. Fix minor style violation. Call want_pubnames.
(add_pubname_string): Call want_pubnames.
(add_pubtype): Rework logic for calculating type name. Call
is_namespace_die. Call want_pubnames.
(output_pubnames): Move conditional logic deciding when to produce the
section from dwarf2out_finish. Use new skeleton_die field.
(base_type_die): Call add_pubtype.
(gen_enumeration_type_die): Unconditionally call add_pubtype.
(gen_subprogram_die): Adjust calls to add_pubname.
(gen_namespace_die): Call add_pubname_string.
(dwarf2out_finish): Call add_AT_pubnames; Move logic on when to
produce pubnames and pubtypes sections to output_pubnames.
(common.opt): New option '-gpubnames'.
(invoke.texi): Document it.
Steven Bosscher [Thu, 21 Jun 2012 16:53:45 +0000 (16:53 +0000)]
c-common.h (c_common_print_pch_checksum): Remove.
c-family/
* c-common.h (c_common_print_pch_checksum): Remove.
* c-pch.c: Do not include output.h.
(CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
(asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
(asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
(struct c_pch_header): Remove.
(get_ident): Update gpch version.
(pch_init): Do not print executable_checksum to asm_out_file.
Do not fail if there is no asm_out_file to read back from. Set
asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
(c_common_write_pch): Verify that nothing was written to asm_out_file
since pch_init was called. Do not write a c_pch_header, and do not
copy from asm_out_file to the PCH.
(c_common_read_pch): Do not read a c_pch_header, and do not restore
the content of asm_out_file from the PCH.
(c_common_print_pch_checksum): Remove.
* c-opts.c (c_common_init): Print out executable_checksum directly.
testsuite/
* testsuite/gcc.dg/pch/ident-1.c: New test.
* testsuite/gcc.dg/pch/ident-1.hs: Header file for new test.
Uros Bizjak [Wed, 20 Jun 2012 19:28:07 +0000 (21:28 +0200)]
i386.md (SINCOS): New int iterator.
2012-06-20 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (SINCOS): New int iterator.
(sincos): New int attribute.
(*<sincos>xf2_i387): Macroize insn from *{sin,cos}xf2_i387 using
SINCOS int iterator.
(*<sincos>_extend<mode>xf2_i387): Macroize insn from
*{sin,cos}_extend<mode>xf2_i387 using SINCOS int iterator.
2012-06-20 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (RDFSGSBASE): New int iterator.
(WRFSGSBASE): Ditto.
(fsgs): New int attribute.
(rd<fsgs>base<mode>): Macroize insn from rd<fsgs>base<mode> using
RDFSGSBASE int iterator.
(wr<fsgs>base<mode>): Macroize insn from wr<fsgs>base<mode> using
WRFSGSBASE int iterator.
I'm currently writing a plugin for GCC and I need to extract the
column of a declaration. There exists DECL_SOURCE_FILE/LINE already
and for consistency reasons and ease of use I've added a
DECL_SOURCE_COLUMN macro.
Uros Bizjak [Wed, 20 Jun 2012 17:37:40 +0000 (19:37 +0200)]
i386.md (<rounding_insn><mode>2): Macroize expander from {floor,ceil,btrunc}<mode>2 using FIST_ROUNDING int iterator.
* config/i386/i386.md (<rounding_insn><mode>2): Macroize expander
from {floor,ceil,btrunc}<mode>2 using FIST_ROUNDING int iterator.
(l<rounding_insn><MODEF:mode><SWI48:mode>2): Macroize expander
from l{floor,ceil}<MODEF:mode><SWI48:mode>2 using FIST_ROUNDING
int iterator.
Richard Guenther [Wed, 20 Jun 2012 12:00:20 +0000 (12:00 +0000)]
re PR tree-optimization/30318 (VRP does not create ANTI_RANGEs on overflow)
2012-06-20 Richard Guenther <rguenther@suse.de>
PR tree-optimization/30318
* tree-vrp.c (range_int_cst_p): Do not reject overflowed
constants here.
(range_int_cst_singleton_p): But explicitely here.
(zero_nonzero_bits_from_vr): And here.
(extract_range_from_binary_expr_1): Re-implement PLUS_EXPR
to cover all cases we can perform arbitrary precision
arithmetic with double-ints.
(intersect_ranges): Handle adjacent anti-ranges.
Uros Bizjak [Wed, 20 Jun 2012 10:25:17 +0000 (12:25 +0200)]
i386.md (rounding_insn): New int attribute.
2012-06-20 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (rounding_insn): New int attribute.
(<rounding_insn>xf2): Macroize insn from
{floor,ceil,btrunc}xf2 using FRNDINT_ROUNDING int iterator.
(l<rounding_insn>xf<mode>2): Rename from l<rounding>xf<mode>2.
2012-06-20 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (IEEE_MAXMIN): New int iterator.
(ieee_maxmin): New int attribute.
(*ieee_s<ieee_maxmin><mode>3): Macroize insn from
*ieee_s{max,min}<mode>3 using IEEE_MAXMIN mode iterator.
Steven Bosscher [Wed, 20 Jun 2012 10:18:08 +0000 (10:18 +0000)]
arm.h (EMIT_EABI_ATTRIBUTE): Remove.
* config/arm/arm.h (EMIT_EABI_ATTRIBUTE): Remove.
* config/arm/arm.c: Do not include c-pragma.h.
(arm_emit_eabi_attribute): New function based on EMIT_EABI_ATTRIBUTE.
(arm_file_start): Replace uses of EMIT_EABI_ATTRIBUTE with calls
to arm_emit_eabi_attribute.
* arm-c.c: Do not include output.h.
(arm_output_c_attributes): Replace use of EMIT_EABI_ATTRIBUTE with a
call to arm_emit_eabi_attribute.
* config/arm/arm-protos.h (arm_emit_eabi_attribute): Prototype it.
Maxim Kuvyrkov [Wed, 20 Jun 2012 01:05:25 +0000 (01:05 +0000)]
emit-rtl.c (need_atomic_barrier_p): New function.
* emit-rtl.c (need_atomic_barrier_p): New function.
* emit-rtl.h (need_atomic_barrier_p): Declare it.
* config/alpha/alpha.c (alpha_{pre,post}_atomic_barrier): Use it.
* config/arm/arm.c (arm_{pre,post}_atomic_barrier): Use it.
* config/tilegx/tilegx.c (tile_{pre,post}_atomic_barrier): Use it.
* config/mips/mips.c (mips_{pre,post}_atomic_barrier_p): Remove.
(mips_process_sync_loop): Use generic version instead.
Tom de Vries [Wed, 20 Jun 2012 00:57:23 +0000 (00:57 +0000)]
2012-06-19 Tom de Vries <vries@codesourcery.com>
Maxim Kuvyrkov <maxim@codesourcery.com>
* config/mips/mips.c (mips_emit_pre_atomic_barrier_p,)
(mips_emit_post_atomic_barrier_p): New static functions.
(mips_process_sync_loop): Use them. Emit sync memory barriers in
accordance with memory model semantics. Add return of CMP result for
compare_and_swap.
* config/mips/mips.md: Update comment.
(sync_cmp): New attribute.
(sync_memmodel): New attribute replacing sync_release_barrier.
* config/mips/sync.md (UNSPEC_ATOMIC_COMPARE_AND_SWAP,)
(UNSPEC_ATOMIC_EXCHANGE, UNSPEC_ATOMIC_FETCH_OP): New constants.
(sync_lock_test_and_set, test_and_set_12): Update.
(atomic_compare_and_swap, atomic_exchange, atomic_exchange_llsc,)
(atomic_fetch_add, atomic_fetch_add_llsc): New patterns.