From patchwork Fri Nov 4 10:52:53 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ira Rosen X-Patchwork-Id: 4935 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id E6F8E23DC3 for ; Fri, 4 Nov 2011 10:52:58 +0000 (UTC) Received: from mail-fx0-f52.google.com (mail-fx0-f52.google.com [209.85.161.52]) by fiordland.canonical.com (Postfix) with ESMTP id C076CA180E9 for ; Fri, 4 Nov 2011 10:52:58 +0000 (UTC) Received: by faan26 with SMTP id n26so3627779faa.11 for ; Fri, 04 Nov 2011 03:52:58 -0700 (PDT) Received: by 10.152.106.115 with SMTP id gt19mr784474lab.27.1320403978431; Fri, 04 Nov 2011 03:52:58 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.14.103 with SMTP id o7cs120041lac; Fri, 4 Nov 2011 03:52:56 -0700 (PDT) Received: by 10.229.235.2 with SMTP id ke2mr1701246qcb.298.1320403974330; Fri, 04 Nov 2011 03:52:54 -0700 (PDT) Received: from mail-qw0-f50.google.com (mail-qw0-f50.google.com [209.85.216.50]) by mx.google.com with ESMTPS id y2si1634938qcw.33.2011.11.04.03.52.53 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 04 Nov 2011 03:52:54 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.216.50 is neither permitted nor denied by best guess record for domain of ira.rosen@linaro.org) client-ip=209.85.216.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.216.50 is neither permitted nor denied by best guess record for domain of ira.rosen@linaro.org) smtp.mail=ira.rosen@linaro.org Received: by qan41 with SMTP id 41so2529387qan.37 for ; Fri, 04 Nov 2011 03:52:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.50.140.1 with SMTP id rc1mr11368063igb.25.1320403973442; Fri, 04 Nov 2011 03:52:53 -0700 (PDT) Received: by 10.142.14.1 with HTTP; Fri, 4 Nov 2011 03:52:53 -0700 (PDT) In-Reply-To: <20111104075055.GG1052@tyan-ft48-01.lab.bos.redhat.com> References: <20111104075055.GG1052@tyan-ft48-01.lab.bos.redhat.com> Date: Fri, 4 Nov 2011 12:52:53 +0200 Message-ID: Subject: Re: [patch] Rewrite SLP analysis towards support of operations with any number of operands From: Ira Rosen To: Jakub Jelinek Cc: gcc-patches@gcc.gnu.org, Patch Tracking On 4 November 2011 09:50, Jakub Jelinek wrote: > The Changelog entry doesn't mention tree-vect-data-refs.c at all, yet > the patch modifies it and the commit too. > To me it looks like you've reverted the tree-vect-data-refs.c part > of your PR50730 > http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=180367 > change and as can be seen on gcc-testresults, the testcase now fails > FAIL: gcc.dg/vect/no-tree-sra-bb-slp-pr50730.c scan-tree-dump-times slp "not vectorized: more than one data ref in stmt" 0 > > Was it intentional? No, I don't understand how it happened. Thanks for noticing! I'll unrevert it after testing on powerpc64-suse-linux. Thanks, Ira > > >        Jakub > Index: ChangeLog =================================================================== --- ChangeLog (revision 180930) +++ ChangeLog (working copy) @@ -1,3 +1,12 @@ +2011-11-04 Ira Rosen + + Unrevert: + 2011-10-24 Ira Rosen + + PR tree-optimization/50730 + * tree-vect-data-refs.c (vect_analyze_data_refs): Stop basic block + analysis if encountered unsupported data-ref. + 2011-11-04 Tristan Gingold * config/alpha/alpha.c (alpha_write_linkage): Remove fundecl Index: tree-vect-data-refs.c =================================================================== --- tree-vect-data-refs.c (revision 180930) +++ tree-vect-data-refs.c (working copy) @@ -2524,7 +2524,7 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo, VEC (data_reference_p, heap) *datarefs; struct data_reference *dr; tree scalar_type; - bool res; + bool res, stop_bb_analysis = false; if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "=== vect_analyze_data_refs ===\n"); @@ -2586,6 +2586,12 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo, stmt = DR_STMT (dr); stmt_info = vinfo_for_stmt (stmt); + if (stop_bb_analysis) + { + STMT_VINFO_VECTORIZABLE (stmt_info) = false; + continue; + } + /* Check that analysis of the data-ref succeeded. */ if (!DR_BASE_ADDRESS (dr) || !DR_OFFSET (dr) || !DR_INIT (dr) || !DR_STEP (dr)) @@ -2596,6 +2602,13 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo, print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM); } + if (bb_vinfo) + { + STMT_VINFO_VECTORIZABLE (stmt_info) = false; + stop_bb_analysis = true; + continue; + } + return false; } @@ -2604,7 +2617,15 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo, if (vect_print_dump_info (REPORT_UNVECTORIZED_LOCATIONS)) fprintf (vect_dump, "not vectorized: base addr of dr is a " "constant"); - return false; + + if (bb_vinfo) + { + STMT_VINFO_VECTORIZABLE (stmt_info) = false; + stop_bb_analysis = true; + continue; + } + + return false; } if (TREE_THIS_VOLATILE (DR_REF (dr))) @@ -2614,6 +2635,14 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo, fprintf (vect_dump, "not vectorized: volatile type "); print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM); } + + if (bb_vinfo) + { + STMT_VINFO_VECTORIZABLE (stmt_info) = false; + stop_bb_analysis = true; + continue; + } + return false; } @@ -2629,6 +2658,14 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo, "exception "); print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM); } + + if (bb_vinfo) + { + STMT_VINFO_VECTORIZABLE (stmt_info) = false; + stop_bb_analysis = true; + continue; + } + return false; } @@ -2746,6 +2783,14 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo, "not vectorized: more than one data ref in stmt: "); print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM); } + + if (bb_vinfo) + { + STMT_VINFO_VECTORIZABLE (stmt_info) = false; + stop_bb_analysis = true; + continue; + } + return false; } @@ -2770,6 +2815,7 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo, { /* Mark the statement as not vectorizable. */ STMT_VINFO_VECTORIZABLE (stmt_info) = false; + stop_bb_analysis = true; continue; } else