From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9712 invoked by alias); 25 Aug 2015 19:36:18 -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 9703 invoked by uid 89); 25 Aug 2015 19:36:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 25 Aug 2015 19:36:16 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id AD0B55BA13; Tue, 25 Aug 2015 19:36:15 +0000 (UTC) Received: from localhost.localdomain (ovpn-113-93.phx2.redhat.com [10.3.113.93]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t7PJaFkJ008940; Tue, 25 Aug 2015 15:36:15 -0400 Subject: Re: [PATCH 2/5] completely_scalarize arrays as well as records To: Alan Lawrence , gcc-patches@gcc.gnu.org References: <1440500777-25966-1-git-send-email-alan.lawrence@arm.com> <1440500777-25966-3-git-send-email-alan.lawrence@arm.com> Cc: rguenther@suse.de, mjambor@suse.cz From: Jeff Law Message-ID: <55DCC3AE.3000403@redhat.com> Date: Tue, 25 Aug 2015 19:40:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <1440500777-25966-3-git-send-email-alan.lawrence@arm.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-08/txt/msg01541.txt.bz2 On 08/25/2015 05:06 AM, Alan Lawrence wrote: > This changes the completely_scalarize_record path to also work on arrays (thus > allowing records containing arrays, etc.). This just required extending the > existing type_consists_of_records_p and completely_scalarize_record methods > to handle things of ARRAY_TYPE as well as RECORD_TYPE. Hence, I renamed both > methods so as not to mention 'record'. > > Bootstrapped + check-gcc on aarch64-none-linux-gnu, arm-none-linux-gnueabihf and x86_64-none-linux-gnu. > > Have also verified the scan-tree-dump check in the new sra-15.c passes (using a stage 1 compiler only, no execution test) on alpha, hppa, powerpc, sparc, avr and sh. > > gcc/ChangeLog: > > * tree-sra.c (type_consists_of_records_p): Rename to... > (scalarizable_type_p): ...this, add case for ARRAY_TYPE. > > (completely_scalarize_record): Rename to... > (completely_scalarize): ...this, add ARRAY_TYPE case, move some code to: > (scalarize_elem): New. > > gcc/testsuite/ChangeLog: > * gcc.dg/tree-ssa/sra-15.c: New. > --- > gcc/testsuite/gcc.dg/tree-ssa/sra-15.c | 38 +++++++++ > gcc/tree-sra.c | 146 ++++++++++++++++++++++----------- > 2 files changed, 135 insertions(+), 49 deletions(-) > create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/sra-15.c > > diff --git a/gcc/testsuite/gcc.dg/tree-ssa/sra-15.c b/gcc/testsuite/gcc.dg/tree-ssa/sra-15.c > new file mode 100644 > index 0000000..e251058 > --- /dev/null > +++ b/gcc/testsuite/gcc.dg/tree-ssa/sra-15.c > @@ -0,0 +1,38 @@ > +/* Verify that SRA total scalarization works on records containing arrays. */ > +/* Test skipped for targets with small (often default) MOVE_RATIO. */ ?!? I don't see anything that skips this test for any targets. Presumably this was copied from sra-12.c. I suspect this comment should just be removed. With that comment removed from the testcase, this is OK. jeff