public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Discard Scops for which entry==exit
@ 2015-06-29 20:25 Aditya Kumar
  2015-06-30  0:13 ` Sebastian Pop
  0 siblings, 1 reply; 8+ messages in thread
From: Aditya Kumar @ 2015-06-29 20:25 UTC (permalink / raw)
  To: hiraditya, gcc-patches, spop

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  <aditya.k7@samsung.com>
	    Sebastian Pop <s.pop@samsung.com>

        * graphite-scop-detection.c (build_scops_1): Discard scops for which entry==exit


---
 gcc/graphite-scop-detection.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-scop-detection.c
index e8ddecd..f57cc4a 100644
--- a/gcc/graphite-scop-detection.c
+++ b/gcc/graphite-scop-detection.c
@@ -810,7 +810,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.1.0.243.g30d45f7

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-07-02 15:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-29 20:25 [PATCH] Discard Scops for which entry==exit Aditya Kumar
2015-06-30  0:13 ` Sebastian Pop
2015-06-30  6:11   ` Tobias Grosser
2015-06-30  7:56     ` Richard Biener
2015-06-30 15:49     ` Aditya K
2015-07-02  7:53       ` Tobias Grosser
2015-07-02 15:37         ` Aditya K
2015-07-02 15:42           ` Tobias Grosser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).