aboutsummaryrefslogtreecommitdiff
path: root/gcc/graphite-sese-to-poly.c
diff options
context:
space:
mode:
authorAditya Kumar <hiraditya@msn.com>2015-10-06 15:56:09 +0000
committerSebastian Pop <spop@gcc.gnu.org>2015-10-06 15:56:09 +0000
commit216cc294ef714ffc4634e7ac6139550515acae3a (patch)
tree821a193faee8968c0ce737e35bd1e68ee7355f15 /gcc/graphite-sese-to-poly.c
parent8e4dc590c8878aaae1cdf5db6cbf84f8546b6511 (diff)
downloadgcc-216cc294ef714ffc4634e7ac6139550515acae3a.zip
gcc-216cc294ef714ffc4634e7ac6139550515acae3a.tar.gz
gcc-216cc294ef714ffc4634e7ac6139550515acae3a.tar.bz2
Early exit to avoid redundant computations
Analyze only those bbs which are outside the region for uses which might be defined inside the region. This is intended to improve the compile time. This algorithm may be further improved by only looking at the successors of region as these regions are sese. Added FIXMEs to make this improvement in future. Passes regtest and bootstrap on x86_64. gcc/ChangeLog: 2015-10-05 Aditya Kumar <hiraditya@msn.com> * graphite-sese-to-poly.c (build_loop_iteration_domains): Only loops which are in this region are passed so gcc_assert and remove redundant computation. * sese.c (sese_build_liveouts): Pass only those bbs which are not in region. (sese_bad_liveouts_use): Only BBs which are not in region are passed so gcc_assert on that and remove unnecessary computation. (sese_build_liveouts_use): Same. From-SVN: r228529
Diffstat (limited to 'gcc/graphite-sese-to-poly.c')
-rw-r--r--gcc/graphite-sese-to-poly.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c
index 15d16c1..d0c7eb4 100644
--- a/gcc/graphite-sese-to-poly.c
+++ b/gcc/graphite-sese-to-poly.c
@@ -595,6 +595,7 @@ build_loop_iteration_domains (scop_p scop, struct loop *loop,
tree nb_iters = number_of_latch_executions (loop);
sese region = SCOP_REGION (scop);
+ gcc_assert (loop_in_sese_p (loop, region));
isl_set *inner = isl_set_copy (outer);
int pos = isl_set_dim (outer, isl_dim_set);
@@ -679,7 +680,7 @@ build_loop_iteration_domains (scop_p scop, struct loop *loop,
else
gcc_unreachable ();
- if (loop->inner && loop_in_sese_p (loop->inner, region))
+ if (loop->inner)
build_loop_iteration_domains (scop, loop->inner, nb + 1,
isl_set_copy (inner), doms);