aboutsummaryrefslogtreecommitdiff
path: root/gcc/lambda-code.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/lambda-code.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/lambda-code.c')
-rw-r--r--gcc/lambda-code.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/gcc/lambda-code.c b/gcc/lambda-code.c
index d564f43..0d066b9 100644
--- a/gcc/lambda-code.c
+++ b/gcc/lambda-code.c
@@ -651,7 +651,19 @@ compute_nest_using_fourier_motzkin (int size,
}
/* Compute the loop bounds for the auxiliary space NEST.
- Input system used is Ax <= b. TRANS is the unimodular transformation. */
+ Input system used is Ax <= b. TRANS is the unimodular transformation.
+ Given the original nest, this function will
+ 1. Convert the nest into matrix form, which consists of a matrix for the
+ coefficients, a matrix for the
+ invariant coefficients, and a vector for the constants.
+ 2. Use the matrix form to calculate the lattice base for the nest (which is
+ a dense space)
+ 3. Compose the dense space transform with the user specified transform, to
+ get a transform we can easily calculate transformed bounds for.
+ 4. Multiply the composed transformation matrix times the matrix form of the
+ loop.
+ 5. Transform the newly created matrix (from step 4) back into a loop nest
+ using fourier motzkin elimination to figure out the bounds. */
static lambda_loopnest
lambda_compute_auxillary_space (lambda_loopnest nest,
@@ -786,9 +798,11 @@ lambda_compute_auxillary_space (lambda_loopnest nest,
}
/* Compute the loop bounds for the target space, using the bounds of
- the auxiliary nest AUXILLARY_NEST, and the triangular matrix H. This is
- done by matrix multiplication and then transformation of the new matrix
- back into linear expression form.
+ the auxiliary nest AUXILLARY_NEST, and the triangular matrix H.
+ The target space loop bounds are computed by multiplying the triangular
+ matrix H by the auxillary nest, to get the new loop bounds. The sign of
+ the loop steps (positive or negative) is then used to swap the bounds if
+ the loop counts downwards.
Return the target loopnest. */
static lambda_loopnest