From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28659 invoked by alias); 28 May 2011 14:19:52 -0000 Received: (qmail 28648 invoked by uid 22791); 28 May 2011 14:19:51 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST X-Spam-Check-By: sourceware.org Received: from mail-qy0-f175.google.com (HELO mail-qy0-f175.google.com) (209.85.216.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 28 May 2011 14:19:38 +0000 Received: by qyk35 with SMTP id 35so236058qyk.20 for ; Sat, 28 May 2011 07:19:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.118.72 with SMTP id u8mr2274579qcq.1.1306592377394; Sat, 28 May 2011 07:19:37 -0700 (PDT) Received: by 10.229.11.143 with HTTP; Sat, 28 May 2011 07:19:37 -0700 (PDT) In-Reply-To: References: Date: Sat, 28 May 2011 17:25:00 -0000 Message-ID: Subject: Re: [patch] [2/2] Support reduction in loop SLP From: "H.J. Lu" To: Ira Rosen Cc: gcc-patches@gcc.gnu.org, Patch Tracking Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes 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 X-SW-Source: 2011-05/txt/msg02239.txt.bz2 On Tue, May 17, 2011 at 11:03 PM, Ira Rosen wrote: > This part adds the actual code for reduction support. > > Bootstrapped and tested on powerpc64-suse-linux. > I am planning to apply it later today. > > Ira > > ChangeLog: > > =A0 =A0 =A0 =A0PR tree-optimization/41881 > =A0 =A0 =A0 =A0* tree-vectorizer.h (struct _loop_vec_info): Add new field > reduction_chains along with a macro for > =A0 =A0 =A0 =A0its access. > =A0 =A0 =A0 =A0* tree-vect-loop.c (new_loop_vec_info): Initialize reducti= on chains. > =A0 =A0 =A0 =A0(destroy_loop_vec_info): Free reduction chains. > =A0 =A0 =A0 =A0(vect_analyze_loop_2): Return false if vect_analyze_slp() = returns false. > =A0 =A0 =A0 =A0(vect_is_slp_reduction): New function. > =A0 =A0 =A0 =A0(vect_is_simple_reduction_1): Call vect_is_slp_reduction. > =A0 =A0 =A0 =A0(vect_create_epilog_for_reduction): Support SLP reduction = chains. > =A0 =A0 =A0 =A0* tree-vect-slp.c (vect_get_and_check_slp_defs): Allow dif= ferent > definition types for reduction > =A0 =A0 =A0 =A0chains. > =A0 =A0 =A0 =A0(vect_supported_load_permutation_p): Don't allow permutati= ons for > reduction chains. > =A0 =A0 =A0 =A0(vect_analyze_slp_instance): Support reduction chains. > =A0 =A0 =A0 =A0(vect_analyze_slp): Try to build SLP instance from reducti= on chains. > =A0 =A0 =A0 =A0(vect_get_constant_vectors): =A0Handle reduction chains. > =A0 =A0 =A0 =A0(vect_schedule_slp_instance): Mark the first statement of = the > reduction chain as reduction. > > testsuite/ChangeLog: > > =A0 =A0 =A0 =A0PR tree-optimization/41881 > =A0 =A0 =A0 =A0* gcc.dg/vect/O3-pr41881.c: New test. > =A0 =A0 =A0 =A0* gcc.dg/vect/O3-slp-reduc-10.c: New test. > This caused: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D49199 --=20 H.J.