Age | Commit message (Collapse) | Author | Files | Lines |
|
statement is vectorizable...
* tree-vectorizer.h (struct _stmt_vec_info): Add new field to
determine if the statement is vectorizable, and a macro to
access it.
* tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
Skip statements that can't be vectorized. If the analysis
fails, mark the statement as unvectorizable if vectorizing
basic block.
(vect_compute_data_refs_alignment): Likewise.
(vect_verify_datarefs_alignment): Skip statements marked as
unvectorizable. Add print.
(vect_analyze_group_access): Skip statements that can't be
vectorized. If the analysis fails, mark the statement as
unvectorizable if vectorizing basic block.
(vect_analyze_data_ref_accesses, vect_analyze_data_refs):
Likewise.
* tree-vect-stmts.c (vectorizable_store): Fix the number of
generated stmts for SLP.
(new_stmt_vec_info): Initialize the new field.
* tree-vect-slp.c (vect_build_slp_tree): Fail to vectorize
statements marked as unvectorizable.
From-SVN: r158719
|
|
PR tree-optimization/43842
* tree-vect-loop.c (vect_create_epilog_for_reduction): Handle
loop unrolling in update of exit phis. Fix comment.
* tree-vect-slp.c (vect_analyze_slp): Check that there are at
least two reduction statements in the loop before starting SLP
analysis.
From-SVN: r158650
|
|
reductions)
PR tree-optimization/37027
* tree-vectorizer.h (struct _loop_vec_info): Add new field reductions
and macro to access it.
(vectorizable_reduction): Add argument.
(vect_get_slp_defs): Likewise.
* tree-vect-loop.c (vect_analyze_scalar_cycles_1): Collect reduction
statements for possible use in SLP.
(new_loop_vec_info): Initialize LOOP_VINFO_REDUCTIONS.
(destroy_loop_vec_info): Free LOOP_VINFO_REDUCTIONS.
(vect_create_epilog_for_reduction): Handle SLP. Modify documentation,
add new argument.
(vectorizable_reduction): Likewise.
* tree-vect-stmts.c (vect_get_vec_defs): Update call to
vect_get_slp_defs.
(vectorizable_type_demotion, vectorizable_type_promotion,
vectorizable_store): Likewise.
(vect_analyze_stmt): Update call to vectorizable_reduction.
(vect_transform_stmt): Likewise.
* tree-vect-slp.c (vect_get_and_check_slp_defs): Handle reduction.
(vect_build_slp_tree): Fix indentation. Check that there are no loads
from different interleaving chains in same node.
(vect_slp_rearrange_stmts): New function.
(vect_supported_load_permutation_p): Allow load permutations for
reductions. Call vect_slp_rearrange_stmts() to rearrange statements
inside SLP nodes if necessary.
(vect_analyze_slp_instance): Handle reductions.
(vect_analyze_slp): Try to build SLP instances originating from groups
of reductions.
(vect_detect_hybrid_slp_stmts): Skip reduction statements.
(vect_get_constant_vectors): Create initial vectors for reductions
according to reduction code. Add new argument.
(vect_get_slp_defs): Add new argument, pass it to
vect_get_constant_vectors.
(vect_schedule_slp_instance): Remove SLP tree root statements.
From-SVN: r158506
|
|
dependence for dependence distance zero.
2010-04-13 Richard Guenther <rguenther@suse.de>
* tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
Only add RW dependence for dependence distance zero.
Adjust maximal vectorization factor according to dependences.
Move alignment handling ...
(vect_find_same_alignment_drs): ... here. New function.
(vect_analyze_data_ref_dependences): Adjust.
(vect_analyze_data_refs_alignment): Call vect_find_same_alignment_drs.
(vect_analyze_data_refs): Adjust minimal vectorization factor
according to data references.
* tree-vect-loop.c (vect_analyze_loop): Analyze data-ref
dependences before determining the vectorization factor.
Analyze alignment after determining the vectorization factor.
* tree-vect-slp.c ((vect_slp_analyze_bb): Analyze data-ref
dependences before alignment.
* tree-vectorizer.h (vect_analyze_data_ref_dependences):
Adjust prototype.
(vect_analyze_data_refs): Likewise.
(MAX_VECTORIZATION_FACTOR): New define.
* gcc.dg/vect/no-vfa-vect-depend-1.c: Adjust.
From-SVN: r158259
|
|
global is LIM'd)
Fix PR32824.
2010-04-06 Changpeng Fang <changpeng.fang@amd.com>
PR middle-end/32824
* passes.c (init_optimization_passes): Move pass_lim before
pass_copy_prop and pass_dce_loop.
* gcc.dg/vect/pr32824: New.
From-SVN: r158018
|
|
2010-04-04 Sebastian Pop <sebastian.pop@amd.com>
* gcc.dg/vect/pr43430-1.c: Don't use uint8_t.
From-SVN: r157959
|
|
2010-03-30 Sebastian Pop <sebastian.pop@amd.com>
PR middle-end/43430
* tree-vect-slp.c (vect_get_and_check_slp_defs): Replace type
pointer comparisons with types_compatible_p.
* tree-vect-stmts.c (vectorizable_call): Same.
(vectorizable_condition): Same.
* gcc.dg/vect/pr43430-1.c: New.
From-SVN: r157833
|
|
tree-vect-loop.c:3491)
PR tree-optimization/43074
* tree-vectorizer.h (VECTORIZABLE_CYCLE_DEF): New.
* tree-vect-loop.c (vect_analyze_loop_operations): Add
vectorizable cycles in hybrid SLP check.
* tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
From-SVN: r156800
|
|
PR tree-optimization/42709
* tree-vect-slp.c (vect_get_constant_vectors): Use constant's type
as scalar type in creation of constant vector operand.
From-SVN: r155882
|
|
gcc/ChangeLog:
PR debug/42604
PR debug/42395
* tree-vect-loop-manip.c (adjust_info): New type.
(adjust_vec): New pointer to vector.
(adjust_debug_stmts_now, adjust_vec_debug_stmts): New.
(adjust_debug_stmts, adjust_phi_and_debug_stmts): New.
(slpeel_update_phis_for_duplicate_loop): Use them.
(slpeel_update_phi_nodes_for_guard1): Likewise.
(slpeel_update_phi_nodes_for_guard2): Likewise.
(slpeel_tree_peel_loop_to_edge): Likewise.
(vect_update_ivs_after_vectorizer): Likewise.
gcc/testsuite/ChangeLog:
PR debug/42604
PR debug/42395
* gcc.dg/vect/pr42604.c: New.
* gcc.dg/vect/pr42395.c: New.
From-SVN: r155761
|
|
PR tree-optimization/41956
* tree-vect-slp.c (vect_supported_load_permutation_p): Add check that
the load indices differ.
From-SVN: r155523
|
|
PR tree-optimization/42193
* tree-vect-stmts.c (vectorizable_operation): Set vectorization factor
to 1 in case of basic block SLP.
(vectorizable_load): Likewise.
From-SVN: r154738
|
|
define the mode.
* config/i386/i386-builtin-types.awk (DEF_VECTOR_TYPE): Allow an
optional 3rd argument to define the mode.
* config/i386/i386-builtin-types.def (UQI, UHI, USI, UDI): New.
(V2UDI, V4USI, V8UHI, V16UQI): New.
(V4SF_FTYPE_V4SF_V4SF_V4SI, V2UDI_FTYPE_V2UDI_V2UDI_V2UDI,
V4USI_FTYPE_V4USI_V4USI_V4USI, V8UHI_FTYPE_V8UHI_V8UHI_V8UHI,
V16UQI_FTYPE_V16UQI_V16UQI_V16UQI): New.
* config/i386/i386-modes.def: Rearrange for double-wide AVX.
* config/i386/i386-protos.h (ix86_expand_vec_extract_even_odd): New.
* config/i386/i386.c (IX86_BUILTIN_VEC_PERM_*): New.
(bdesc_args): Add the builtin definitions to match.
(ix86_expand_builtin): Expand them.
(ix86_builtin_vectorization_cost): Rename from
x86_builtin_vectorization_cost.
(ix86_vectorize_builtin_vec_perm, struct expand_vec_perm_d,
doublesize_vector_mode, expand_vselect, expand_vselect_vconcat,
expand_vec_perm_blend, expand_vec_perm_vpermil,
expand_vec_perm_pshufb, expand_vec_perm_1,
expand_vec_perm_pshuflw_pshufhw, expand_vec_perm_palignr,
expand_vec_perm_interleave2, expand_vec_perm_pshufb2,
expand_vec_perm_even_odd_1, expand_vec_perm_even_odd,
ix86_expand_vec_perm_builtin_1, extract_vec_perm_cst,
ix86_expand_vec_perm_builtin, ix86_vectorize_builtin_vec_perm_ok,
ix86_expand_vec_extract_even_odd, TARGET_VECTORIZE_BUILTIN_VEC_PERM,
TARGET_VECTORIZE_BUILTIN_VEC_PERM_OK): New.
* sse.md (SSEMODE_EO): New.
(vec_extract_even<mode>): Use SSEMODE_EO and
ix86_expand_vec_extract_even_odd.
(vec_extract_odd<mode>): Likewise.
(mulv16qi3, vec_pack_trunc_v8hi, vec_pack_trunc_v4si,
vec_pack_trunc_v2di): Use ix86_expand_vec_extract_even_odd.
testsuite/
* gcc.dg/vect/slp-21.c: Succeed with vect_extract_even_odd too.
* lib/target-supports.exp
(check_effective_target_vect_extract_even_odd): Add x86.
* gcc.target/i386/isa-check.h: New.
* gcc.target/i386/vperm-2-2.inc, gcc.target/i386/vperm-4-1.inc,
gcc.target/i386/vperm-4-2.inc, gcc.target/i386/vperm-v2df.c,
gcc.target/i386/vperm-v2di.c, gcc.target/i386/vperm-v4sf-1.c,
gcc.target/i386/vperm-v4sf-2.c, gcc.target/i386/vperm-v4si-1.c,
gcc.target/i386/vperm-v4si-2.c, gcc.target/i386/vperm-v4si-2x.c,
gcc.target/i386/vperm.pl: New files.
From-SVN: r154667
|
|
* gcc.dg/vect/pr36493.c: Call check_vect.
* gcc.dg/vect/pr37539.c: Likewise.
* gcc.dg/vect/vect-nest-cycle-3.c: Call check_vect earlier.
* tree-vect.h (check_vect): Use cpuid for x86.
From-SVN: r154666
|
|
gcc/ChangeLog:
PR debug/41926
* tree-vect-loop.c (vect_loop_kill_debug_uses): New.
(vect_transform_loop): Call it.
gcc/testsuite/ChangeLog:
PR debug/41926
* gcc.dg/vect/vect-debug-pr41926.c: New.
From-SVN: r154281
|
|
* gcc.dg/vect/vect-multitypes-5.c: XFAIL on SPARC 32-bit.
* gcc.dg/vect/vect-multitypes-6.c: Likewise.
* gcc.dg/vect/vect-multitypes-12.c: Likewise.
* gcc.dg/vect/slp-multitypes-3.c: Likewise.
From-SVN: r154070
|
|
From-SVN: r153892
|
|
From-SVN: r153590
|
|
alignment-sensitive...
* gcc.dg/vect/vect.exp: Append extra parameters as separate
parameters for alignment-sensitive -fsection-anchors tests.
From-SVN: r152182
|
|
From-SVN: r152157
|
|
2009-09-08 Ozkan Sezer <sezeroz@gmail.com>
* gcc.dg/large-size-array-2.c: Fix target requirement.
* gcc.dg/large-size-array-4.c: Likewise.
* gcc.dg/c90-const-expr-2.c: Define ZERO as 0LL for _WIN64.
* gcc.dg/c99-const-expr-2.c: Likewise.
* gcc.dg/c90-const-expr-6.c: Typedef ptrdiff_t with __extension__.
* gcc.dg/c90-const-expr-9.c: Typedef size_t with __extension__.
* gcc.dg/c90-const-expr-10.c: Likewise.
* gcc.dg/torture/pr39074.c: Use intptr_t typedef'ed as __PTRDIFF_TYPE__
instead of long.
* gcc.dg/tree-ssa/pr33920.c: Likewise.
* gcc.dg/vect/pr33846.c: Likewise.
* gcc.dg/vect/pr33833.c: Use uintptr_t, typedef'ed as unsigned
__PTRDIFF_TYPE__, instead of unsigned long.
* gcc.dg/vect/O1-pr33854.c: Use __SIZE_TYPE__ instead of unsigned long.
From-SVN: r151533
|
|
* gcc.dg/vect/vect.exp: Add new stanza for aligned-section-anchors-*
tests.
* gcc.dg/vect/section-anchors-nest-1.c: Rename to...
* gcc.dg/vect/aligned-section-anchors-nest-1.c: ...this. Remove
dg-options. Fix dg-final clause.
From-SVN: r150880
|
|
tree-vect-loop.c:1708)
PR tree-optimization/41008
* tree-vect-loop.c (vect_is_simple_reduction): Get operands
from condition only in case it's a comparison. Adjust checks.
From-SVN: r150591
|
|
2009-07-30 Sebastian Pop <sebastian.pop@amd.com>
* gcc.dg/tree-ssa/20050314-1.c: Fix patterns for lim and dceloop.
* gcc.dg/tree-ssa/loop-32.c: Same.
* gcc.dg/tree-ssa/loop-33.c: Same.
* gcc.dg/tree-ssa/loop-34.c: Same.
* gcc.dg/tree-ssa/loop-35.c: Same.
* gcc.dg/tree-ssa/loop-7.c: Same.
* gcc.dg/tree-ssa/pr23109.c: Same.
* gcc.dg/tree-ssa/restrict-2.c: Same.
* gcc.dg/tree-ssa/restrict-3.c: Same.
* gcc.dg/tree-ssa/ssa-lim-1.c: Same.
* gcc.dg/tree-ssa/ssa-lim-2.c: Same.
* gcc.dg/tree-ssa/ssa-lim-3.c: Same.
* gcc.dg/tree-ssa/ssa-lim-6.c: Same.
* gcc.dg/tree-ssa/structopt-1.c: Same.
* gcc.dg/vect/dump-tree-dceloop-pr26359.c: Same.
* gfortran.dg/pr32921.f: Same.
From-SVN: r150304
|
|
Linux/ia32)
PR middle-end/40830
* gcc.dg/vect/vect-pre-interact.c: XFAIL for no_align targets.
From-SVN: r150215
|
|
longer runs off array end.
* gcc.dg/vect/no-scevccp-noreassoc-outer-2.c: Extended array 'a'
so that indexing no longer runs off array end.
From-SVN: r150109
|
|
Linux/ia32)
PR middle-end/40830
* gcc.dg/vect/vect-pre-interact.c: Require vect_float, and
don't set options ourself.
From-SVN: r149999
|
|
created by predictive commoning or PRE)
PR tree-optimization/35229
PR tree-optimization/39300
* tree-ssa-pre.c (includes): Include tree-scalar-evolution.h.
(inhibit_phi_insertion): New function.
(insert_into_preds_of_block): Call it for REFERENCEs.
(init_pre): Initialize and finalize scalar evolutions.
* Makefile.in (tree-ssa-pre.o): Depend on tree-scalar-evolution.h .
testsuite/
* gcc.dg/vect/vect-pre-interact.c: New test.
From-SVN: r149942
|
|
2009-07-21 Paul Brook <paul@codesourcery.com>
gcc/
* tree-vectorizer.c (increase_alignment): Handle nested arrays.
Terminate debug dump with newline.
gcc/testsuite/
* gcc.dg/vect/section-anchors-nest-1.c: New test.
* lib/target-supports.exp (check_effective_target_section_anchors):
Add arm*-*-*.
From-SVN: r149853
|
|
* tree-vectorizer.h (vectorizable_condition): Add parameters.
* tree-vect-loop.c (vect_is_simple_reduction): Support COND_EXPR.
(get_initial_def_for_reduction): Likewise.
(vectorizable_reduction): Skip the check of first operand in case
of COND_EXPR. Add check that it is outer loop vectorization if
nested cycle was detected. Call vectorizable_condition() for
COND_EXPR. If reduction epilogue cannot be created do not fail for
nested cycles (if it is not double reduction). Assert that there
is only one type in the loop in case of COND_EXPR. Call
vectorizable_condition() to vectorize COND_EXPR.
* tree-vect-stmts.c (vectorizable_condition): Update comment.
Add parameters. Allow nested cycles if called from
vectorizable_reduction(). Use reduction vector variable if provided.
(vect_analyze_stmt): Call vectorizable_reduction() before
vectorizable_condition().
(vect_transform_stmt): Update call to vectorizable_condition().
From-SVN: r149806
|
|
additional argument.
* tree-parloops.c (loop_parallel_p): Call vect_is_simple_reduction
with additional argument.
* tree-vectorizer.h (enum vect_def_type): Add
vect_double_reduction_def.
(vect_is_simple_reduction): Add argument.
* tree-vect-loop.c (vect_determine_vectorization_factor): Fix
indentation.
(vect_analyze_scalar_cycles_1): Detect double reduction. Call
vect_is_simple_reduction with additional argument.
(vect_analyze_loop_operations): Handle exit phi nodes in case of
double reduction.
(reduction_code_for_scalar_code): Handle additional codes by
returning ERROR_MARK for them. Fix comment and indentation.
(vect_is_simple_reduction): Fix comment, add argument to specify
double reduction. Detect double reduction.
(get_initial_def_for_induction): Fix indentation.
(get_initial_def_for_reduction): Fix comment and indentation.
Handle double reduction. Create initial definitions that do not
require adjustment if ADJUSTMENT_DEF is NULL. Handle additional cases.
(vect_create_epilog_for_reduction): Fix comment, add argument to
handle double reduction. Use PLUS_EXPR in case of MINUS_EXPR in
epilogue result extraction. Create double reduction phi node and
replace relevant uses.
(vectorizable_reduction): Call vect_is_simple_reduction with
additional argument. Fix indentation. Update epilogue code treatment
according to the changes in reduction_code_for_scalar_code. Check
for double reduction. Call vect_create_epilog_for_reduction with
additional argument.
* tree-vect-stmts.c (process_use): Handle double reduction, update
documentation.
(vect_mark_stmts_to_be_vectorized): Handle double reduction.
(vect_get_vec_def_for_operand): Likewise.
From-SVN: r149526
|
|
2009-07-01 Richard Guenther <rguenther@suse.de>
PR tree-optimization/19831
* tree-ssa-dce.c (propagate_necessity): Calls to functions
that only act as barriers do not make any previous stores
necessary.
* tree-ssa-structalias.c (handle_lhs_call): Delay making
HEAP variables global, do not add a constraint from nonlocal.
(find_func_aliases): Handle escapes through return statements.
(compute_points_to_sets): Make escaped HEAP variables global.
* gcc.dg/tree-ssa/20041122-1.c: Enable TBAA, scan FRE dump,
make allocated memory escape. Un-XFAIL.
* gcc.dg/vect/pr21591.c: Make allocated memory escape.
* gcc.dg/vect/pr31699.c: Likewise.
* gcc.dg/tree-ssa/ssa-dce-7.c: New testcase.
libmudflap/
* testsuite/libmudflap.c/fail11-frag.c: Make allocated memory
escape.
* testsuite/libmudflap.c/fail12-frag.c: Likewise.
* testsuite/libmudflap.c/fail16-frag.c: Likewise.
* testsuite/libmudflap.c/fail31-frag.c: Likewise.
From-SVN: r149140
|
|
PR tree-optimization/40542
* tree-vect-stmts.c (vect_analyze_stmt): Don't vectorize volatile
types.
From-SVN: r149090
|
|
2009-06-27 Paolo Bonzini <bonzini@gnu.org>
PR testsuite/40567
* gcc.dg/vect/vect.exp: Fix lappend syntax.
From-SVN: r149006
|
|
PR testsuite/40565
* gcc.dg/vect/vect.exp: Add -fno-ipa-cp-clone to -O3 tests.
* gcc.target/i386/local.c: Pass a non-constant to T.
From-SVN: r149002
|
|
* gcc.dg/tree-ssa/fre-vce-1.c: Cleanup "fre" tree dump.
* gcc.dg/vect/vect-shift-2.c: Cleanup "vect" tree dump.
* gcc.dg/vect/vect.exp (VECT_SLP_CFLAGS): Initialize with original
DEFAULT_VECTFLAGS.
From-SVN: r148766
|
|
Co-Authored-By: Revital Eres <eres@il.ibm.com>
From-SVN: r148762
|
|
PR testsuite/40475
* gcc.dg/vect/vect-nest-cycle-1.c: Fail to vectorize on targets
without misalignment support.
* gcc.dg/vect/vect-nest-cycle-2.c: Likewise.
From-SVN: r148758
|
|
additional parameter.
* tree-parloops.c (loop_parallel_p): Call vect_is_simple_reduction
with additional parameter.
* tree-vectorizer.h (enum vect_def_type): Add new value
vect_nested_cycle.
(enum vect_relevant): Add comments.
(vect_is_simple_reduction): Add new argument.
* tree-vect-loop.c (vect_analyze_scalar_cycles_1): Add comments.
Detect nested cycles.
(vect_is_simple_reduction): Update documentation, add an argument to
distinguish inner-loop reduction from nested cycle, detect nested
cycles, fix printings and indentation, don't swap operands in case
of nested cycle.
(get_initial_def_for_reduction): Handle subtraction.
(vect_create_epilog_for_reduction): Add new argument to specify
reduction variable.
(vect_finalize_reduction): Handle subtraction, fix comments.
(vectorizable_reduction): Handle nested cycles. In case of nested cycle
keep track of the reduction variable position. Call
vect_is_simple_reduction with additional parameter. Use original
statement code in reduction epilogue for nested cycle. Call
vect_create_epilog_for_reduction with additional parameter.
* tree-vect-patterns.c (vect_recog_dot_prod_pattern): Assert inner-loop
vectorization.
(vect_recog_widen_sum_pattern): Likewise.
* tree-vect-stmts.c (process_use): Distinguish between nested cycles
and reductions.
(vect_mark_stmts_to_be_vectorized): Likewise.
(vect_get_vec_def_for_operand): Handle nested cycles.
From-SVN: r148518
|
|
test suite.)
PR40359
From-SVN: r148275
|
|
Co-Authored-By: Leehod Baruch <leehod@il.ibm.com>
From-SVN: r148211
|
|
2009-06-04 Steve Ellcey <sje@cup.hp.com>
* gcc.dg/vect/vect-42.c: Modify vect_no_align case.
* gcc.dg/vect/no-vfa-vect-43.c: Ditto.
From-SVN: r148177
|
|
PR testsuite/40244
* gcc.dg/vect/bb-slp-4.c: Change the number of data accesses to 2.
* gcc.dg/vect/bb-slp-10.c: Change the store misalignment to 1.
From-SVN: r148010
|
|
PR tree-optimization/40254
* tree-data-ref.c (dr_analyze_innermost): Take POFFSET into account
in analysis of basic blocks.
From-SVN: r147945
|
|
2009-05-25 Richard Guenther <rguenther@suse.de>
PR tree-optimization/36327
* tree-ssa-alias.c (walk_non_aliased_vuses): Add second walker
callback for reference translation or lookup at the point
of may-defs.
* tree-ssa-alias.h (walk_non_aliased_vuses): Adjust prototype.
* tree-ssa-sccvn.c (get_ref_from_reference_ops): Bail out
for union COMPONENT_REFs.
(vn_reference_lookup_3): New callback. Lookup from memset
and CONSTRUCTOR assignment, translate through struct copies.
(vn_reference_lookup_pieces): Make sure to not free the
passed operands array. Adjust walk_non_aliased_vuses call.
(vn_reference_lookup): Adjust walk_non_aliased_vuses call,
make sure we do not leak memory.
* gcc.dg/tree-ssa/ssa-fre-24.c: New testcase.
* gcc.dg/tree-ssa/ssa-fre-25.c: Likewise.
* gcc.dg/tree-ssa/sra-2.c: Disable FRE.
* gcc.dg/vect/no-vfa-vect-43.c: Adjust.
* gcc.dg/vect/vect-40.c: Likewise.
* gcc.dg/vect/vect-42.c: Likewise.
* gcc.dg/vect/vect-46.c: Likewise.
* gcc.dg/vect/vect-76.c: Likewise.
From-SVN: r147851
|
|
tree-cfg.c:4603)
PR tree-optimization/40238
* tree-vect-stmts.c (vect_init_vector): Insert initialization
statements after basic block's labels.
* tree-vect-slp.c (vect_slp_transform_bb): Call destroy_bb_vec_info()
to free the allocated memory.
From-SVN: r147844
|
|
* doc/passes.texi (Tree-SSA passes): Document SLP pass.
* tree-pass.h (pass_slp_vectorize): New pass.
* params.h (SLP_MAX_INSNS_IN_BB): Define.
* timevar.def (TV_TREE_SLP_VECTORIZATION): Define.
* tree-vectorizer.c (timevar.h): Include.
(user_vect_verbosity_level): Declare.
(vect_location): Fix comment.
(vect_set_verbosity_level): Update user_vect_verbosity_level
instead of vect_verbosity_level.
(vect_set_dump_settings): Add an argument. Ignore user defined
verbosity if dump flags require higher level of verbosity. Print to
stderr only for loop vectorization.
(vectorize_loops): Update call to vect_set_dump_settings.
(execute_vect_slp): New function.
(gate_vect_slp): Likewise.
(struct gimple_opt_pass pass_slp_vectorize): New.
* tree-vectorizer.h (struct _bb_vec_info): Define along macros to
access its members.
(vec_info_for_bb): New function.
(struct _stmt_vec_info): Add bb_vinfo and a macro for its access.
(VECTORIZATION_ENABLED): New macro.
(SLP_ENABLED, SLP_DISABLED): Likewise.
(vect_is_simple_use): Add bb_vec_info argument.
(new_stmt_vec_info, vect_analyze_data_ref_dependences,
vect_analyze_data_refs_alignment, vect_verify_datarefs_alignment,
vect_analyze_data_ref_accesses, vect_analyze_data_refs,
vect_schedule_slp, vect_analyze_slp): Likewise.
(vect_analyze_stmt): Add slp_tree argument.
(find_bb_location): Declare.
(vect_slp_analyze_bb, vect_slp_transform_bb): Likewise.
* tree-vect-loop.c (new_loop_vec_info): Adjust function calls.
(vect_analyze_loop_operations, vect_analyze_loop,
get_initial_def_for_induction, vect_create_epilog_for_reduction,
vect_finalize_reduction, vectorizable_reduction,
vectorizable_live_operation, vect_transform_loop): Likewise.
* tree-data-ref.c (dr_analyze_innermost): Update comment,
skip evolution analysis if analyzing a basic block.
(dr_analyze_indices): Likewise.
(initialize_data_dependence_relation): Skip the test whether the
object is invariant for basic blocks.
(compute_all_dependences): Skip dependence analysis for data
references in basic blocks.
(find_data_references_in_stmt): Don't fail in case of invariant
access in basic block.
(find_data_references_in_bb): New function.
(find_data_references_in_loop): Move code to
find_data_references_in_bb and add a call to it.
(compute_data_dependences_for_bb): New function.
* tree-data-ref.h (compute_data_dependences_for_bb): Declare.
* tree-vect-data-refs.c (vect_check_interleaving): Adjust to the case
that STEP is 0.
(vect_analyze_data_ref_dependence): Check for interleaving in case of
unknown dependence in basic block and fail in case of dependence in
basic block.
(vect_analyze_data_ref_dependences): Add bb_vinfo argument, get data
dependence instances from either loop or basic block vectorization
info.
(vect_compute_data_ref_alignment): Check if it is loop vectorization
before calling nested_in_vect_loop_p.
(vect_compute_data_refs_alignment): Add bb_vinfo argument, get data
dependence instances from either loop or basic block vectorization
info.
(vect_verify_datarefs_alignment): Likewise.
(vect_enhance_data_refs_alignment): Adjust function calls.
(vect_analyze_data_refs_alignment): Likewise.
(vect_analyze_group_access): Fix printing. Skip different checks if
DR_STEP is 0. Keep strided stores either in loop or basic block
vectorization data structure. Fix indentation.
(vect_analyze_data_ref_access): Fix comments, allow zero step in
basic blocks.
(vect_analyze_data_ref_accesses): Add bb_vinfo argument, get data
dependence instances from either loop or basic block vectorization
info.
(vect_analyze_data_refs): Update comment. Call
compute_data_dependences_for_bb to analyze basic blocks.
(vect_create_addr_base_for_vector_ref): Check for outer loop only in
case of loop vectorization. In case of basic block vectorization use
data-ref itself as a base.
(vect_create_data_ref_ptr): In case of basic block vectorization:
don't advance the pointer, add new statements before the current
statement. Adjust function calls.
(vect_supportable_dr_alignment): Support only aligned accesses in
basic block vectorization.
* common.opt (ftree-slp-vectorize): New flag.
* tree-vect-patterns.c (widened_name_p): Adjust function calls.
(vect_pattern_recog_1): Likewise.
* tree-vect-stmts.c (process_use): Likewise.
(vect_init_vector): Add new statements in the beginning of the basic
block in case of basic block SLP.
(vect_get_vec_def_for_operand): Adjust function calls.
(vect_finish_stmt_generation): Likewise.
(vectorizable_call): Add assert that it is loop vectorization, adjust
function calls.
(vectorizable_conversion, vectorizable_assignment): Likewise.
(vectorizable_operation): In case of basic block SLP, take
vectorization factor from statement's type and skip the relevance
check. Adjust function calls.
(vectorizable_type_demotion): Add assert that it is loop
vectorization, adjust function calls.
(vectorizable_type_promotion): Likewise.
(vectorizable_store): Check for outer loop only in case of loop
vectorization. Adjust function calls. For basic blocks, skip the
relevance check and don't advance pointers.
(vectorizable_load): Likewise.
(vectorizable_condition): Add assert that it is loop vectorization,
adjust function calls.
(vect_analyze_stmt): Add argument. In case of basic block SLP, check
that it is not reduction, get vector type, call only supported
functions, skip loop specific parts.
(vect_transform_stmt): Check for outer loop only in case of loop
vectorization.
(new_stmt_vec_info): Add new argument and initialize bb_vinfo.
(vect_is_simple_use): Fix comment, add new argument, fix conditions
for external definition.
* passes.c (pass_slp_vectorize): New pass.
* tree-vect-slp.c (find_bb_location): New function.
(vect_get_and_check_slp_defs): Add argument, adjust function calls,
check for patterns only in loops.
(vect_build_slp_tree): Add argument, adjust function calls, fail in
case of multiple types in basic block SLP.
(vect_mark_slp_stmts_relevant): New function.
(vect_supported_load_permutation_p): Fix comment.
(vect_analyze_slp_instance): Add argument. In case of basic block
SLP, take vectorization factor from statement's type, check that
unrolling factor is 1. Adjust function call. Save SLP instance in
either loop or basic block vectorization structure. Return FALSE,
if SLP failed.
(vect_analyze_slp): Add argument. Get strided stores groups from
either loop or basic block vectorization structure. Return FALSE
if basic block SLP failed.
(new_bb_vec_info): New function.
(destroy_bb_vec_info, vect_slp_analyze_node_operations,
vect_slp_analyze_operations, vect_slp_analyze_bb): Likewise.
(vect_schedule_slp): Add argument. Get SLP instances from either
loop or basic block vectorization structure. Set vectorization factor
to be 1 for basic block SLP.
(vect_slp_transform_bb): New function.
* params.def (PARAM_SLP_MAX_INSNS_IN_BB): Define.
From-SVN: r147829
|
|
* gcc.target/i386/align-main-1.c (check): Mark noinline.
* gcc.target/i386/align-main-2.c (check): Mark noinline.
* gcc.dg/ipa/ipa-4.c: Disable early inlining.
* gcc.dg/vect/vect-iv-10.c (main1): Mark noinline.
* gcc.dg/vect/costmodel/i386/costmodel-vect-33.c (main1): Mark noinline.
* gcc.dg/vect/costmodel/x86_64/costmodel-vect-33.c (main1): Mark noinline.
* gcc.dg/vect/pr31699.c (foo): Mark noinline.
* gcc.dg/vect/pr18400.c (main1): Mark noinline.
From-SVN: r147585
|
|
* gcc.dg/tree-ssa/loop-36.c: Reduce amount of iterations to 2 so unrolling
still happens.
* gcc.dg/ipa/ipacost-1.c: Prevent inlining
* gcc.dg/ipa/ipacost-2.c: Likewise.
* gcc.dg/vect/slp-3.c: Loop is no longer unrolled.
* tree-inline.c (estimate_operator_cost): Add operands;
when division happens by constant, it is cheap.
(estimate_num_insns): Loads and stores are not having cost of 0;
EH magic stuff is cheap; when computing runtime cost of switch,
use log2 base of amount of its cases; builtin_expect has cost of 0;
compute cost for moving return value of call.
(init_inline_once): Initialize time_based flags.
* tree-inline.h (eni_weights_d): Add time_based flag.
From-SVN: r147436
|
|
* gcc.dg/tree-ssa/pr21829.c: Simplify matching since
we now optimize better.
* gcc.dg/Wunreachable-8.c: Bogus warnings now come
out at different places.
* gcc.dg/vect/vect-92.c: Increase loop iteration count to prevent
unroling.
* gcc.dg/vect/vect-76.c: Likewise.
* gcc.dg/vect/vect-70.c: Likewise.
* gcc.dg/vect/vect-66.c: Likewise.
* gcc.dg/vect/no-section-anchors-vect-66.c: Likewise.
* gcc.dg/vect/slp-3.c: One of loops gets now fully unrolled.
* tree-ssa-loop-ivcanon.c: Include target.h
(struct loop_size): new structure.
(constant_after_peeling): New predicate.
(tree_estimate_loop_size): New function.
(estimated_unrolled_size): Rewrite for new estimates.
(try_unroll_loop_completely): Use new estimates.
* Makefile.in (tree-ssa-loop-ivcanon.o): Add dependenc on target.h
From-SVN: r147395
|