From patchwork Wed Dec 15 15:54:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Frederik Harwath X-Patchwork-Id: 48973 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9AA02385781E for ; Wed, 15 Dec 2021 16:15:43 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by sourceware.org (Postfix) with ESMTPS id 2B1D6385800B for ; Wed, 15 Dec 2021 15:57:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2B1D6385800B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com IronPort-SDR: TXJXRqhymGi+Z+EYqdoI/m2/FtOP+Q06ygo+VW+NVsfBytMZpSCtrmOaVMQzM+InYuLE0l86fJ fTHHOm5YC1iDBaN7r3ovWsuA1G75DcFTqBNxmQi//r0RWFCbCeHIL0mWFY8ouRv2QJr8GO5uwW hs7ij9uE5z3Sg0c+qCtX78juBg2jMacWPmrGscDcRpC1v7ly1WTwHW5w+SwAoUaXmGhWfTH2ab T2ryqs13yj5kevaIWdV/GQZFMAXTYmQfBeBNspZaaGVuqQn2DM3ARtIyxxaOkDvox47fp4VGbI t22gcBpmxblEanFiKSvqfYLq X-IronPort-AV: E=Sophos;i="5.88,207,1635235200"; d="scan'208";a="69736628" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa2.mentor.iphmx.com with ESMTP; 15 Dec 2021 07:57:00 -0800 IronPort-SDR: lFZSWeokgWB8a//NbQRLhsWnRaDqFmjxu26r4ihoU+r30VxNw0YMOBlev0rkgJsyjCraDIdK7r w1wXmz6E/+uLFjxRBlw/EIkmwXxBGS8TfBueGZCLcwdVBSYUFRCbF3/cX1YwnygPQClvGQ8UzY Z5lgWlLACi3WtkEOfRBAq+PvR/Rame9wnJkyNu/sTpMiXG3Dp59ucXu4gtDC1jyBapYdPachje i6W05BNScgtyxDayN3n71CVMM6FX65t2OvXbD4yvdSRuM0njLC/paP/5qzWQFVOf4ZnROEXDSx PVs= From: Frederik Harwath To: Subject: [PATCH 31/40] graphite: Accept loops without data references Date: Wed, 15 Dec 2021 16:54:38 +0100 Message-ID: <20211215155447.19379-32-frederik@codesourcery.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211215155447.19379-1-frederik@codesourcery.com> References: <20211215155447.19379-1-frederik@codesourcery.com> MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: rguenther@suse.de, sebpop@gmail.com, thomas@codesourcery.com, grosser@fim.uni-passau.de Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" It seems that the check that rejects loops without data references is only included to avoid handling non-profitable loops. Including those loops in Graphite's analysis enables more consistent diagnostic messages in OpenACC "kernels" code and does not introduce any testsuite regressions. If executing Graphite on loops without data references leads to noticeable compile time slow-downs for non-OpenACC users of Graphite, the check can be re-introduced but restricted to non-OpenACC functions. gcc/ChangeLog: * graphite-scop-detection.c (scop_detection::harmful_loop_in_region): Remove check for loops without data references. --- gcc/graphite-scop-detection.c | 13 ------------- 1 file changed, 13 deletions(-) -- 2.33.0 ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-scop-detection.c index f173e6c4f890..2dcb85508a3d 100644 --- a/gcc/graphite-scop-detection.c +++ b/gcc/graphite-scop-detection.c @@ -849,19 +849,6 @@ scop_detection::harmful_loop_in_region (sese_l scop) const return true; } - /* Check if all loop nests have at least one data reference. - ??? This check is expensive and loops premature at this point. - If important to retain we can pre-compute this for all innermost - loops and reject those when we build a SESE region for a loop - during SESE discovery. */ - if (! loop->inner - && ! loop_nest_has_data_refs (loop)) - { - DEBUG_PRINT (dp << "[scop-detection-fail] loop_" << loop->num - << " does not have any data reference.\n"); - return true; - } - DEBUG_PRINT (dp << "[scop-detection] loop_" << loop->num << " is harmless.\n"); }