From patchwork Mon Apr 29 13:38:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 1092626 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-499844-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="AOW6SUIV"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44t5MY18rrz9s70 for ; Mon, 29 Apr 2019 23:38:14 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type; q=dns; s= default; b=bsbDrOTlR0ppC+/nndHL5UEVA3MAFp0OVrwdZ9KKoWyHv+5UxgR96 B/XqFo+6RFaJUm0H6Mo835eiXpok+TBWTOI1UVRontsX6PiyCYdzpmZe5RaZWhoe erma/O+wQGHICvJr6pZ859oZDV1DpFoRjeIh5b+lTMNaQ7RLrvAmYQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type; s= default; bh=06U1lajikieUAGoRMwNxJCXNmok=; b=AOW6SUIVVzbI6hvjyRTc rt3xKsTeUE/mlA4jv4wjOgwJBIc5PdJHor9BcAOHWWC6T4+2TzjyLY2W1HiMplYd Z8n1zTSn4hFTBpWUyW8+gTBZ74sd2IuXK4KwPPLno+fbUD4DFu6PnOAPciyOcznL jereJ2SNgbQRplUD8KLfqEU= Received: (qmail 29178 invoked by alias); 29 Apr 2019 13:38:07 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 29167 invoked by uid 89); 29 Apr 2019 13:38:06 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-9.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, SPF_PASS autolearn=ham version=3.3.1 spammy=relation, wondered, direction X-HELO: foss.arm.com Received: from usa-sjc-mx-foss1.foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 29 Apr 2019 13:38:05 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 77EFCA78 for ; Mon, 29 Apr 2019 06:38:03 -0700 (PDT) Received: from localhost (e121540-lin.manchester.arm.com [10.32.98.39]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id ECF543F71A for ; Mon, 29 Apr 2019 06:38:02 -0700 (PDT) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, richard.sandiford@arm.com Subject: Remove DDR_INNER_LOOP Date: Mon, 29 Apr 2019 14:38:01 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 ...since it was only ever zero in practice. I wondered about making it a symbolic constant instead, but it didn't seem worth it when there was only one user (and that user was part of the internal tree-data-ref.c implementation). Tested on aarch64-linux-gnu. OK to install? Richard 2019-04-29 Richard Sandiford gcc/ * tree-data-ref.h (data_dependence_relation::inner_loop): Delete. (DDR_INNER_LOOP): Likewise. * tree-data-ref.c (dump_data_dependence_relation): Update accordingly. (initialize_data_dependence_relation): Likewise. (insert_innermost_unit_dist_vector): Use 0 instead of DDR_INNER_LOOP. Index: gcc/tree-data-ref.h =================================================================== --- gcc/tree-data-ref.h 2019-04-08 21:55:28.062370229 +0100 +++ gcc/tree-data-ref.h 2019-04-29 14:37:00.562885087 +0100 @@ -347,10 +347,6 @@ struct data_dependence_relation /* The classic distance vector. */ vec dist_vects; - /* An index in loop_nest for the innermost loop that varies for - this data dependence relation. */ - unsigned inner_loop; - /* Is the dependence reversed with respect to the lexicographic order? */ bool reversed_p; @@ -406,7 +402,6 @@ #define DDR_LOOP_NEST(DDR) (DDR)->loop_n /* The size of the direction/distance vectors: the number of loops in the loop nest. */ #define DDR_NB_LOOPS(DDR) (DDR_LOOP_NEST (DDR).length ()) -#define DDR_INNER_LOOP(DDR) (DDR)->inner_loop #define DDR_SELF_REFERENCE(DDR) (DDR)->self_reference_p #define DDR_DIST_VECTS(DDR) ((DDR)->dist_vects) Index: gcc/tree-data-ref.c =================================================================== --- gcc/tree-data-ref.c 2019-04-23 09:21:46.866206044 +0100 +++ gcc/tree-data-ref.c 2019-04-29 14:37:00.562885087 +0100 @@ -460,7 +460,6 @@ dump_data_dependence_relation (FILE *out dump_subscript (outf, sub); } - fprintf (outf, " inner loop index: %d\n", DDR_INNER_LOOP (ddr)); fprintf (outf, " loop nest: ("); FOR_EACH_VEC_ELT (DDR_LOOP_NEST (ddr), i, loopi) fprintf (outf, "%d ", loopi->num); @@ -2643,7 +2642,6 @@ initialize_data_dependence_relation (str DDR_ARE_DEPENDENT (res) = NULL_TREE; DDR_SUBSCRIPTS (res).create (full_seq.length); DDR_LOOP_NEST (res) = loop_nest; - DDR_INNER_LOOP (res) = 0; DDR_SELF_REFERENCE (res) = false; for (i = 0; i < full_seq.length; ++i) @@ -4478,7 +4476,7 @@ insert_innermost_unit_dist_vector (struc { lambda_vector dist_v = lambda_vector_new (DDR_NB_LOOPS (ddr)); - dist_v[DDR_INNER_LOOP (ddr)] = 1; + dist_v[0] = 1; save_dist_v (ddr, dist_v); }