public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Aditya K <hiraditya@msn.com>
To: Tobias Grosser <tobias@grosser.es>, Sebastian Pop <sebpop@gmail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: RE: [PATCH] Discard Scops for which entry==exit
Date: Thu, 02 Jul 2015 15:37:00 -0000	[thread overview]
Message-ID: <BLU179-W45A1512E6820B747F23278B6970@phx.gbl> (raw)
In-Reply-To: <5594EDF5.9030404@grosser.es>

A test case (gcc/testsuite/gcc.dg/graphite/pr18792.c) came up when we removed `graphite-scop-detection.c:limit_scops'.
The test case is a scop where entry==exit,

BB5 (*#) -> BB6 (#);
BB6 -> BB5;

In this case BB2 is out of the scop. This is basically an empty (infinite) loop.



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



----------------------------------------
> Date: Thu, 2 Jul 2015 09:53:25 +0200
> From: tobias@grosser.es
> To: hiraditya@msn.com; sebpop@gmail.com
> CC: gcc-patches@gcc.gnu.org
> Subject: Re: [PATCH] Discard Scops for which entry==exit
>
> On 06/30/2015 05:47 PM, Aditya K wrote:
>> Hi Tobias,
>> A test case (gcc/testsuite/gcc.dg/graphite/pr18792.c) came up when we removed `graphite-scop-detection.c:limit_scops'.
>> The test case is a scop where entry==exit,
>>
>> BB5 (*#) -> BB6 (#);
>> BB6 -> BB5;
>>
>> In this case BB2 is out of the scop. This is basically an empty (infinite) loop with no entr
>
> OK, maybe mention this in the commit message.
>
>
> Best,
> Tobias
>
 		 	   		  

  reply	other threads:[~2015-07-02 15:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-29 20:25 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 [this message]
2015-07-02 15:42           ` Tobias Grosser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BLU179-W45A1512E6820B747F23278B6970@phx.gbl \
    --to=hiraditya@msn.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=sebpop@gmail.com \
    --cc=tobias@grosser.es \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).