From patchwork Thu Oct 5 13:15:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Cheng X-Patchwork-Id: 821770 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-463518-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="uBE14nOB"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3y7Cvf33Hqz9s82 for ; Fri, 6 Oct 2017 00:16:14 +1100 (AEDT) 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:content-type:mime-version; q=dns; s=default; b=mq2639++y5faJVnr+n0s0a4aHjNTqBRrF8pnlhEJKIYFcf0FiI 1989+eCDbjlnvvDfCN8NCyo5mxU2JYx0fZ+Az3aN1jkRWvWMnM9JjtxfO9KtdrNJ 9fb44xyERer6/3RGr69/BHvWBeokc0UfwifDZgBxjW+/3YneksBAuc4eM= 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:content-type:mime-version; s= default; bh=OXfxQqVgP/q8+jMJeQA9AUyF/lY=; b=uBE14nOB1nraTu9hTOT9 nG8KRjRfJp5R8+1nE5+e1YqLYDBynRisBI3C100P0oeSwlUKRqKN7sdaP4XSP4vi 3LmaopsqYb17CbEHwPggbo41DT/V1y+8lqtFsUN8taoUYrZ4OhdNPQcbyCJTRg27 fDXpEDpeHzaAyediDAIzkfA= Received: (qmail 56317 invoked by alias); 5 Oct 2017 13:16:05 -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 53837 invoked by uid 89); 5 Oct 2017 13:15:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 spammy=H*c:HHH X-HELO: EUR01-VE1-obe.outbound.protection.outlook.com Received: from mail-ve1eur01on0056.outbound.protection.outlook.com (HELO EUR01-VE1-obe.outbound.protection.outlook.com) (104.47.1.56) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 05 Oct 2017 13:15:54 +0000 Received: from DB5PR0801MB2742.eurprd08.prod.outlook.com (10.166.176.26) by DB5PR0801MB2742.eurprd08.prod.outlook.com (10.166.176.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Thu, 5 Oct 2017 13:15:51 +0000 Received: from DB5PR0801MB2742.eurprd08.prod.outlook.com ([10.166.176.26]) by DB5PR0801MB2742.eurprd08.prod.outlook.com ([10.166.176.26]) with mapi id 15.20.0077.018; Thu, 5 Oct 2017 13:15:50 +0000 From: Bin Cheng To: "gcc-patches@gcc.gnu.org" CC: nd Subject: [PATCH GCC][2/7]Don't rename variables for deleted new preheader Date: Thu, 5 Oct 2017 13:15:50 +0000 Message-ID: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Bin.Cheng@arm.com; x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB5PR0801MB2742; 6:XVyP4yBSBym8k6saqsDVkwC74pCdWD4mrnAuvsB2WNRSiAxrrifyLPJE7PGVVVpzQ4marjNwZDR8dZaOA1EAILmP/go7MW5a6Z7ihJy5Z2kWgyy8rimdINhNBVhTcQeE2j40MFir1XdOPRL9NO1dSpoqzdCnvZlKTJ+t5xJlyOdG3R1y8U+zrgzmjj9AxJtdW2tCzvMIdm901Opg0saKggs9NYphtdtdr/6QDI2epd4T0FE5jGcK/tIQPyKIrPctWpj1axRy4QffYkbNpidQ5Z77K1ujav9MaO2ZPrZWCjEbx9q5/95lQeRKr4ixnUVDgplydGeWi+VZxTyp0Pc0Gw==; 5:PjuCWjTLjJf4fkC6YhE7znWrFarv4k9GxhO3TcS73pS7ylo15wD/RZPP3CZaS34f8YHiZ2DXifijwgVWDlEIAKZtFHv1VQk5n4B/JYy2t8IcuOeRDm0KCanmVImEZgiMfn+gO2IPyChb8TnssVwLCQ==; 24:e39qXu18pnw/+MAapF+P0HfLJ/7ZDWQJ4do1CCjEe/KDTDbWR7tKTenx6DNL/GmJUIpfPYyBdygaQzpFVrEYS7Ux8ZXc++wXBvASVLctO+s=; 7:+62t4wKzZbuME1Zs7UUnzxM96yUtcIJMVLpJUsuCGa3fpWoBZkQk7WsBusZRqfiTKj//0kwHWasFpggLsV3yGoDuvx+xns7Q/S0qT0pyPcMC95Wj7f0cU5D4AeLyNU6x1Yhs1+5IZPNinGtV5+xQc8FX1UDLjBWTWS1Fsn5yGR8fgYzZgahEOVHVbW7MfIYirC1bqVtn8TSztm08QTs8purY8Ge+cTICpTLFBwgt2lA= x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: bdcbb33b-a913-4919-cdd4-08d50bf33363 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(48565401081)(2017052603199)(49563074)(201703131423075)(201703031133081)(201702281549075); SRVR:DB5PR0801MB2742; x-ms-traffictypediagnostic: DB5PR0801MB2742: nodisclaimer: True x-exchange-antispam-report-test: UriScan:(180628864354917); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(102415395)(6040450)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3002001)(100000703101)(100105400095)(6055026)(6041248)(20161123564025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123555025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DB5PR0801MB2742; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DB5PR0801MB2742; x-forefront-prvs: 04519BA941 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(346002)(39860400002)(376002)(377424004)(199003)(189002)(72206003)(53936002)(7736002)(81156014)(4326008)(101416001)(81166006)(106356001)(105586002)(86362001)(97736004)(2906002)(55016002)(9686003)(99286003)(74316002)(66066001)(5640700003)(6916009)(189998001)(68736007)(6436002)(2501003)(2351001)(8676002)(305945005)(3660700001)(54356999)(7696004)(478600001)(3280700002)(3846002)(25786009)(6116002)(2900100001)(33656002)(316002)(14454004)(8936002)(6506006)(99936001)(5660300001)(102836003)(50986999)(77096006); DIR:OUT; SFP:1101; SCL:1; SRVR:DB5PR0801MB2742; H:DB5PR0801MB2742.eurprd08.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Oct 2017 13:15:50.8680 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR0801MB2742 X-IsSubscribed: yes Hi, I noticed that new_preheader basic block could be deleted if the copied loop is added at entry in function slpeel_tree_duplicate_loop_to_edge_cfg. This simple patch skips new_preheader during variable renaming if it is deleted. Bootstrap and test in patch set on x86_64 and AArch64, is it OK? Thanks, bin 2017-10-04 Bin Cheng * tree-vect-loop-manip.c (slpeel_tree_duplicate_loop_to_edge_cfg): Skip renaming variables in new preheader if it's deleted. From 9c7719402c9528b517d8408419c2e9b930708772 Mon Sep 17 00:00:00 2001 From: Bin Cheng Date: Fri, 22 Sep 2017 16:50:40 +0100 Subject: [PATCH 2/7] skip-new_preheader.txt --- gcc/tree-vect-loop-manip.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/tree-vect-loop-manip.c b/gcc/tree-vect-loop-manip.c index f78e4b4..2c724a2 100644 --- a/gcc/tree-vect-loop-manip.c +++ b/gcc/tree-vect-loop-manip.c @@ -496,7 +496,8 @@ slpeel_tree_duplicate_loop_to_edge_cfg (struct loop *loop, loop_preheader_edge (new_loop)->src); } - for (unsigned i = 0; i < scalar_loop->num_nodes + 1; i++) + /* Skip new preheader since it's deleted if copy loop is added at entry. */ + for (unsigned i = (at_exit ? 0 : 1); i < scalar_loop->num_nodes + 1; i++) rename_variables_in_bb (new_bbs[i], duplicate_outer_loop); if (scalar_loop != loop) -- 1.9.1