From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 91882 invoked by alias); 30 Jun 2015 07:56:22 -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 91868 invoked by uid 89); 30 Jun 2015 07:56:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-oi0-f52.google.com Received: from mail-oi0-f52.google.com (HELO mail-oi0-f52.google.com) (209.85.218.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 30 Jun 2015 07:56:20 +0000 Received: by oigx81 with SMTP id x81so1557218oig.1 for ; Tue, 30 Jun 2015 00:56:18 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.202.172.150 with SMTP id v144mr7461987oie.51.1435650978676; Tue, 30 Jun 2015 00:56:18 -0700 (PDT) Received: by 10.76.115.167 with HTTP; Tue, 30 Jun 2015 00:56:18 -0700 (PDT) In-Reply-To: <5592335B.7090806@grosser.es> References: <1435611532-31080-1-git-send-email-hiraditya@msn.com> <5592335B.7090806@grosser.es> Date: Tue, 30 Jun 2015 08:16:00 -0000 Message-ID: Subject: Re: [PATCH] Graphite cannot handle return stmt From: Richard Biener To: Tobias Grosser Cc: Sebastian Pop , Aditya Kumar , GCC Patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-06/txt/msg02158.txt.bz2 On Tue, Jun 30, 2015 at 8:12 AM, Tobias Grosser wrote: > On 06/30/2015 02:12 AM, Sebastian Pop wrote: >> >> On Mon, Jun 29, 2015 at 3:58 PM, Aditya Kumar wrote: >>> >>> No regressions. >>> >>> 2015-06-29 Aditya Kumar >>> Sebastian Pop >>> >>> * graphite-scop-detection.c (stmt_simple_for_scop_p): Bail out >>> in case of a return statement. >> >> >> Looks good to me. >> Tobi, do you see a good reason not to cut scops at return stmts? > > > Return stmts in a SCoP are definitely invalid. Now, as in my last email, I > wonder why this is not a positive list. There are probably a lot of gimple > codes that are invalid inside scops. By default we should refuse everything > we do _not_ know. The function already does that. It just accepted GIMPLE_RETURN as valid. IMHO a default: gcc_unreachable (); is the best style as it forces you to list everything explicitely. The function should be refactored to do all codes in the switch stmt (GIMPLE_ASMs are handled in a if, so are GIMPLE_DEBUG for example). Richard. > Best, > Tobias