summaryrefslogtreecommitdiff
path: root/gcc/lambda-trans.c
diff options
context:
space:
mode:
authorlauras <lauras@138bc75d-0d04-0410-961f-82ee72b054a4>2010-04-22 12:42:15 +0000
committerlauras <lauras@138bc75d-0d04-0410-961f-82ee72b054a4>2010-04-22 12:42:15 +0000
commit1e33ad50b5d37f30af9e92c75a3d30f5d5b2d312 (patch)
tree378620453122ae49e7bf7e0d9a64259baa14bbcd /gcc/lambda-trans.c
parent0ca212b8bd0fdb1d7d94c440a9b3c4ca66b242d5 (diff)
downloadgcc-1e33ad50b5d37f30af9e92c75a3d30f5d5b2d312.tar.gz
2010-04-22 Laurynas Biveinis <laurynas.biveinis@gmail.com>
* tree-parloops.c (loop_parallel_p): New argument parloop_obstack. Pass it down. (parallelize_loops): New variable parloop_obstack. Initialize it, pass it down, free it. * tree-loop-linear.c (linear_transform_loops): Pass down lambda_obstack. * tree-data-ref.h (lambda_compute_access_matrices): New argument of type struct obstack *. * tree-data-ref.c (analyze_subscript_affine_affine): New variable scratch_obstack. Initialize it, pass down, free it. * lambda.h (lambda_loop_new): Remove. (lambda_matrix_new, lambda_matrix_inverse) (lambda_trans_matrix_new, lambda_trans_matrix_inverse): New argument of type struct obstack *. * lambda-trans.c (lambda_trans_matrix_new): New argument lambda_obstack. Pass it down, use obstack allocation for ret. (lambda_trans_matrix_inverse): New argument lambda_obstack. Pass it down. * lambda-mat.c (lambda_matrix_get_column) (lambda_matrix_project_to_null): Remove. (lambda_matrix_new): New argument lambda_obstack. Use obstack allocation for mat. (lambda_matrix_inverse_hard, lambda_matrix_inverse): New argument lambda_obstack. * lambda-code.c (lambda_loop_new): New function. (lambda_lattice_new, compute_nest_using_fourier_motzkin) (lambda_compute_auxillary_space, lambda_compute_target_space) (lambda_loopnest_transform, gcc_loop_to_lambda_loop) (lambda_loopnest_to_gcc_loopnest): Pass down lambda_obstack. (build_access_matrix): New argument lambda_obstack. Use obstack allocation for am. (lambda_compute_step_signs, lambda_compute_access_matrices): New argument lambda_obstack. Pass it down. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158644 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lambda-trans.c')
-rw-r--r--gcc/lambda-trans.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/gcc/lambda-trans.c b/gcc/lambda-trans.c
index d34a63e2e86..0cf1db96fa6 100644
--- a/gcc/lambda-trans.c
+++ b/gcc/lambda-trans.c
@@ -31,12 +31,14 @@ along with GCC; see the file COPYING3. If not see
/* Allocate a new transformation matrix. */
lambda_trans_matrix
-lambda_trans_matrix_new (int colsize, int rowsize)
+lambda_trans_matrix_new (int colsize, int rowsize,
+ struct obstack * lambda_obstack)
{
lambda_trans_matrix ret;
- ret = GGC_NEW (struct lambda_trans_matrix_s);
- LTM_MATRIX (ret) = lambda_matrix_new (rowsize, colsize);
+ ret = (lambda_trans_matrix)
+ obstack_alloc (lambda_obstack, sizeof (struct lambda_trans_matrix_s));
+ LTM_MATRIX (ret) = lambda_matrix_new (rowsize, colsize, lambda_obstack);
LTM_ROWSIZE (ret) = rowsize;
LTM_COLSIZE (ret) = colsize;
LTM_DENOMINATOR (ret) = 1;
@@ -57,14 +59,16 @@ lambda_trans_matrix_id_p (lambda_trans_matrix mat)
/* Compute the inverse of the transformation matrix MAT. */
lambda_trans_matrix
-lambda_trans_matrix_inverse (lambda_trans_matrix mat)
+lambda_trans_matrix_inverse (lambda_trans_matrix mat,
+ struct obstack * lambda_obstack)
{
lambda_trans_matrix inverse;
int determinant;
- inverse = lambda_trans_matrix_new (LTM_ROWSIZE (mat), LTM_COLSIZE (mat));
+ inverse = lambda_trans_matrix_new (LTM_ROWSIZE (mat), LTM_COLSIZE (mat),
+ lambda_obstack);
determinant = lambda_matrix_inverse (LTM_MATRIX (mat), LTM_MATRIX (inverse),
- LTM_ROWSIZE (mat));
+ LTM_ROWSIZE (mat), lambda_obstack);
LTM_DENOMINATOR (inverse) = determinant;
return inverse;
}