From patchwork Tue Jun 21 15:50:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Greenhalgh X-Patchwork-Id: 70573 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp2087270qgy; Tue, 21 Jun 2016 08:53:29 -0700 (PDT) X-Received: by 10.66.148.105 with SMTP id tr9mr28921615pab.72.1466524409684; Tue, 21 Jun 2016 08:53:29 -0700 (PDT) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id k63si40818848pfj.185.2016.06.21.08.53.29 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Jun 2016 08:53:29 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-430241-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; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-430241-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-430241-patch=linaro.org@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:in-reply-to:references :mime-version:content-type; q=dns; s=default; b=OTNw0AeZoXK9F8Xk vPeHxloD2xdjQQrZ7EmFpzeA4yo57GKuMjAt7MnqXwXqoni+LEz+tm9HxYWlmcnh gHaEcH5znK3EllcALucIVAAq+TnL5QyPyBDPjEpAz85iIAmUxD7CTl3F+BjX2/4c K+8Fk7/lwP9zVlvcwlkk6YjIkrc= 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:in-reply-to:references :mime-version:content-type; s=default; bh=g3V8EhRixeD9b7/Q/5xMtQ xAjlw=; b=lrKtRovr/vtT7z56ZUDYp0miZOsPlWWnih6u+Jx31/Ip/CEsea5B5R S7RKSSE5wMqhIDK0qcS7fFPHZ26o/xL2cHCZh68LbDxI88/JSMU6W5wEXSDYqWKl y4xL2g7CmjzomVlTu8/33EnWmqMBDsfUwkgWMJj+AaBMuYAb5AgSE= Received: (qmail 6933 invoked by alias); 21 Jun 2016 15:53:16 -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 6918 invoked by uid 89); 21 Jun 2016 15:53:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL, BAYES_00, SPF_PASS autolearn=ham version=3.3.2 spammy=1675, 6, 16756 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; Tue, 21 Jun 2016 15:53:05 +0000 Received: from emea01-db3-obe.outbound.protection.outlook.com (mail-db3lrp0081.outbound.protection.outlook.com [213.199.154.81]) (Using TLS) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-73-NC6JwxQyPeqeUT7jKz4S7w-1; Tue, 21 Jun 2016 16:51:33 +0100 Received: from AM4PR08CA0039.eurprd08.prod.outlook.com (10.166.127.49) by DB5PR08MB0680.eurprd08.prod.outlook.com (10.169.33.18) with Microsoft SMTP Server (TLS) id 15.1.523.12; Tue, 21 Jun 2016 15:51:32 +0000 Received: from AM1FFO11FD056.protection.gbl (2a01:111:f400:7e00::161) by AM4PR08CA0039.outlook.office365.com (2603:10a6:200:1a::49) with Microsoft SMTP Server (TLS) id 15.1.523.12 via Frontend Transport; Tue, 21 Jun 2016 15:51:32 +0000 Received: from nebula.arm.com (217.140.96.140) by AM1FFO11FD056.mail.protection.outlook.com (10.174.65.75) with Microsoft SMTP Server (TLS) id 15.1.517.7 via Frontend Transport; Tue, 21 Jun 2016 15:51:32 +0000 Received: from e107456-lin.cambridge.arm.com (10.1.2.79) by mail.arm.com (10.1.105.66) with Microsoft SMTP Server id 14.3.294.0; Tue, 21 Jun 2016 16:51:16 +0100 From: James Greenhalgh To: CC: , , , , , , Subject: [RFC: Patch 6/6 v2] Remove second cost model from noce_try_store_flag_mask Date: Tue, 21 Jun 2016 16:50:31 +0100 Message-ID: <1466524231-17412-6-git-send-email-james.greenhalgh@arm.com> In-Reply-To: <1466524231-17412-1-git-send-email-james.greenhalgh@arm.com> References: <1466524231-17412-1-git-send-email-james.greenhalgh@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:217.140.96.140; IPV:CAL; SCL:-1; CTRY:GB; EFV:NLI; SFV:NSPM; SFS:(10009020)(979002)(6009001)(7916002)(2980300002)(438002)(199003)(189002)(377424004)(110136002)(6806005)(76176999)(586003)(33646002)(229853001)(77096005)(50986999)(2351001)(26826002)(246002)(11100500001)(189998001)(8936002)(5890100001)(356003)(50226002)(7696003)(7846002)(92566002)(5003600100003)(87936001)(86362001)(106466001)(8676002)(512874002)(568964002)(19580405001)(2950100001)(2906002)(4610100001)(2476003)(4326007)(36756003)(104016004)(5000100001)(19580395003)(84326002)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB5PR08MB0680; H:nebula.arm.com; FPR:; SPF:Pass; PTR:fw-tnat.cambridge.arm.com; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; AM1FFO11FD056; 1:FoKxfGzRt8c/KjG8tUhdimkCIKWM0OhZTMs2yY044c7JX+xXY1i0B1FG9h/SDIW/jzMKbNnm21uwUSvGCn4xT/ZXk/8B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w== X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501002); SRVR:DB5PR08MB0680; X-Microsoft-Exchange-Diagnostics: 1; DB5PR08MB0680; 25:iKpUkUs2mtsqTDG2updC6Zt1Wb2M4yh81mXeTvwIj8qjIqgHRQpy1gbK/iTJGqpte/QCzN30bkZWdbQE279EDWV6afWOySH3Jk2M9eCaH48DXh66yCr6J69HBOMeSmDeisOmu990uC6RZsCBU4pUgmjfaaPsEBMoWGcZwxVcck7gI5aoBrp5Y4MCSSbPPnvHMC6SK7dOjsuCO6nv+IszIgto+5uyhvXF8Q9N7fUoxLrB4aFirFO1fAQVW8gug6rJraVmlx2amRRhVePEonbbpz3E7VOD0iphnthB7s/99lDzjpDV8OLm7K0otDbX7c1Ob2p7LZAz7/5Xf+INQI5MxqnvxCvkYbKJe8bIYgxFuBbEem1VJVEqX3siPFpjf2XMv7nzwrbXrHI+kA9xJuyfPguqyvtxjDBWaw2KTSUHgiHHtAoFA1YLgzA9cT/AyVOMpD7wYbBhq8S0MBOmEvNRxP25a/0cA2o6TAzmC15Eh/Zm/7+kkJAUaD8JU+0XfSHQ; 20:zBrVubrxjLjwMktNM5I3nhgR3gxb9jXkK7d9I3SyTySAdI6eFpPDf0POR5WPNKLx1DFfPfaMgj85NA1I3CaRu1nfjOuM+5MC44hTD+AHmZgQEncsEjv88M5EfzvdlQ4iZdDPOsrTOaLwsjFhwjizEAl46biznPTzPzdklCpFNrt9eN7FHuE0pXo+jTBBVJIEF0ZStH80lHWRUlWFXS5i7s2yk/Jg0Xi8lmm6yUJX0ftNvc4gmhIES1TTcI+zfhUy NoDisclaimer: True X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(180628864354917); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(102415321)(601004)(2401047)(13024025)(13013025)(13020025)(13023025)(5005006)(8121501046)(3002001)(10201501046)(6055026); SRVR:DB5PR08MB0680; BCL:0; PCL:0; RULEID:; SRVR:DB5PR08MB0680; X-Microsoft-Exchange-Diagnostics: 1; DB5PR08MB0680; 4:PLq5t3IuhwU5RDXsCo+FYRWlCcQAV8Z22FHooDI4262uURzqc/0PaQ738DUQUKy8Xs63JxwBxZH8vnNZ5WMlTdkEYamsII8WOiSQycDgtaDgQHSfkxrweDfCHtiJOQcYGeuMaM7hf6xJCgzvHo4nOhwHEnxZmD3Q1PxEW4nXMESnwidCw10u6V5TnI2iqsQSqvRDLwtIpnOnK4kESSVUiCYO5OOuHo7niI6Y87lNvNVKgniBwFdBjsuUUYDh+7hiilJqfpRsAMnNKbtjgUMQD3Wq5cfQGEgWKo5/aFT85L9wUunOp56+vzFP15AyaYb5HzpBNJNJ5/0/2ti41YoXGZhEnH1EOM5KYQFEbM9qHJ0J8jhmFy/xtSpJ/c1Yw525iPEGj2gDFPhpzt3m5yxRB4fCwbS1Z9UUzSVOUZWAtFIQ0+e3f4NZ4JX5zfZK2Ytki8lfK/ZNJGNehbpoEQSOXigpZJC5rIhGdKgQhOYev7pHAyD5oSvOwaoIDLWR7BjlkpdVtJod+/YEqrYSuyK5GQ== X-Forefront-PRVS: 098076C36C X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB5PR08MB0680; 23:zENZ/S1Q5QMUjZVY4+NccPKwaYbwbUVUyYWiX9vdD?= =?us-ascii?Q?Imc2hdnnx1+k4CPGH55zCdcQoZWx/thOjGCfIT4WhoamWu5LJsC4yg7K985f?= =?us-ascii?Q?OzgynmkNDiq4NiqfJS3FQjkDa4IsCT/+uD/i/hRrC6UjVnx1C8yTIuRz+TAV?= =?us-ascii?Q?VwZFSXR5OPziaq5zLrw+dOeTjwn/g/nskcX8VHJ1D8YO8AotQNwZLM1s4vxf?= =?us-ascii?Q?t70olBYqapggbbrlcqAUkXrC5BUA842my/fRG4R/QkZiDsj4mZGtm6ENCLgS?= =?us-ascii?Q?uam+BuZOQWvotLdv6gHKTWeHZxueB5hKGQWDwB9ATFIFLBeb2sTZ+M/Q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fpq9DRcZrNEYYaodeJZaQ/MEnDHzBMS5/YiRMI6/hwld3Qjt32aD9Thj7oomQwrdPyZqw5MHnU1NLAYjLMVpcTTx15OSolwVQibb9cwVAmcxHJMxExdm2E4WJt1IS57OU3Zsukb1Bt13YwBrPObeaJ7utXn9M= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2016 15:51:32.2446 (UTC) X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[217.140.96.140]; Helo=[nebula.arm.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR08MB0680 X-MC-Unique: NC6JwxQyPeqeUT7jKz4S7w-1 X-IsSubscribed: yes Hi, This transformation tries two cost models, one estimating the number of insns to use, one estimating the RTX cost of the transformed sequence. This is inconsistent with the other cost models used in ifcvt.c and unneccesary - eliminate the second cost model. Thanks, James --- 2016-06-21 James Greenhalgh * ifcvt.c (noce_try_store_flag_mask): Delete redundant cost model. diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c index 8f892b0..0cb8280 100644 --- a/gcc/ifcvt.c +++ b/gcc/ifcvt.c @@ -1668,9 +1668,6 @@ noce_try_store_flag_mask (struct noce_if_info *if_info) if (target) { - int old_cost, new_cost, insn_cost; - int speed_p; - if (target != if_info->x) noce_emit_move_insn (if_info->x, target); @@ -1678,15 +1675,6 @@ noce_try_store_flag_mask (struct noce_if_info *if_info) if (!seq) return FALSE; - speed_p = optimize_bb_for_speed_p (BLOCK_FOR_INSN (if_info->insn_a)); - insn_cost = insn_rtx_cost (PATTERN (if_info->insn_a), speed_p); - /* TODO: Revisit this cost model. */ - old_cost = if_info->max_seq_cost + insn_cost; - new_cost = seq_cost (seq, speed_p); - - if (new_cost > old_cost) - return FALSE; - emit_insn_before_setloc (seq, if_info->jump, INSN_LOCATION (if_info->insn_a)); if_info->transform_name = "noce_try_store_flag_mask";