aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-loop-linear.c
diff options
context:
space:
mode:
authorDaniel Berlin <dberlin@dberlin.org>2004-11-03 17:32:34 +0000
committerDaniel Berlin <dberlin@gcc.gnu.org>2004-11-03 17:32:34 +0000
commitc4bda9f0cf757474d9970e3e9174a76eb31b0444 (patch)
tree8465e9dd44bb38c923701c2c41d78e75fb2c644d /gcc/tree-loop-linear.c
parent308d51892fb3d625bbaa1b458a52d72527fd92cc (diff)
downloadgcc-c4bda9f0cf757474d9970e3e9174a76eb31b0444.zip
gcc-c4bda9f0cf757474d9970e3e9174a76eb31b0444.tar.gz
gcc-c4bda9f0cf757474d9970e3e9174a76eb31b0444.tar.bz2
lambda-code.c (lambda_compute_auxillary_space): Update comments.
2004-11-02 Daniel Berlin <dberlin@dberlin.org> * lambda-code.c (lambda_compute_auxillary_space): Update comments. (lambda_compute_target_space). Ditto. * lambda.h (lambda_trans_matrix): Ditto. (lambda_linear_expression): Ditto. (lambda_body_vector): Ditto. (lambda_loopnest): Ditto. * tree-loop-linear.c (gather_interchange_stats): Combine tests, update comments, and remove pointless addition of 0. (linear_transform_loops): Update comments. From-SVN: r90029
Diffstat (limited to 'gcc/tree-loop-linear.c')
-rw-r--r--gcc/tree-loop-linear.c29
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++)
{