diff options
Diffstat (limited to 'gcc/tree-loop-linear.c')
-rw-r--r-- | gcc/tree-loop-linear.c | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/gcc/tree-loop-linear.c b/gcc/tree-loop-linear.c index 07afe5d..fcb93ea 100644 --- a/gcc/tree-loop-linear.c +++ b/gcc/tree-loop-linear.c @@ -88,7 +88,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA DEPENDENCE_STEPS = 3000 NB_DEPS_NOT_CARRIED_BY_LOOP = 7 ACCESS_STRIDES = 8010 - */ +*/ static void gather_interchange_stats (varray_type dependence_relations, @@ -112,21 +112,17 @@ gather_interchange_stats (varray_type dependence_relations, (struct data_dependence_relation *) VARRAY_GENERIC_PTR (dependence_relations, i); - /* Compute the dependence strides. */ + /* If we don't know anything about this dependence, or the distance + vector is NULL, or there is no dependence, then there is no reuse of + data. */ - if (DDR_ARE_DEPENDENT (ddr) == chrec_dont_know) - { - (*dependence_steps) += 0; - continue; - } + if (DDR_DIST_VECT (ddr) == NULL + || DDR_ARE_DEPENDENT (ddr) == chrec_dont_know + || DDR_ARE_DEPENDENT (ddr) == chrec_known) + continue; + - /* When we know that there is no dependence, we know that there - is no reuse of the data. */ - if (DDR_ARE_DEPENDENT (ddr) == chrec_known) - { - (*dependence_steps) += 0; - continue; - } + dist = DDR_DIST_VECT (ddr)[loop_number]; if (dist == 0) (*nb_deps_not_carried_by_loop) += 1; @@ -164,7 +160,8 @@ gather_interchange_stats (varray_type dependence_relations, } } -/* Apply to TRANS any loop interchange that minimize inner loop steps. +/* Attempt to apply interchange transformations to TRANS to maximize the + spatial and temporal locality of the loop. Returns the new transform matrix. The smaller the reuse vector distances in the inner loops, the fewer the cache misses. FIRST_LOOP is the loop->num of the first loop in the analyzed loop @@ -238,7 +235,7 @@ void linear_transform_loops (struct loops *loops) { unsigned int i; - + compute_immediate_uses (TDFA_USE_OPS | TDFA_USE_VOPS, NULL); for (i = 1; i < loops->num; i++) { |