From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 49848 invoked by alias); 27 Jun 2017 15:38:40 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 49839 invoked by uid 89); 27 Jun 2017 15:38:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=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=tone X-HELO: EUR01-DB5-obe.outbound.protection.outlook.com Received: from mail-db5eur01on0064.outbound.protection.outlook.com (HELO EUR01-DB5-obe.outbound.protection.outlook.com) (104.47.2.64) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 27 Jun 2017 15:38:38 +0000 Received: from AM5PR0802MB2610.eurprd08.prod.outlook.com (10.175.46.18) by AM5PR0802MB2387.eurprd08.prod.outlook.com (10.175.43.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1199.15; Tue, 27 Jun 2017 15:38:35 +0000 Received: from AM5PR0802MB2610.eurprd08.prod.outlook.com ([fe80::a81e:e7d3:8fc6:7bb5]) by AM5PR0802MB2610.eurprd08.prod.outlook.com ([fe80::a81e:e7d3:8fc6:7bb5%18]) with mapi id 15.01.1220.011; Tue, 27 Jun 2017 15:38:35 +0000 From: Wilco Dijkstra To: GCC Patches , Kyrylo Tkachov CC: nd , Richard Earnshaw Subject: Re: [PATCH][ARM] Improve max_insns_skipped logic Date: Tue, 27 Jun 2017 15:38:00 -0000 Message-ID: References: ,, In-Reply-To: authentication-results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;AM5PR0802MB2387;7:Hqy8qr4DiCvzo0bVrIfVYPrMXu8SZAq2zIVzI20onxE2FcTfqMble58yzveNX2PS9hjFXJ1PooLBftMCKw3grfrQ9m0tDQW4m0gINxS0L/6wuVdVWrLDltFuJRETfluSEQ+fIMYEMEwplhiC2/z9zAO16BsZZwjeM6sg0AjVaQiLSEDs7YIRMNqBV/VvXvhqtJlumM7jcKJCP26dzMsaAYjd6GydkTi1VD2muvLT6H4T5NmV8zUtHS+Z2pn0sh/XLiA/ZteatwDajljGLt6tVtl8vqY1f/boiV6Kg6LyThHE9Wd0wOkcznpzL1bfdtUFdsbCy+JAyD9h6kgF3GjHl5Vu1eRrcvI4uPUqcfUMM7+xiJvN2y7zlBu50z94gbwW6XVW37MNtPol1F1ouFQEjCkTqKOZuEM0MyyaDGlKRluC//G8jv/IyAU7yrktGNiOQ294//WdgX5Z2ttSOjUEtuM4dJADCXidEUKJjgaoMOLExnTBSKmWsX3xNDq+WjTEfdAZUDUQdWzY8VzqVL8+am8FBT/qgPa1x2J1t/rznGEdZujUQ4InDFVmpjw2GTsrgqkd83/t5KIL5hLX56UQedRfORsIKz8RTK2XTwkMiyE2K9YbcujSabTY7PEJiTt9H9MUljKIaoOKgvFfGjW0PsnZXFVbLq1+qG1PHvHYFNZi0e4esJuAmyrKcJTjmfsuhTLOtGjB+DlQk4fLcDRHbAbVmu9U+JBOil0kko7FwFh2zszwI9S/tUFSlysqLIEj9SFotev0aF5dB6xaR0/AMEohDtXUt2cLbkTRtckaWD8= x-ms-office365-filtering-correlation-id: 4b670bc0-38af-437e-86e8-08d4bd7292ce x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254075)(48565401081)(300000503095)(300135400095)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506067)(300135500095);SRVR:AM5PR0802MB2387; x-ms-traffictypediagnostic: AM5PR0802MB2387: nodisclaimer: True x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(180628864354917)(236129657087228)(247924648384137); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(10201501046)(93006095)(93001095)(3002001)(6055026)(6041248)(20161123564025)(20161123555025)(20161123560025)(20161123558100)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:AM5PR0802MB2387;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:AM5PR0802MB2387; x-forefront-prvs: 0351D213B3 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(39840400002)(39450400003)(39860400002)(39850400002)(39410400002)(39400400002)(377424004)(8676002)(14454004)(6436002)(76176999)(25786009)(6506006)(6116002)(54356999)(50986999)(7736002)(189998001)(102836003)(4326008)(2906002)(74316002)(81166006)(5660300001)(55016002)(2900100001)(6636002)(305945005)(229853002)(72206003)(3660700001)(478600001)(8936002)(2950100002)(6246003)(9686003)(86362001)(3280700002)(53546010)(7696004)(5250100002)(99286003)(54906002)(38730400002)(33656002)(53936002);DIR:OUT;SFP:1101;SCL:1;SRVR:AM5PR0802MB2387;H:AM5PR0802MB2610.eurprd08.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Jun 2017 15:38:35.0740 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0802MB2387 X-SW-Source: 2017-06/txt/msg02055.txt.bz2 =A0=20=20=20 ping From: Wilco Dijkstra Sent: 10 November 2016 17:19 To: GCC Patches Cc: nd Subject: [PATCH][ARM] Improve max_insns_skipped logic =A0=A0=A0=20 Improve the logic when setting max_insns_skipped.=A0 Limit the maximum size= of IT to MAX_INSN_PER_IT_BLOCK as otherwise multiple IT instructions are needed, increasing codesize.=A0 Given 4 works well for Thumb-2, use the same limit = for ARM for consistency.=20 ChangeLog: 2016-11-04=A0 Wilco Dijkstra=A0 =A0=A0=A0=A0=A0=A0=A0 * config/arm/arm.c (arm_option_params_internal): Impr= ove setting of =A0=A0=A0=A0=A0=A0=A0 max_insns_skipped. -- diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index f046854e9665d54911616fc1c60fee407188f7d6..29e8d1d07d918fbb2a627a65351= 0dfc8587ee01a 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -2901,20 +2901,12 @@ arm_option_params_internal (void) =A0=A0=A0=A0=A0=A0 targetm.max_anchor_offset =3D TARGET_MAX_ANCHOR_OFFSET; =A0=A0=A0=A0 } =A0 -=A0 if (optimize_size) -=A0=A0=A0 { -=A0=A0=A0=A0=A0 /* If optimizing for size, bump the number of instructions= that we -=A0=A0=A0=A0=A0=A0=A0=A0 are prepared to conditionally execute (even on a = StrongARM).=A0 */ -=A0=A0=A0=A0=A0 max_insns_skipped =3D 6; +=A0 /* Increase the number of conditional instructions with -Os.=A0 */ +=A0 max_insns_skipped =3D optimize_size ? 4 : current_tune->max_insns_skip= ped; =A0 -=A0=A0=A0=A0=A0 /* For THUMB2, we limit the conditional sequence to one IT= block.=A0 */ -=A0=A0=A0=A0=A0 if (TARGET_THUMB2) -=A0=A0=A0=A0=A0=A0=A0 max_insns_skipped =3D arm_restrict_it ? 1 : 4; -=A0=A0=A0 } -=A0 else -=A0=A0=A0 /* When -mrestrict-it is in use tone down the if-conversion.=A0 = */ -=A0=A0=A0 max_insns_skipped =3D (TARGET_THUMB2 && arm_restrict_it) -=A0=A0=A0=A0=A0 ? 1 : current_tune->max_insns_skipped; +=A0 /* For THUMB2, we limit the conditional sequence to one IT block.=A0 */ +=A0 if (TARGET_THUMB2) +=A0=A0=A0 max_insns_skipped =3D MIN (max_insns_skipped, MAX_INSN_PER_IT_BL= OCK); =A0} =A0 =A0/* True if -mflip-thumb should next add an attribute for the default =A0=A0=A0=A0=A0=A0=A0=20=20=20=20=20