From 216cc294ef714ffc4634e7ac6139550515acae3a Mon Sep 17 00:00:00 2001 From: Aditya Kumar Date: Tue, 6 Oct 2015 15:56:09 +0000 Subject: 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 * 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 --- gcc/graphite-sese-to-poly.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/graphite-sese-to-poly.c') 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); -- cgit v1.1