From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2040.outbound.protection.outlook.com [40.107.21.40]) by sourceware.org (Postfix) with ESMTPS id C39F63861038 for ; Mon, 26 Oct 2020 11:00:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C39F63861038 Received: from AM6P194CA0029.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:90::42) by AM5PR0801MB1700.eurprd08.prod.outlook.com (2603:10a6:203:36::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.18; Mon, 26 Oct 2020 11:00:48 +0000 Received: from AM5EUR03FT040.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:90:cafe::59) by AM6P194CA0029.outlook.office365.com (2603:10a6:209:90::42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.18 via Frontend Transport; Mon, 26 Oct 2020 11:00:48 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; gcc.gnu.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;gcc.gnu.org; dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT040.mail.protection.outlook.com (10.152.17.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.18 via Frontend Transport; Mon, 26 Oct 2020 11:00:48 +0000 Received: ("Tessian outbound e6c55a0b9ba9:v64"); Mon, 26 Oct 2020 11:00:48 +0000 X-CR-MTA-TID: 64aa7808 Received: from 1d884a5c7bf6.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id B3FBA5D9-DAAB-4DBF-BF6F-538884A81CF6.1; Mon, 26 Oct 2020 11:00:43 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 1d884a5c7bf6.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 26 Oct 2020 11:00:43 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M/nhzThcVsZM8HNM9vAT/T9pE65UaW5lBbtc0K3Qp1JUxf+1MMR3ArUCMvh2gKOYZcDCzt4MBSuWw6EYs15eQnpqYTzkisekh0Qrxo9BfumKaEBUc2OSmNLtRvfSOT4yO/0aeA0EBXKCHEbUfD5oApcLi7C0w3a5JPRwLLj72LpRRy7KOtc8vyBtANNe0Rg7Q2Zr5zKQYPUlvOTAdmXIcr/e3DkhMCXp+6bIvGNBXR/Wa1bGMe0Nx+8dmaDH+VT/NFLU4FR7aKzlyunXwQgCvL0xEIBaEz6T9CjEHEQQW/8pwedD/5CYeanDglRKruVU143f1SMDA59hmnxaXZMYFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PkFgJCde3PDzzKOspSdJOwMUoyqEAJkMIgED6yJu6e8=; b=bx2Vmx2E2IRPJzoK+kcFM4ue3R+R5ywQlQmwBA86J1/ZFxzPksD5Nyicztrq1Kml0iAJH4bYxXLf/QsxlWjATdXfv06tpjmeltAkE2f5zfHBKywX/ppo0p5+5XWxhPP+lH3vcN9NSoobryzPw7NwXz2SgUY790yDbhxygrE++Ng9GwuWZEXkQhNB0yE5MJSFKZIOdZiHWGihHG+pmgN7LDhFI2JHoSzi/C0y+1rVNljqViTKSvEZMCDvJXsjDCyxpiYYBMaZvT5Q4+mLpXSXE7s1bTem8Pq9bK6/CPBCpLTueVZKwKvpdNawRNuf7aDEOtib9bPw4ZqUoBs4f9XLAw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none Received: from VI1PR08MB5325.eurprd08.prod.outlook.com (2603:10a6:803:13e::17) by VI1PR08MB4575.eurprd08.prod.outlook.com (2603:10a6:803:eb::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.18; Mon, 26 Oct 2020 11:00:41 +0000 Received: from VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::d0e7:49cd:4dae:a2a2]) by VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::d0e7:49cd:4dae:a2a2%6]) with mapi id 15.20.3455.037; Mon, 26 Oct 2020 11:00:41 +0000 From: Tamar Christina To: Martin Jambor , GCC Patches CC: Jan Hubicka Subject: RE: [PATCH 6/6] ipa-cp: Separate and increase the large-unit parameter Thread-Topic: [PATCH 6/6] ipa-cp: Separate and increase the large-unit parameter Thread-Index: AQHWlo1Pk+yf+T7yG0GvTzlwxp4a06mp236Q Date: Mon, 26 Oct 2020 11:00:41 +0000 Message-ID: References: <5361cc8dc62a8199ab1db6cdeac4f5fc1114bcc2.1601403165.git.mjambor@suse.cz> In-Reply-To: <5361cc8dc62a8199ab1db6cdeac4f5fc1114bcc2.1601403165.git.mjambor@suse.cz> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: FF73DF7C07430143AD55E0FDB012A0A2.0 x-checkrecipientchecked: true Authentication-Results-Original: suse.cz; dkim=none (message not signed) header.d=none;suse.cz; dmarc=none action=none header.from=arm.com; x-originating-ip: [217.140.99.251] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 250d8aaa-927e-46ae-88bb-08d8799e657a x-ms-traffictypediagnostic: VI1PR08MB4575:|AM5PR0801MB1700: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:10000;OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: lResRyjpxz1wIyq5mJoFHzbNFQ+XdeFaz2INV2pcDhdkdmQDiH8Ys8m9zWN/5ew/TOrm4K1+XDMAP+hZZJlyLI+c1QJv/NqtHEWtz1g8q3KGkSJhU6RkhHEPUUkL4ZLfvXuRE2rlWde3WtlG4hNFfgfTUf+8UzMqRxj1blQYB84QkOgxefrTj+Fr0YrLaKhEt5z0YNM7F4u7B3Fe5zSM+EWxCksaE0lwp/gUG8T87ye/urcYTX8UkEqr4gAr5jwaqREQJ/bpqTV0CqyR6FernawX/h5koLbsaFvqNvFZxBaWbaYwBCSYsOtfOhQGzlVJ X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR08MB5325.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(366004)(396003)(39860400002)(346002)(136003)(83380400001)(33656002)(53546011)(55016002)(6506007)(66446008)(5660300002)(76116006)(52536014)(66476007)(66946007)(64756008)(66556008)(186003)(316002)(71200400001)(2906002)(7696005)(4326008)(86362001)(478600001)(9686003)(8676002)(26005)(110136005)(8936002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: Fyb619dyDBFoKzm+yIgX1+16/sGSCNOdH0lS+lZH/0x68j5uNVJRsvbqVJ8tevwPDSQT2lFqamJYniA+oGYU5n6KCm4J8bhu7T+U8d24pcuD0sm3Cb3SgwfV4FGw6fKHinmRaCXR1W/zOO6v/cHdrKAvT+S1ac8nnuRY5L5aN+7LJMmAWi5U9dQRIKwThep7L97inwoAdYvZ2c6NMuDMY9bvQw2qVa9ZX65T9GxsjBHbjhK4wJxYfXRVNYmkEbk2IxaFLr0YA3h4SFCFya6wU2lfDFn+xXbpAoT02hcNo7AR8sieOWkHOCU+Ylwl+NSrUwI800/+y6rR2t8RoRsxI7UhIBN8IGbfYkO+kyvZ/Blvi6eLRw9zYN9SUesgBcadLR1tOQQft2CCkdXHjgkKtCjUtcxupdpJbJ/FGujGdSOFmaqBMZnHCZYq/wtP4l53WCvSbLC34M03AZIRsSc0imGWoUr15s+expzCbX17l8QIHCI40Zs3ZSzs72OGXJ2rAPtQMmF1d9Lkt1MI9toKabZdPaDkoT7H4Q0/aEWEAappuLsJPyQ9CdIYy/pJKvOJORM+4sy3cWZ2kiAF/0aU1qsxZOHPQustigrqTuZetM29Bdr2oUAqenkYR0eR86Xni7R7ijRZVlsy6aekaWAgPQ== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB4575 Original-Authentication-Results: suse.cz; dkim=none (message not signed) header.d=none;suse.cz; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT040.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 59096795-51c6-4357-f1c5-08d8799e613d X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wbdk1TOczaZWumuhqU+JxFlbQpuxAHbwfadoc2kWBx+wZG4j0SrbKVTyq2mU1C2f+OKnLFkvlkpCyJIWKg+a9EPX/IENKUSWrnXAjVhjkyISmyfJVnpv0W+t4BnDKuWRqbzW0x+Am9sRXPez9QnQt1QDQ6QUnaG8DMxKIE1RMYSYrh7pblewB/j1nAWZ5/bHMDo6pCzvk1uVV5IPxakUlDDqns1OwX7X8rqvwaNI7yUZ6KQu+560TUdBJ0SU2E2kf7A6f88Wnvo/F59xudX04SxLCfBMlc/iPo/6SqAZ92TrWZuR/K4aEyqTdL3p+VhDst43wcG+aGTpbpTaza/YBQMoPiheittjezvT2VuYpYuqtGgwEp5v7ZdySq/np0P1/W5kUq2lcUgn1+WIeOpTAw== X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(4636009)(376002)(39860400002)(346002)(396003)(136003)(46966005)(336012)(83380400001)(33656002)(186003)(55016002)(81166007)(316002)(36906005)(70586007)(52536014)(5660300002)(70206006)(8936002)(110136005)(82310400003)(8676002)(82740400003)(26005)(9686003)(4326008)(107886003)(86362001)(478600001)(356005)(47076004)(6506007)(7696005)(2906002)(53546011); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Oct 2020 11:00:48.6628 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 250d8aaa-927e-46ae-88bb-08d8799e657a X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM5EUR03FT040.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1700 X-Spam-Status: No, score=-14.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2020 11:00:52 -0000 Hi Martin, I have been playing with --param ipa-cp-large-unit-insns but it doesn't see= m to have any meaningful effect on exchange2 and I still can't recover the 12% regression vs GCC 10. Do I need to use another parameter here? Thanks, Tamar > -----Original Message----- > From: Gcc-patches On Behalf Of Martin > Jambor > Sent: Monday, September 21, 2020 3:25 PM > To: GCC Patches > Cc: Jan Hubicka > Subject: [PATCH 6/6] ipa-cp: Separate and increase the large-unit paramet= er >=20 > A previous patch in the series has taught IPA-CP to identify the importan= t > cloning opportunities in 548.exchange2_r as worthwhile on their own, but > the optimization is still prevented from taking place because of the over= all > unit-growh limit. This patches raises that limit so that it takes place = and the > benchmark runs 30% faster (on AMD > Zen2 CPU at least). >=20 > Before this patch, IPA-CP uses the following formulae to arrive at the > overall_size limit: >=20 > base =3D MAX(orig_size, param_large_unit_insns) unit_growth_limit =3D bas= e + > base * param_ipa_cp_unit_growth / 100 >=20 > since param_ipa_cp_unit_growth has default 10, param_large_unit_insns > has default value 10000. >=20 > The problem with exchange2 (at least on zen2 but I have had a quick look = on > aarch64 too) is that the original estimated unit size is 10513 and so > param_large_unit_insns does not apply and the default limit is therefore > 11564 which is good enough only for one of the ideal 8 clonings, we need = the > limit to be at least 16291. >=20 > I would like to raise param_ipa_cp_unit_growth a little bit more soon too= , > but most certainly not to 55. Therefore, the large_unit must be increase= d. In > this patch, I decided to decouple the inlining and ipa-cp large-unit para= meters. > It also makes sense because IPA-CP uses it only at -O3 while inlining als= o at - > O2 (IIUC). But if we agree we can try raising param_large_unit_insns to = 13-14 > thousand "instructions," perhaps it is not necessary. But then again, it= may > make sense to actually increase the IPA-CP limit further. >=20 > I plan to experiment with IPA-CP tuning on a larger set of programs. > Meanwhile, mainly to address the 548.exchange2_r regression, I'm > suggesting this simple change. >=20 > gcc/ChangeLog: >=20 > 2020-09-07 Martin Jambor >=20 > * params.opt (ipa-cp-large-unit-insns): New parameter. > * ipa-cp.c (get_max_overall_size): Use the new parameter. > --- > gcc/ipa-cp.c | 2 +- > gcc/params.opt | 4 ++++ > 2 files changed, 5 insertions(+), 1 deletion(-) >=20 > diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c index 12acf24c553..2152f9e5876 1= 00644 > --- a/gcc/ipa-cp.c > +++ b/gcc/ipa-cp.c > @@ -3448,7 +3448,7 @@ static long > get_max_overall_size (cgraph_node *node) { > long max_new_size =3D orig_overall_size; > - long large_unit =3D opt_for_fn (node->decl, param_large_unit_insns); > + long large_unit =3D opt_for_fn (node->decl, > + param_ipa_cp_large_unit_insns); > if (max_new_size < large_unit) > max_new_size =3D large_unit; > int unit_growth =3D opt_for_fn (node->decl, param_ipa_cp_unit_growth); > diff --git a/gcc/params.opt b/gcc/params.opt index > acb59f17e45..9d177ab50ad 100644 > --- a/gcc/params.opt > +++ b/gcc/params.opt > @@ -218,6 +218,10 @@ Percentage penalty functions containing a single cal= l > to another function will r Common Joined UInteger > Var(param_ipa_cp_unit_growth) Init(10) Param Optimization How much can > given compilation unit grow because of the interprocedural constant > propagation (in percent). >=20 > +-param=3Dipa-cp-large-unit-insns=3D > +Common Joined UInteger Var(param_ipa_cp_large_unit_insns) > Optimization > +Init(16000) Param The size of translation unit that IPA-CP pass consider= s > large. > + > -param=3Dipa-cp-value-list-size=3D > Common Joined UInteger Var(param_ipa_cp_value_list_size) Init(8) Param > Optimization Maximum size of a list of values associated with each > parameter for interprocedural constant propagation. > -- > 2.28.0