From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id A4D27385843B for ; Wed, 15 Dec 2021 15:56:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A4D27385843B 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: QyCjiAqyr7k+y0pFqZud91Ko6yAJPvNs8PaFYt6OyjLC1m+wEyAUrtKCRvSKyTsOImU7KapKHZ ZKeD+WTL0+gcOdcYQGyckJqDShNFRRei3ORCK9AUyxrzPA8GNEbH5Da1yrKu8PQ0s9zJv+kyB3 TGrQXMJ9Ek/n84k0GBiqmwKW+BMo5mNqzh7lrBeRq5Z6kvSuKw7PJTYuAUAIGt9tJEMjN4+Nu3 1Q3yb7Jg0NnNrNuu2H26KeQHFdKAYAr7grgOx4Yqc8D6tVmYwP7di6j1KKMQNXmilazJ28vhy6 43AkNAcevHBFlSPj7eY6Kcm3 X-IronPort-AV: E=Sophos;i="5.88,207,1635235200"; d="scan'208";a="69738376" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa4.mentor.iphmx.com with ESMTP; 15 Dec 2021 07:56:03 -0800 IronPort-SDR: eBhrp8VIo52c/ud8hR80ZA+oZFd7AXnKzU6aNBfJ7IqCA92JJIIg6kCw6PbFwDBQP5LhbyqJvt sb8VhGbTRkqMm7+DXaLdkHUb+uRJ43x/PC2yuUJvc0VmZ/9yKjb5rJXAJW8mGo06sS40BNOqjm YDCpw5H02qfsUZ2DvJd6RJxFF30wob0nx9I/gW6ZO3wSwjyU2bNYw4fGvLm5e45s4Eq4P5eqgp vRNdqi1sL5O+oFmYBryCgcBaKj+nV4LWKK6bp1lVfry0iL1yM6cWDGSSL1jMYsTH68WKnGuXTz m2w= From: Frederik Harwath To: CC: , , , Subject: [PATCH 16/40] graphite: Rename isl_id_for_ssa_name Date: Wed, 15 Dec 2021 16:54:23 +0100 Message-ID: <20211215155447.19379-17-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 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: SVR-IES-MBX-08.mgc.mentorg.com (139.181.222.8) 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: , X-List-Received-Date: Wed, 15 Dec 2021 15:56:06 -0000 The SSA names for which this function gets used are always SCoP parameters and hence "isl_id_for_parameter" is a better name. It also explains the prefix "P_" for those names in the ISL representation. gcc/ChangeLog: * graphite-sese-to-poly.c (isl_id_for_ssa_name): Rename to ... (isl_id_for_parameter): ... this new function name. (build_scop_context): Adjust function use. --- gcc/graphite-sese-to-poly.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c index 99ea0327b1a7..204d382ed4cc 100644 --- a/gcc/graphite-sese-to-poly.c +++ b/gcc/graphite-sese-to-poly.c @@ -100,14 +100,15 @@ extract_affine_mul (scop_p s, tree e, __isl_take isl_= space *space) return isl_pw_aff_mul (lhs, rhs); } -/* Return an isl identifier from the name of the ssa_name E. */ +/* Return an isl identifier for the parameter P. */ static isl_id * -isl_id_for_ssa_name (scop_p s, tree e) +isl_id_for_parameter (scop_p s, tree p) { - char name1[14]; - snprintf (name1, sizeof (name1), "P_%d", SSA_NAME_VERSION (e)); - return isl_id_alloc (s->isl_context, name1, e); + gcc_checking_assert (TREE_CODE (p) =3D=3D SSA_NAME); + char name[14]; + snprintf (name, sizeof (name), "P_%d", SSA_NAME_VERSION (p)); + return isl_id_alloc (s->isl_context, name, p); } /* Return an isl identifier for the data reference DR. Data references an= d @@ -898,15 +899,15 @@ build_scop_context (scop_p scop) isl_space *space =3D isl_space_set_alloc (scop->isl_context, nbp, 0); unsigned i; - tree e; - FOR_EACH_VEC_ELT (region->params, i, e) + tree p; + FOR_EACH_VEC_ELT (region->params, i, p) space =3D isl_space_set_dim_id (space, isl_dim_param, i, - isl_id_for_ssa_name (scop, e)); + isl_id_for_parameter (scop, p)); scop->param_context =3D isl_set_universe (space); - FOR_EACH_VEC_ELT (region->params, i, e) - add_param_constraints (scop, i, e); + FOR_EACH_VEC_ELT (region->params, i, p) + add_param_constraints (scop, i, p); } /* Return true when loop A is nested in loop B. */ -- 2.33.0 ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=DFe 201, 8= 0634 M=FCnchen; Gesellschaft mit beschr=E4nkter Haftung; Gesch=E4ftsf=FChre= r: Thomas Heurung, Frank Th=FCrauf; Sitz der Gesellschaft: M=FCnchen; Regis= tergericht M=FCnchen, HRB 106955