diff options
author | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-03-26 20:48:05 +0000 |
---|---|---|
committer | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-03-26 20:48:05 +0000 |
commit | b44d10464569641729bf31f7363aa4aae089947e (patch) | |
tree | 99a886cf9eb5495a779c7221d1a028574d5e242d /gcc/tree-vect-analyze.c | |
parent | 7107738f3ecbe5d7f06b9bc50b3658c094332a03 (diff) | |
download | gcc-b44d10464569641729bf31f7363aa4aae089947e.tar.gz |
* tree-data-ref.c: Rename DDR_SIZE_VECT to DDR_NB_LOOPS.
(subscript_dependence_tester_1): Declared.
(print_dir_vectors, print_dist_vectors): New.
(debug_data_dependence_relation): New.
(dump_data_dependence_relation): Print more details.
(initialize_data_dependence_relation): Initialize DDR_LOOP_NEST.
(analyze_subscript_affine_affine): Don't ICE when gcd_alpha_beta is 0.
(save_dist_v, save_dir_v, add_outer_distances,
build_classic_dist_vector_1): New.
(build_classic_dist_vector): Rewrite to work on DDR_LOOP_NEST.
Don't test for lambda_vector_lexico_pos.
(same_access_functions, add_multivariate_self_dist,
add_other_self_distances, dir_from_dist): New.
(build_classic_dir_vector): Replace implementation almost identical to
build_classic_dist_vector with a walk of DDR_DIST_VECTS with a call to
dir_from_dist.
(subscript_dependence_tester_1): New.
(subscript_dependence_tester): Handle the lexicographically negative
distance vectors by recomputing the dependence relation.
(compute_affine_dependence): Remove parameter loop_nest_depth.
(compute_self_dependence): Don't call compute_subscript_distance.
(compute_all_dependences): Remove parameters nb_loops, loop_nest_depth.
Add a parameter for the loop_nest.
(find_loop_nest_1, find_loop_nest): New.
(compute_data_dependences_for_loop): Compute the loop nest, and give
up if the nest is not well formed.
* tree-data-ref.h (loop_p): New.
(struct data_dependence_relation): Replace size_vect field with
loop_nest, a vec of loops.
(DDR_SIZE_VECT): Renamed DDR_NB_LOOPS.
(DDR_LOOP_NEST): New.
(print_dir_vectors, print_dist_vectors,
debug_data_dependence_relation): Declared.
(index_in_loop_nest): New.
* tree-vect-analyze.c (vect_analyze_data_ref_dependence): Use
DDR_LOOP_NEST and index_in_loop_nest to determine the dependence
distance.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@112399 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vect-analyze.c')
-rw-r--r-- | gcc/tree-vect-analyze.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/gcc/tree-vect-analyze.c b/gcc/tree-vect-analyze.c index c5882d42afb..8afaa1b3719 100644 --- a/gcc/tree-vect-analyze.c +++ b/gcc/tree-vect-analyze.c @@ -584,12 +584,12 @@ vect_analyze_data_ref_dependence (struct data_dependence_relation *ddr, unsigned int i; struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo); int vectorization_factor = LOOP_VINFO_VECT_FACTOR (loop_vinfo); - unsigned int loop_depth = 0; - struct loop *loop_nest = loop; struct data_reference *dra = DDR_A (ddr); struct data_reference *drb = DDR_B (ddr); stmt_vec_info stmtinfo_a = vinfo_for_stmt (DR_STMT (dra)); stmt_vec_info stmtinfo_b = vinfo_for_stmt (DR_STMT (drb)); + lambda_vector dist_v; + unsigned int loop_depth; if (DDR_ARE_DEPENDENT (ddr) == chrec_known) return false; @@ -619,16 +619,10 @@ vect_analyze_data_ref_dependence (struct data_dependence_relation *ddr, return true; } - /* Find loop depth. */ - while (loop_nest && loop_nest->outer && loop_nest->outer->outer) + loop_depth = index_in_loop_nest (loop->num, DDR_LOOP_NEST (ddr)); + for (i = 0; VEC_iterate (lambda_vector, DDR_DIST_VECTS (ddr), i, dist_v); i++) { - loop_nest = loop_nest->outer; - loop_depth++; - } - - for (i = 0; i < DDR_NUM_DIST_VECTS (ddr); i++) - { - int dist = DDR_DIST_VECT (ddr, i)[loop_depth]; + int dist = dist_v[loop_depth]; if (vect_print_dump_info (REPORT_DR_DETAILS)) fprintf (vect_dump, "dependence distance = %d.", dist); |