From patchwork Mon Sep 2 12:55:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evgeny Karpov X-Patchwork-Id: 1979644 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=microsoft.com header.i=@microsoft.com header.a=rsa-sha256 header.s=selector2 header.b=EYaKb/3c; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wy7zD0FsYz1yXY for ; Mon, 2 Sep 2024 22:55:52 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D09D63858288 for ; Mon, 2 Sep 2024 12:55:49 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2072d.outbound.protection.outlook.com [IPv6:2a01:111:f403:260d::72d]) by sourceware.org (Postfix) with ESMTPS id 919543858D37 for ; Mon, 2 Sep 2024 12:55:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 919543858D37 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=microsoft.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=microsoft.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 919543858D37 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:260d::72d ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1725281733; cv=pass; b=OEWJ/abJeLFBPjgMgt5QSkZ7r6nubw8dw0FOC1POJS2m/wARd6HEciQ5KFricxeTmwu60IaZHwmEdIZ/YitvXkH6uQFx31rnT3sEL+hP35pqe1zgxZykSqUS53WAwF/x3NtA6oMLBxirqpOF84w4V5blaETITZ3KAjSCElEWFCw= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1725281733; c=relaxed/simple; bh=NOVuet5oeRMy1rsZ+zyQnU8EcfzAHtIoG8mWOBr0MhE=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=tXbCssjy9QNyG4EWNG0U2p9spg+mvJT9Z9OstF6QtOnwxSY3XJ4Fa9o8WAW/4tYv+scbMPo9+hFlexWhZ/hTgGFwvIDASt2NzCoJKUukQ70VJT940LmQpTrF3AC6uJvuUkzn8pnNjMWCqucOi+yyuHBXPS2ObwyQeuCswcm6qSo= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=H09Zl8bXsLIbkq70FSVgNO5ZkIg4zPAARfnzZQqGEO1CfIB8cfEVfSYvdSaPJFYZ6SugU5v0z9iaxL24QQ1x3g0883CQsqLL9UB/nLJmjNFjs1s0D1g33TVo+19//rd1THRvput9e/cx1CeNUSwKnymtt9kgcOFBwxegH3kst40dXZvA5bquAts8mjsjysLccRtmjLhjANr716Dk3tYVTbA5LOgyN5xCQrQff4oUtkMemN6sN3Ml0631CUygd2TC2V9km4Fv7tOMxwfKIpY76gAIi3C0fyTs+3FvSdMDUK+TdxvH3G72/KrmGfzdd7eaPClrDwRPZgLzzuIc1NUKrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=NOVuet5oeRMy1rsZ+zyQnU8EcfzAHtIoG8mWOBr0MhE=; b=K+m/UfCpiy3lDZm931FwKAzjGPgvdQz7OUzbwLlcHxoQ2JRQUwp+wiKxkGSNWrXiEdOJbSIy/HZnXVB5mkG4IL+F5jE6jUK/eAuMUAaKzaPvRYG4oobYGkkOIGBZqp5OvVUnWflbd97PeK3Wjd6lGoYykxoOzPdzPLidVrTfHaACmfIkYnsLlqO9feSOj+/uzr/3K1Fpfs42gkCo/h9IFCA6F/M1L+6puPIhu1f6PJs3bDSeF3RhRxAd4PNaO3Uw9AOTCHLBXTMV3clmJTXE+1z02FXPwPkXJadPPWwQcOOZP+hLjpBtMTWkEjUZ4Y+eFngXSL+DrxcTPBEyAQzy3g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NOVuet5oeRMy1rsZ+zyQnU8EcfzAHtIoG8mWOBr0MhE=; b=EYaKb/3cAUr/ofA7Yk1vVkpLrR/z6wyupAYHFaSxCNOdnTs8IDRBU/NhlQxNyGboqEvcHiYcPB8IPkgm0jmUzhAUCcgz/apvJ54pcu6hdRMlgoADrvZtlMHW6U+H1mQhVelNcuJmGpbhxZfaXVmYk0WVzRQfpRmhWzO7zcpUpng= Received: from DBBPR83MB0613.EURPRD83.prod.outlook.com (2603:10a6:10:533::21) by PA1PR83MB0800.EURPRD83.prod.outlook.com (2603:10a6:102:493::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7962.2; Mon, 2 Sep 2024 12:55:28 +0000 Received: from DBBPR83MB0613.EURPRD83.prod.outlook.com ([fe80::399d:9bfc:1209:af10]) by DBBPR83MB0613.EURPRD83.prod.outlook.com ([fe80::399d:9bfc:1209:af10%4]) with mapi id 15.20.7918.000; Mon, 2 Sep 2024 12:55:28 +0000 From: Evgeny Karpov To: "gcc-patches@gcc.gnu.org" CC: "richard.sandiford@arm.com" , "Richard Earnshaw (lists)" , "christophe.lyon@linaro.org" , Maxim Kuvyrkov , Radek Barton Subject: [PATCH v1 0/9] SMALL code model fixes, optimization fixes, LTO and minimal C++ enablement Thread-Topic: [PATCH v1 0/9] SMALL code model fixes, optimization fixes, LTO and minimal C++ enablement Thread-Index: AQHa/TWqO3nn/NeNRka4cUBH+ZSnww== Date: Mon, 2 Sep 2024 12:55:27 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=True; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2024-09-02T12:55:28.442Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=General; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard; authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=microsoft.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DBBPR83MB0613:EE_|PA1PR83MB0800:EE_ x-ms-office365-filtering-correlation-id: ff87138d-e5c3-473a-8e65-08dccb4e8509 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|366016|376014|1800799024|38070700018; x-microsoft-antispam-message-info: =?iso-8859-1?q?rSWlk6zic4UyeUOp91EMBbvHfN?= =?iso-8859-1?q?SJpUlZxBiKco6MA3zho6Uwr/JqACCkZwEeT484ETB+4A9iRDjtnyy8LZII60?= =?iso-8859-1?q?LphIftcuXx9lwVMm8erpSlvOzeoWRFufV+3iNoKaay+0nvLuEm1UYPXuKDXX?= =?iso-8859-1?q?m4n2NHxOe/UVW8V3/6EbYMhcsIUPr3tLEq0fvv/MTQoWP2EXQiXv29kZJXSK?= =?iso-8859-1?q?hQXvXDm7cRclzj1AOlvA2f5BatZAir4JmXKKl7SOkUOPFjqvNb6VPn3/7Iqv?= =?iso-8859-1?q?zxE4FPgTZqr4FBVvZ7pFQvLJ6P6yUGhFuOj7KtpVeizbA+gm7gRIKj7AqKMz?= =?iso-8859-1?q?siL59yQ7YFrnJOW8WpxEeKNpDIfW6nlCGCTEtev/HLsunhMucFrPaqK8kjQ/?= =?iso-8859-1?q?7r7rvaUCaSsEU+UEn8NFqydRScId1hGSZ2X/qi4RgmR0KknMm6FMuzZ8xHtC?= =?iso-8859-1?q?XhY4N+k5iuTUdnjJ9CNEiFtC3Z9GPJfyj6fgO+l/pU4uipFC1+NQbyhETbJA?= =?iso-8859-1?q?MZIX0LUVZAAGF5MxS+nQZ751LuTKjj3LYjikCwepSaGB0uD08d4Ylpc8vSup?= =?iso-8859-1?q?7JJeo7pdtvEf0EhN+Xd40ggUSM0AMvxgFioEpqu46v3wbB4jefKzwII4Cfsp?= =?iso-8859-1?q?ULsFgsK62QvKKCNTwOAFmqUpf9Vfzo1EJ14MXiJMI0UntqBWOivygKzLOweC?= =?iso-8859-1?q?yS+Y/8D3T2cI8vHlnySpEIAMPoA/FfuMUxD2UPHZy3K39s1zqRufzoy3q1U/?= =?iso-8859-1?q?64beE9oJiSsCaRga3nlO1dWk2xzGPOzFgp9+nyu28dkvy43s5hZO8oidWTzo?= =?iso-8859-1?q?DlfRtjyKWjhAwVGCTM7ZFn+C+aeW4Id0YkSTKC5keT7QsX6GHXQI3bZZLrus?= =?iso-8859-1?q?WtOFiLfVBWDCGIiLCNd/5aAfnT6LpW27YaOWk/SdQRQ0bNNAERHgHNaHs8j6?= =?iso-8859-1?q?ROrr7xI05QvO1NmdXR/W/hBYGttpP/sbqCvbQ/pR/blPAg3BV8j8l/ZYoGJ7?= =?iso-8859-1?q?fhOJaHBEFKv2uAoqhj4WfTlLbZSytYlF0JnQNN3dKn2RNRl3m1TF/dFJw4jv?= =?iso-8859-1?q?GlE0JZ93sWV3xbm6ifKGo8wfStmPfvaB3AWKx9KauxVmZuAW1u5MojDOQVUN?= =?iso-8859-1?q?fSfmHHpBRBfDI3zO4F7JvEKdRo05tKnoj5D1W7ZflGAkj91x1ZnHQhnxFn16?= =?iso-8859-1?q?GVgjhFL3rnAMCFnYcooAeSXcGt2GMea/UyofVhhs8RbZdfg/+K4i9SYSZWWH?= =?iso-8859-1?q?ENN+xt5Omjm3lOFrvOZotclPYtCbkFGWFol297+05bEPDPLLlqdbY0N9yfWV?= =?iso-8859-1?q?gi/V+qyepX9lZ2XBUp3JFPgCEqj1lTwjxlm/CdPh3Z5Ru6FK/Le3ExCxMhNV?= =?iso-8859-1?q?wpJy6UXoynwFKeLKNsnkCXB8tQp8A3hFTJxVFQov8X9PPHMRxQI+uGUGMBPj?= =?iso-8859-1?q?Ho2RBjgGod+gdsr2DtZl9Ycg=3D=3D?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DBBPR83MB0613.EURPRD83.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(376014)(1800799024)(38070700018); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?Y0QEEY3TudGepBe3IzMUGdR?= =?iso-8859-1?q?87uAbstnXHT6BIuErjKYq+qaW2ipc+veWatEY7hiRs/8YtT2L0JdKUfscAxR?= =?iso-8859-1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OMiU8Uh3+vos1HtGPfDnJxldOgup58JUjSQQ+MxJ?= =?iso-8859-1?q?z7RAZt8fM1jEVQQFHjCjTIs3KKKDfSyW7MFA2NZbQ3SSnBFLv2OVCNmLgZpm?= =?iso-8859-1?q?/9RwLazKM3fT3ugbkWAKtKFo5QZS82jQ4sYADqOMi0BqtbEAi+z1V9r2WQxz?= =?iso-8859-1?q?meMbZ8dccd1VZ1/1iICBD/8luw1kTiIDgjNAArtv5f1CQzxoBzmpn0+Zvg9l?= =?iso-8859-1?q?dkH+2Ym9YvPfEtZ0ffDnZhKJ0KKff3wnM5+VfZ2KUEHv7JL1lVTumIeNB1dP?= =?iso-8859-1?q?wcI+Ze6HNZRCkYQEvsg0q5UGLDF/tpn4eXzM2hJl+iaQgB7pt+BHGZAkPkBb?= =?iso-8859-1?q?EMofbsFk0gglmOABQ8Nfu6xwd6tSy7EYEAdXBDYdx7vDac8yhsmv85AB3vkh?= =?iso-8859-1?q?JJ3N0Fgh6zy62AL78h5sk4EX834n3Bz4S2z7OLarGPnbWZv5YaxCiAfFsxM8?= =?iso-8859-1?q?4aak7vJ99kxMF9MjBh7qW6Za7PwIyRGBHu+0qzpJum6xwxLtd6uRVuq8yiGw?= =?iso-8859-1?q?zVyU01uMaXSlq39RkF/541s31pj53wUjVKWmjy/vsrB6nA3OUikkDz419nzO?= =?iso-8859-1?q?DbIzIy/sbZ1xSssoVO11Yby99RQMKssYJXjlAi8sU1OZaWhHN/0ayKQOnuno?= =?iso-8859-1?q?6S1JTlRrdt6SARwodmJudBkJKLfVhazXKJPG/fvtSen02MGIqj9cE6V7Rjdp?= =?iso-8859-1?q?LjNF5XLSB7RozYTdH1Ltg?= MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DBBPR83MB0613.EURPRD83.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ff87138d-e5c3-473a-8e65-08dccb4e8509 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Sep 2024 12:55:27.9305 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 5bRpe6q0ynTPpScx3DW08lZRcMoHWHYMRrI6egO+2LLzSDUBIDvItGpsMyHi79II7j9r+FuSwWXBMRS7lPAgmw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA1PR83MB0800 X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org The main focus of this work is resolving issues in the aarch64-w64-mingw32 target related to enabling optimization with -O2, -O3, and LTO, fixing relocations, and adding debugging information. This patch series is supported by the binutils patch series. https://sourceware.org/pipermail/binutils/2024-August/136481.html The patches included in this series implement and resolve the following areas: 1. Support weak references. 2. Add debugging information. 3. Add minimal C++ support. 4. Exclude symbols using GOT from code models. 5. Resolve relocation and small code model issues. Before the change, the code model could not address more than 1MB due to relocation issues. After the fix, the SMALL code model can address 4GB properly. 6. Fix optimization issues, mostly related to relocation issues. 7. Add LTO support. 8. Support large alignment. 9. Extend the number of tests from 309k to 605k by adding minimal C++ to the target, and improve the pass rate from 72% to 89% with fixes in the patch series targeting armv8 without optional extensions such as SVE. What is next? 1. The patch series 4. Partial or full SEH implementation, variadic functions fixes, call stack support for debugging, bug fixing, and improving unit tests pass rate. 2. The patch series 5. The rest of SEH, C++ exceptions, Boost library unit testing, bug fixing, and improving unit tests pass rate. 3. In terms of the contribution window for GCC 15 it will be great to have architecture target armv8-a in the best quality it can be achieved. The patch series to extend architecture target from armv8-a to "armv8.2-a + sve" might be also prepared before GCC 15 release. However it is unknown yet if it lands in GCC 15 release or in the next development cycle. Thank you for your review! Prepared, refactored and validated by Radek Barton and Evgeny Karpov Contributor: Zac Walker Special thanks to Linaro, especially Christophe Lyon, for the internal review! Regards, Evgeny