From patchwork Tue Nov 10 10:11:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Greenhalgh X-Patchwork-Id: 56293 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp678194lbb; Tue, 10 Nov 2015 02:11:55 -0800 (PST) X-Received: by 10.67.24.97 with SMTP id ih1mr4309129pad.65.1447150315147; Tue, 10 Nov 2015 02:11:55 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id lk6si4225664pab.151.2015.11.10.02.11.54 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Nov 2015 02:11:55 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-413453-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gcc-patches-return-413453-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-413453-patch=linaro.org@gcc.gnu.org; dkim=pass header.i=@gcc.gnu.org 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:cc:subject:date:message-id:mime-version:content-type; q=dns; s=default; b=xLu0GBsXE8kM+tNn3qfw9UgPGRNsYUxcLtVa3g1Zz6+UbS0ajd faLRiA2bigf+lAb0xC2dWy23C4WYKSLk9o91wAEM5xRVHMgzNTmZ5kVH1ze+B81z lA/x+cy8IRU66iuOuA/TFIJFEW0GhgV01b1s1YUcMyZ5NnYBvfjnkZEA4= 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:cc:subject:date:message-id:mime-version:content-type; s= default; bh=OnLpWpd0eBYcI8Bkp7nPGGdRnmQ=; b=C32KBcV6Fp4MfDgyhYcY 02JhSg+0BB7fY/K3Ndpb4bfMZpzhXSKHfT5/WAO8UgQnX2kMdZhGhOvDjbjdNS5V 70+ofauzrvaRCVPo/POmmlci2Fyxf88RK+y8gwTbQuwZv+hyUq3N1kWtC5yHEGkd xq2O3bCYufRN7kmjZvpUUVM= Received: (qmail 51992 invoked by alias); 10 Nov 2015 10:11:42 -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 51979 invoked by uid 89); 10 Nov 2015 10:11:41 -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) (146.101.78.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 10 Nov 2015 10:11:40 +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-1-ycVCdwzDSjK5FIU3EeCxgg-1; Tue, 10 Nov 2015 10:11:35 +0000 Received: from e107456-lin.cambridge.arm.com ([10.1.2.79]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 10 Nov 2015 10:11:34 +0000 From: James Greenhalgh To: gcc-patches@gcc.gnu.org Cc: richard.guenther@gmail.com Subject: [Patch GCC 5/Vect] Partial backport of r228751 (pr68238) Date: Tue, 10 Nov 2015 10:11:30 +0000 Message-Id: <1447150290-5815-1-git-send-email-james.greenhalgh@arm.com> MIME-Version: 1.0 X-MC-Unique: ycVCdwzDSjK5FIU3EeCxgg-1 X-IsSubscribed: yes Hi, As requested in the PR, this patch is a partial backport of r228751. I can't claim any responsibility for it, but I did take it through the paces on an aarch64-none-linux-gnu and x86_64-none-linux-gnu bootstrap/ test run and found no issues. Applied as r230092 on gcc-5-branch (pre-approved in the PR) after checking that it gives the right results for the code I derived the PR from. I'll start a test cycle for a 4.9 backport. Thanks, James --- 2015-11-09 James Greenhalgh Partial backport from trunk r228751. PR tree-optimization/68238 2015-10-13 Richard Biener * tree-vect-loop.c (vect_estimate_min_profitable_iters): Use LOOP_VINFO_COMP_ALIAS_DDRS to estimate alias versioning cost. diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index 88ef251..05515b5 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -2825,7 +2825,7 @@ vect_estimate_min_profitable_iters (loop_vec_info loop_vinfo, if (LOOP_REQUIRES_VERSIONING_FOR_ALIAS (loop_vinfo)) { /* FIXME: Make cost depend on complexity of individual check. */ - unsigned len = LOOP_VINFO_MAY_ALIAS_DDRS (loop_vinfo).length (); + unsigned len = LOOP_VINFO_COMP_ALIAS_DDRS (loop_vinfo).length (); (void) add_stmt_cost (target_cost_data, len, vector_stmt, NULL, 0, vect_prologue); dump_printf (MSG_NOTE,