From patchwork Wed Nov 17 16:03:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Frederik Harwath X-Patchwork-Id: 47834 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 382B1385841C for ; Wed, 17 Nov 2021 16:21:56 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id 9DA613858436 for ; Wed, 17 Nov 2021 16:05:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9DA613858436 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: +M90g2q1yRhnIvD48LILbOqgl6sb9U6pRyvkX/Nxi/GjU/4QXoIjgDJD4fceclyzDMjpEled53 1IEpAtu4v/PyT6EW1BcVskrI2tCWV1nVgmMnLhMSFvQe/BgquVZQ1PEb6Tngxa+FuUDURVhP1Z wA5oONLPO4YblPyiVyU1dVBhG4vZyGKIrSX06/QaL5FbunBQn/zLWZg7DLgurYDMED+Fpyqq0y Ts40oQakCx3YBmyXMpDjY/ZR9DwrdFE5fcz9gq9OIRZrFNpgNE6re9JrDDeNpxz132h8AUU+a9 K5zZROKB6Iu0usfUnGnYHLYU X-IronPort-AV: E=Sophos;i="5.87,241,1631606400"; d="scan'208";a="71081364" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa1.mentor.iphmx.com with ESMTP; 17 Nov 2021 08:05:06 -0800 IronPort-SDR: TCrf9jtTOs6M5s+gotr6DEzlck2LaD9ypTaEkG3+XTQ7VwlEbFOUmEsXwjH4xHWVpeuVuEqdDU Omq0s/HIAH6D4uBdiueSNdfVf6bHgLxdqq4G5v0juBgXk5UvJx3pIKNQ74m2rBRh9qhxS/NrCq HlerFd+yhv3SOWDdgyFIN9Fq6A/EKav9gOV1X4VpgJCK+24E4+kVJKfVoJPCnbkAIbADBBHaex Ot/kKCZtQj3vpbjd1VPdSL/0E0oj+QgdqJ3q1Zd6+FgGTaXPWkkrKqbKT1ocV1b6Idyo6mqB2s kdY= From: Frederik Harwath To: Subject: [OG11][committed][PATCH 21/22] graphite: Accept loops without data references Date: Wed, 17 Nov 2021 17:03:29 +0100 Message-ID: <20211117160330.20029-21-frederik@codesourcery.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211117160330.20029-1-frederik@codesourcery.com> References: <20211117160330.20029-1-frederik@codesourcery.com> MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-05.mgc.mentorg.com (139.181.222.5) To SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) X-Spam-Status: No, score=-12.6 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: , 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 99e906a5d120..9311a0e42a57 100644 --- a/gcc/graphite-scop-detection.c +++ b/gcc/graphite-scop-detection.c @@ -851,19 +851,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"); }