From d7f49f78a6446d958486ce2c96ed1727f6eca83e Mon Sep 17 00:00:00 2001 From: Aditya Kumar Date: Wed, 15 Jul 2015 21:37:01 +0000 Subject: [PATCH] [graphite] discard scops for which entry==exit In this patch we discard the scops where entry and exit are the same BB. This is an effort to remove graphite-scop-detection.c:limit_scops. Removing the limit_scops function introduces correctness regressions. We are making relevant changes in incremental steps to fix those bugs, and finally we intend to remove limit_scops. 2015-06-29 Aditya Kumar Sebastian Pop * graphite-scop-detection.c (build_scops_1): Discard scops for which entry==exit Co-Authored-By: Sebastian Pop From-SVN: r225850 --- gcc/ChangeLog | 6 ++++++ gcc/graphite-scop-detection.c | 9 ++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6600494d878e..82ef7ecddcc6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-07-15 Aditya Kumar + Sebastian Pop + + * graphite-scop-detection.c (build_scops_1): Discard scops for + which entry==exit. + 2015-07-15 Aditya Kumar Sebastian Pop diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-scop-detection.c index b45a6823df17..4fb4e028ac1e 100644 --- a/gcc/graphite-scop-detection.c +++ b/gcc/graphite-scop-detection.c @@ -794,7 +794,14 @@ build_scops_1 (basic_block current, loop_p outermost_loop, { open_scop.exit = sinfo.exit; gcc_assert (open_scop.exit); - scops->safe_push (open_scop); + if (open_scop.entry != open_scop.exit) + scops->safe_push (open_scop); + else + { + sinfo.difficult = true; + sinfo.exits = false; + sinfo.exit = NULL; + } } result.exit = sinfo.exit; -- 2.39.2