From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 111626 invoked by alias); 30 Jun 2015 15:47:59 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 111556 invoked by uid 89); 30 Jun 2015 15:47:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,FREEMAIL_REPLY,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 X-HELO: BLU004-OMC3S10.hotmail.com Received: from blu004-omc3s10.hotmail.com (HELO BLU004-OMC3S10.hotmail.com) (65.55.116.85) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA256 encrypted) ESMTPS; Tue, 30 Jun 2015 15:47:57 +0000 Received: from BLU179-W36 ([65.55.116.73]) by BLU004-OMC3S10.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Tue, 30 Jun 2015 08:47:55 -0700 X-TMN: [GukfxI9srf1Wt3txWfYzqfHl3DlGtygK] Message-ID: From: Aditya K To: Tobias Grosser , Sebastian Pop CC: GCC Patches Subject: RE: [PATCH] Discard Scops for which entry==exit Date: Tue, 30 Jun 2015 15:49:00 -0000 In-Reply-To: <559232F5.4040206@grosser.es> References: <1435608255-10186-1-git-send-email-hiraditya@msn.com>,,<559232F5.4040206@grosser.es> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-SW-Source: 2015-06/txt/msg02235.txt.bz2 Hi Tobias, A test case (gcc/testsuite/gcc.dg/graphite/pr18792.c)=A0came up when we rem= oved `graphite-scop-detection.c:limit_scops'. The test case is a scop where entry=3D=3Dexit, BB5 (*#) -> BB6 (#); BB6 -> BB5; In this case BB2 is out of the scop. This is basically an empty (infinite) = loop with no entry. -- (gdb) p debug_loops(3) loop_0 (header =3D 0, latch =3D 1, niter =3D ) { =A0 bb_2 (preds =3D {bb_0 }, succs =3D {bb_8 bb_3 }) =A0 { =A0 =A0 : =A0 =A0 # VUSE <.MEM_7(D)> =A0 =A0 _5 =3D *x_10(D)[3]; =A0 =A0 if (_5 < 0.0) =A0 =A0 =A0 goto ; =A0 =A0 else =A0 =A0 =A0 goto ; =A0 } =A0 bb_3 (preds =3D {bb_2 }, succs =3D {bb_4 bb_7 }) =A0 { =A0 =A0 : =A0 =A0 if (_5>=3D 0.0) =A0 =A0 =A0 goto ; =A0 =A0 else =A0 =A0 =A0 goto ; =A0 } =A0 bb_4 (preds =3D {bb_3 bb_8 }, succs =3D {bb_9 }) =A0 { =A0 =A0 : =A0 =A0 # .MEM_19 =3D PHI <.MEM_7(D)(3), .MEM_14(8)> =A0 } =A0 bb_9 (preds =3D {bb_4 }, succs =3D {bb_5 }) =A0 { =A0 =A0 : =A0 } =A0 bb_7 (preds =3D {bb_3 }, succs =3D {bb_1 }) =A0 { =A0 =A0 : =A0 =A0 # VUSE <.MEM_7(D)> =A0 =A0 return; =A0 } =A0 bb_8 (preds =3D {bb_2 }, succs =3D {bb_4 }) =A0 { =A0 =A0 : =A0 =A0 # .MEM_14 =3D VDEF <.MEM_7(D)> =A0 =A0 *x_10(D)[3] =3D 0.0; =A0 =A0 goto ; =A0 } =A0 loop_2 (header =3D 5, latch =3D 6, niter =3D scev_not_known) =A0 { =A0 =A0 bb_5 (preds =3D {bb_9 bb_6 }, succs =3D {bb_6 }) =A0 =A0 { =A0 =A0 =A0 : =A0 =A0 =A0 # .MEM_25 =3D PHI <.MEM_19(9), .MEM_25(6)> =A0 =A0 } =A0 =A0 bb_6 (preds =3D {bb_5 }, succs =3D {bb_5 }) =A0 =A0 { =A0 =A0 =A0 : =A0 =A0 =A0 goto ; =A0 =A0 } =A0 } } digraph all { 0 [label=3D< =A0 =A0 =A0 =A0
0
>, shape=3Dbox, style=3D"setlinewidth(0)"] 2 [label=3D< =A0 =A0 =A0 =A0
2
>, shape=3Dbox, style=3D"setlinewidth(0)"] 3 [label=3D< =A0 =A0 =A0 =A0
3
>, shape=3Dbox, style=3D"setlinewidth(0)"] 4 [label=3D< =A0 =A0 =A0 =A0
4
>, shape=3Dbox, style=3D"setlinewidth(0)"] 9 [label=3D< =A0 =A0 =A0 =A0
9
>, shape=3Dbox, style=3D"setlinewidth(0)"] 5 [label=3D< =A0 =A0 =A0 =A0
5*#
>, shape=3Dbox, style=3D"setlinewidth(0)"] 6 [label=3D< =A0 =A0 =A0 =A0
6
>, shape=3Dbox, style=3D"setlinewidth(0)"] 7 [label=3D< =A0 =A0 =A0 =A0
7
>, shape=3Dbox, style=3D"setlinewidth(0)"] 8 [label=3D< =A0 =A0 =A0 =A0
8
>, shape=3Dbox, style=3D"setlinewidth(0)"] 1 [label=3D< =A0 =A0 =A0 =A0
1
>, shape=3Dbox, style=3D"setlinewidth(0)"] 0 -> 2; 2 -> 8; 2 -> 3; 3 -> 4; 3 -> 7; 4 -> 9; 9 -> 5; 5 -> 6; 6 -> 5; 7 -> 1; 8 -> 4; } -Aditya ---------------------------------------- > Date: Tue, 30 Jun 2015 08:11:01 +0200 > From: tobias@grosser.es > To: sebpop@gmail.com; hiraditya@msn.com > CC: gcc-patches@gcc.gnu.org > Subject: Re: [PATCH] Discard Scops for which entry=3D=3Dexit > > On 06/30/2015 02:09 AM, Sebastian Pop wrote: >> On Mon, Jun 29, 2015 at 3:04 PM, Aditya Kumar wrote: >>> 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 en= try=3D=3Dexit >> >> Looks good to me. >> Let's wait on comments from Tobi before pushing this patch. > > Hi Sebastian, > > the commit message should probably give a short reasoning why scops with > entry =3D=3D exit need to be discarded. I currently don't see why they wo= uld > be incorrect/problematic (despite being possibly very small/empty). > > Tobias =20=09=09=20=09=20=20=20=09=09=20=20