diff options
author | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-30 21:20:45 +0000 |
---|---|---|
committer | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-30 21:20:45 +0000 |
commit | d60a90cc037ebd32b381caade044f10f660bbc3f (patch) | |
tree | 77b4af2c50159c96052312846c33a591f9c1a01a /gcc/graphite-poly.c | |
parent | 079f4f8cd67b42448aeb0d9155aafb5c2b662745 (diff) | |
download | gcc-d60a90cc037ebd32b381caade044f10f660bbc3f.tar.gz |
New pass: loop flattening.
2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
* Makefile.in (OBJS-common): Add graphite-flattening.o.
(graphite-flattening.o): New rule.
* common.opt (floop-flatten): New flag.
* doc/invoke.texi (-floop-flatten): Documented.
* graphite-flattening.c: New.
* graphite-poly.c (apply_poly_transforms): Call flatten_all_loops.
* graphite-poly.h (flatten_all_loops): Declared.
(lst_remove_loop_and_inline_stmts_in_loop_father): New.
* tree-ssa-loop.c (gate_graphite_transforms): When flag_loop_flatten
is set, also set flag_graphite.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164804 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/graphite-poly.c')
-rw-r--r-- | gcc/graphite-poly.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/graphite-poly.c b/gcc/graphite-poly.c index 4214f9e9e5f..e09b570ab05 100644 --- a/gcc/graphite-poly.c +++ b/gcc/graphite-poly.c @@ -783,6 +783,9 @@ apply_poly_transforms (scop_p scop) transform_done |= scop_do_interchange (scop); } + if (flag_loop_flatten) + transform_done |= flatten_all_loops (scop); + /* This feature is only enabled in the Graphite branch. */ if (0) { @@ -1688,7 +1691,8 @@ pbb_number_of_iterations_at_time (poly_bb_p pbb, ppl_delete_Constraint_System (cs); } - /* Compute the lower bound on the original iteration domain. */ + /* Compute the lower bound on the original iteration domain and add + it to the scattering. */ ppl_new_Pointset_Powerset_C_Polyhedron_from_C_Polyhedron (&sctr_lb, PBB_TRANSFORMED_SCATTERING (pbb)); for (i = 0; i < (int) domain_dim; i++) |