From patchwork Mon Jan 14 14:57:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 211800 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 515E52C007B for ; Tue, 15 Jan 2013 02:01:14 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1358780474; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:From:To:Subject:Date:Message-ID:User-Agent:MIME-Version: Content-Type:Content-Transfer-Encoding:Mailing-List:Precedence: List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=4EPZn1DYM+Pu08D0rTnKnYtYpqE=; b=HGmdpNgyHgHK/Oo 8RSlCHqja7xrd9IWpKaASny674nWfY4QT8sPbNO6Xb5blOsFA8iUhCkNlYlYIAX1 hUupDkkwzZmpcRZD2bP/9kk6Bt+b9XhzGjM7XdphKMxE1HL6Rc+ifuw9CF4X/wdi jZgjFW6UNtCv/F192M0S4s4BvCT8= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:From:To:Subject:Date:Message-ID:User-Agent:MIME-Version:Content-Type:Content-Transfer-Encoding:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=CM60uAi2cK2LaTZ1scaNwKEhZ4JyQH0URHrsFa9wWW79JSZyBPjfFpPYKTJrga kWenj02O+NU2v0cFhF3KIeHOIRI0yZidukBMHd6WpTQXuvGjngeS884JoxsHGi0o mdjQzSlLLka18yVFZ98yRxpRrKZGxVJAohmwmcAkRa+sA=; Received: (qmail 20167 invoked by alias); 14 Jan 2013 15:01:05 -0000 Received: (qmail 20149 invoked by uid 22791); 14 Jan 2013 15:01:03 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (194.98.77.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 14 Jan 2013 15:00:48 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 3C7AD2900C4 for ; Mon, 14 Jan 2013 16:00:56 +0100 (CET) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 98jpuKyQc8dB for ; Mon, 14 Jan 2013 16:00:56 +0100 (CET) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id E98EA290011 for ; Mon, 14 Jan 2013 16:00:55 +0100 (CET) From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: [4.7/4.6] Backport typo fix Date: Mon, 14 Jan 2013 15:57:34 +0100 Message-ID: <1492128.E7tJBqb2eG@polaris> User-Agent: KMail/4.7.2 (Linux/3.1.10-1.16-desktop; KDE/4.7.2; x86_64; ; ) MIME-Version: 1.0 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 Having vect_get_single_scalar_iteraion_cost is really not pretty. This was fixed on the mainline only (r188611) so this patch completes the work. Tested on x86-64/Linux, applied on the 4.7 branch and 4.6 branch as obvious. 2013-01-14 Eric Botcazou * tree-vectorizer.h (vect_get_single_scalar_iteraion_cost): Fix typo. * tree-vect-loop.c (vect_get_single_scalar_iteraion_cost): Likewise. (vect_estimate_min_profitable_iter): Adjust to above fix. * tree-vect-data-refs.c (vect_peeling_hash_get_lowest_cost): Likewise. Index: tree-vectorizer.h =================================================================== --- tree-vectorizer.h (revision 194927) +++ tree-vectorizer.h (working copy) @@ -916,7 +916,7 @@ extern int vect_estimate_min_profitable_ extern tree get_initial_def_for_reduction (gimple, tree, tree *); extern int vect_min_worthwhile_factor (enum tree_code); extern int vect_get_known_peeling_cost (loop_vec_info, int, int *, int); -extern int vect_get_single_scalar_iteraion_cost (loop_vec_info); +extern int vect_get_single_scalar_iteration_cost (loop_vec_info); /* In tree-vect-slp.c. */ extern void vect_free_slp_instance (slp_instance); Index: tree-vect-loop.c =================================================================== --- tree-vect-loop.c (revision 194927) +++ tree-vect-loop.c (working copy) @@ -2386,7 +2386,7 @@ vect_force_simple_reduction (loop_vec_in /* Calculate the cost of one scalar iteration of the loop. */ int -vect_get_single_scalar_iteraion_cost (loop_vec_info loop_vinfo) +vect_get_single_scalar_iteration_cost (loop_vec_info loop_vinfo) { struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo); basic_block *bbs = LOOP_VINFO_BBS (loop_vinfo); @@ -2619,7 +2619,7 @@ vect_estimate_min_profitable_iters (loop } } - scalar_single_iter_cost = vect_get_single_scalar_iteraion_cost (loop_vinfo); + scalar_single_iter_cost = vect_get_single_scalar_iteration_cost (loop_vinfo); /* Add additional cost for the peeled instructions in prologue and epilogue loop. Index: tree-vect-data-refs.c =================================================================== --- tree-vect-data-refs.c (revision 194927) +++ tree-vect-data-refs.c (working copy) @@ -1296,7 +1296,7 @@ vect_peeling_hash_get_lowest_cost (void } outside_cost += vect_get_known_peeling_cost (loop_vinfo, elem->npeel, &dummy, - vect_get_single_scalar_iteraion_cost (loop_vinfo)); + vect_get_single_scalar_iteration_cost (loop_vinfo)); if (inside_cost < min->inside_cost || (inside_cost == min->inside_cost && outside_cost < min->outside_cost))