summaryrefslogtreecommitdiff
path: root/gcc/tree-loop-linear.c
diff options
context:
space:
mode:
authorSebastian Pop <sebastian.pop@amd.com>2008-10-15 16:13:33 +0000
committerSebastian Pop <spop@gcc.gnu.org>2008-10-15 16:13:33 +0000
commit36174c82ee3314e97e8750909f5ff61b7dccbb1b (patch)
tree2a696ea15c824e9308e4456e69b42c210b4e281b /gcc/tree-loop-linear.c
parentfb06824788e06fcc4d2ba65724feae2bf5cfed15 (diff)
downloadgcc-36174c82ee3314e97e8750909f5ff61b7dccbb1b.tar.gz
re PR tree-optimization/37686 (Building of CPU2000's bzip2 with peak flags with -mcpu=power4 fails with an ICE.)
2008-10-15 Sebastian Pop <sebastian.pop@amd.com> PR tree-optimization/37686 * testsuite/gcc.dg/tree-ssa/pr37686.c: New. * tree-loop-linear.c (linear_transform_loops): Build a loop nest vector. Pass it to lambda_compute_access_matrices. * tree-data-ref.h (struct access_matrix): Store the loop nest relative to which it encodes the information. (AM_LOOP_NEST_NUM): Renamed AM_LOOP_NEST. (am_vector_index_for_loop): Reimplemented: iterate over the loop nest for finding the loop index in the access matrix. (lambda_compute_access_matrices): Update declaration. * lambda-code.c (build_access_matrix): Pass the loop nest and record it. (lambda_compute_access_matrices): Same. From-SVN: r141141
Diffstat (limited to 'gcc/tree-loop-linear.c')
-rw-r--r--gcc/tree-loop-linear.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/tree-loop-linear.c b/gcc/tree-loop-linear.c
index a97433bf909..8b57e2acf10 100644
--- a/gcc/tree-loop-linear.c
+++ b/gcc/tree-loop-linear.c
@@ -333,11 +333,16 @@ linear_transform_loops (void)
lambda_loopnest before, after;
lambda_trans_matrix trans;
struct obstack lambda_obstack;
+ struct loop *loop;
+ VEC(loop_p,heap) *nest = VEC_alloc (loop_p, heap, 3);
depth = perfect_loop_nest_depth (loop_nest);
if (depth == 0)
continue;
+ for (loop = loop_nest; loop; loop = loop->inner)
+ VEC_safe_push (loop_p, heap, nest, loop);
+
gcc_obstack_init (&lambda_obstack);
VEC_truncate (tree, oldivs, 0);
VEC_truncate (tree, invariants, 0);
@@ -350,8 +355,7 @@ linear_transform_loops (void)
goto free_and_continue;
lambda_collect_parameters (datarefs, &lambda_parameters);
- if (!lambda_compute_access_matrices (datarefs, lambda_parameters,
- loop_nest->num))
+ if (!lambda_compute_access_matrices (datarefs, lambda_parameters, nest))
goto free_and_continue;
if (dump_file && (dump_flags & TDF_DETAILS))
@@ -410,6 +414,7 @@ linear_transform_loops (void)
obstack_free (&lambda_obstack, NULL);
free_dependence_relations (dependence_relations);
free_data_refs (datarefs);
+ VEC_free (loop_p, heap, nest);
}
for (i = 0; VEC_iterate (gimple, remove_ivs, i, oldiv_stmt); i++)