From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 118954 invoked by alias); 16 Nov 2015 18:35:41 -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 118944 invoked by uid 89); 16 Nov 2015 18:35:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (207.82.80.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 16 Nov 2015 18:35:39 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-16-iotHNYktQfWw4pDzVImAZw-1; Mon, 16 Nov 2015 18:35:34 +0000 Received: from e105915-lin.cambridge.arm.com ([10.1.2.79]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 16 Nov 2015 18:35:34 +0000 Subject: Re: [PATCH] Improve BB vectorization dependence analysis To: Richard Biener , gcc-patches@gcc.gnu.org References: From: Alan Lawrence Message-ID: <564A21F6.3020507@arm.com> Date: Mon, 16 Nov 2015 18:35:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: X-MC-Unique: iotHNYktQfWw4pDzVImAZw-1 Content-Type: text/plain; charset=WINDOWS-1252; format=flowed Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg01983.txt.bz2 On 09/11/15 12:55, Richard Biener wrote: > > Currently BB vectorization computes all dependences inside a BB > region and fails all vectorization if it cannot handle some of them. > > This is obviously not needed - BB vectorization can restrict the > dependence tests to those that are needed to apply the load/store > motion effectively performed by the vectorization (sinking all > participating loads/stores to the place of the last one). > > With restructuring it that way it's also easy to not give up completely > but only for the SLP instance we cannot vectorize (this gives > a slight bump in my SPEC CPU 2006 testing to 756 vectorized basic > block regions). > > But first and foremost this patch is to reduce the dependence analysis > cost and somewhat mitigate the compile-time effects of the first patch. > > For fixing PR56118 only a cost model issue remains. > > Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. > > Richard. > > 2015-11-09 Richard Biener > > PR tree-optimization/56118 > * tree-vectorizer.h (vect_find_last_scalar_stmt_in_slp): Declare. > * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Export. > * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): New > function. > (vect_slp_analyze_data_ref_dependences): Instead of computing > all dependences of the region DRs just analyze the code motions > SLP vectorization will perform. Remove SLP instances that > cannot have their store/load motions applied. > (vect_analyze_data_refs): Allow DRs without a vectype > in BB vectorization. > > * gcc.dg/vect/no-tree-sra-bb-slp-pr50730.c: Adjust. Since this, I've been seeing an ICE on gfortran.dg/vect/vect-9.f90 at on bo= th=20 aarch64-none-linux-gnu and arm-none-linux-gnueabihf: spawn /home/alalaw01/build/gcc/testsuite/gfortran4/../../gfortran=20 -B/home/alalaw01/build/gcc/testsuite/gfortran4/../../=20 -B/home/alalaw01/build/aarch64-unknown-linux-gnu/./libgfortran/=20 /home/alalaw01/gcc/gcc/testsuite/gfortran.dg/vect/vect-9.f90=20 -fno-diagnostics-show-caret -fdiagnostics-color=3Dnever -O -O2 -ftree-vecto= rize=20 -fvect-cost-model=3Dunlimited -fdump-tree-vect-details -Ofast -S -o vect-9.s /home/alalaw01/gcc/gcc/testsuite/gfortran.dg/vect/vect-9.f90:5:0: Error:=20 definition in block 13 follows the use for SSA_NAME: _339 in statement: vectp.156_387 =3D &*cc_36(D)[_339]; /home/alalaw01/gcc/gcc/testsuite/gfortran.dg/vect/vect-9.f90:5:0: internal= =20 compiler error: verify_ssa failed 0xcfc61b verify_ssa(bool, bool) ../../gcc-fsf/gcc/tree-ssa.c:1039 0xa2fc0b execute_function_todo ../../gcc-fsf/gcc/passes.c:1952 0xa30393 do_per_function ../../gcc-fsf/gcc/passes.c:1632 0xa3058f execute_todo ../../gcc-fsf/gcc/passes.c:2000 Please submit a full bug report... FAIL: gfortran.dg/vect/vect-9.f90 -O (internal compiler error) FAIL: gfortran.dg/vect/vect-9.f90 -O (test for excess errors) Still there (on aarch64) at r230329. --Alan