From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70050.outbound.protection.outlook.com [40.107.7.50]) by sourceware.org (Postfix) with ESMTPS id DF5AA3857C61 for ; Thu, 10 Sep 2020 14:11:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org DF5AA3857C61 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Kyrylo.Tkachov@arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=P/6H4T4isVv+srDle16GgVyCgvehQ9+sRstplsMuuOI=; b=vHqDNtXq/Q/w/o6UEw1lF5mlVS15BlHtlSPr63mQRDMD6z7+vhkHC3YM+3qd2yGDDL/o4rYoi2v3S9WZGZSSvUEYClzBrKIWShoe7/VeM9sK1sXbV0PB2sUP7ua8VWlH1Iuf6tUwspkPVz3grYWQ7z3m9aDMZYDsLVCwUSfvKRA= Received: from MR2P264CA0054.FRAP264.PROD.OUTLOOK.COM (2603:10a6:500:31::18) by AM0PR08MB3059.eurprd08.prod.outlook.com (2603:10a6:208:5c::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.16; Thu, 10 Sep 2020 14:11:34 +0000 Received: from VE1EUR03FT006.eop-EUR03.prod.protection.outlook.com (2603:10a6:500:31:cafe::e3) by MR2P264CA0054.outlook.office365.com (2603:10a6:500:31::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.16 via Frontend Transport; Thu, 10 Sep 2020 14:11:33 +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=bestguesspass 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 VE1EUR03FT006.mail.protection.outlook.com (10.152.18.116) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.16 via Frontend Transport; Thu, 10 Sep 2020 14:11:33 +0000 Received: ("Tessian outbound 195a290eb161:v64"); Thu, 10 Sep 2020 14:11:33 +0000 X-CR-MTA-TID: 64aa7808 Received: from da81dbdaa15a.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 97B50CF3-CA1A-4A4B-8589-A62E26C30903.1; Thu, 10 Sep 2020 14:11:28 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id da81dbdaa15a.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 10 Sep 2020 14:11:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J2qx418uoFg/nA8d1xmYVXkTXkJqMBdkMXa/4MigunWDnMhb04Q/JzOHBLICMamB/mCucRueaAvkY3juhmF9+/0Rn5Bkoiq4GeRgAP7TTlR8mCf6sexJfYxNqFjX/z1yEXOnVVAIJu34fKWc6k5ZMtj64btB1KqDASIEEVmqKulhGnQpS0veI7nEZrIL+Bp9Jak88DE5bhhruvjEpgEKC+oTc6w00wrrNUbKONtP83qsTlW0rgXgYldxz3x4EXh8eNXig5W4X5gH9/GbA1BoytZFnsX0dAMeLnUOE6Sv0jdN6ba9+aMdsTazow5EJhB8fpt/BltzOfnbMRTIggsR/w== 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=P/6H4T4isVv+srDle16GgVyCgvehQ9+sRstplsMuuOI=; b=MB7rkGYGM1Fo3ts85ESZ+s/N3PoyRA8ECOtl9GnVwmG3q05GnhjYOMGRyt2lO7TVe1G6g57HkwRj/+Bak7sMRBfUHryuJeX1SVzfPfo7ZHi8K2Js2IV03c+yuoTtqh00jPVFZ+n4ZMDDUbu5pHbhTXaUBBXEiH5YgoAr7cSMRV/OvfnebQeqAmtOV4sKjcxv6gUylZ5RLn+B52xNZ9AwW8zjCavv8G6Yo/jbwXtkn8VVJsn/xGw0jCIlBEOIXtio6gtfgDEfc1qHGFgBH5EKoZaKzIIbd0VY+KcYGZXSQ6GgaIR1NWB/ph5BH4pQC376qPUnaVjx7S0ssaAttvWTXA== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=P/6H4T4isVv+srDle16GgVyCgvehQ9+sRstplsMuuOI=; b=vHqDNtXq/Q/w/o6UEw1lF5mlVS15BlHtlSPr63mQRDMD6z7+vhkHC3YM+3qd2yGDDL/o4rYoi2v3S9WZGZSSvUEYClzBrKIWShoe7/VeM9sK1sXbV0PB2sUP7ua8VWlH1Iuf6tUwspkPVz3grYWQ7z3m9aDMZYDsLVCwUSfvKRA= Received: from DB7PR08MB3002.eurprd08.prod.outlook.com (2603:10a6:5:20::25) by DB7PR08MB3354.eurprd08.prod.outlook.com (2603:10a6:5:1d::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.16; Thu, 10 Sep 2020 14:11:26 +0000 Received: from DB7PR08MB3002.eurprd08.prod.outlook.com ([fe80::9ce1:1ded:d7a5:af85]) by DB7PR08MB3002.eurprd08.prod.outlook.com ([fe80::9ce1:1ded:d7a5:af85%7]) with mapi id 15.20.3348.019; Thu, 10 Sep 2020 14:11:25 +0000 From: Kyrylo Tkachov To: Jakub Jelinek , Richard Earnshaw , "gcc-patches@gcc.gnu.org" Subject: RE: [PATCH] arm: Fix up arm_override_options_after_change_1 Thread-Topic: [PATCH] arm: Fix up arm_override_options_after_change_1 Thread-Index: AQHWh0+jzCdQzIJ52EmdJjtx/h5XV6lh6cAA Date: Thu, 10 Sep 2020 14:11:25 +0000 Message-ID: References: <20200908084512.GH18149@tucnak> <20200910085100.GV18149@tucnak> In-Reply-To: <20200910085100.GV18149@tucnak> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: E6E6E45C0C6A60429165899F8F360A63.0 x-checkrecipientchecked: true Authentication-Results-Original: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=arm.com; x-originating-ip: [80.5.218.175] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 39a0b729-e97f-4d07-95ce-08d855936c22 x-ms-traffictypediagnostic: DB7PR08MB3354:|AM0PR08MB3059: x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:1227;OLM:1227; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: CtNKRpTV04lqcGwZ1Jbn6ZZMlgTv2yF4Y+EoAURqfOfWlp+J2517AHlEl0oeJrn0p6LFhCfPqVBbhrNTuzthqDNsAHKp9u47FVBc2z3yOo3/GNW7sm2jcrLy9iBXsIw52/EGCfzNpd6IcBPQ725t3RaF+IOJ7uERmYZuh8l1Ce+1Bw7UXTKDmwrJ/exEIOQf2afFrRqdnVH0rHiNVADzv8422J80E3RYrz1TO4b7R1OooRwrMfKb807h+zeDLKhDdHOKSkqRyoGiCZIQcV3P4o1f4d0w+42blLZ/YR01meS3fYn0d5Y2vt95h4C+VedT+luXwHTxJhyymMv8w1ZG0Q== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB7PR08MB3002.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(396003)(366004)(346002)(376002)(39860400002)(186003)(8676002)(9686003)(478600001)(2906002)(110136005)(53546011)(7696005)(66556008)(66476007)(6506007)(55016002)(66946007)(83380400001)(52536014)(26005)(86362001)(8936002)(76116006)(316002)(66446008)(71200400001)(33656002)(5660300002)(64756008); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: dZkyA9WzCBc9ENtW4fEM+Din7deSGDa5O2/+/ax2S0LoDcOHi702fp2h4sJtUKCOHrw1uRG4CsgP4svMNihQzWlCFLf3YEHEDcGCv7qkxUBVoCUHqjRb4cHXnPNRTAx+KlSn53BF3UnEYpKvMblGmc1TJwUGvHUwx7NDwt4PyEZijzfAiykNJ0NexkW7nmC+KVPWVoZVRGJUsYFVth0PVT/EPau7y2tV0CXk+Mb2/nlfkFZovGDi4II5dKiJDXEIYEkjl1QjXV9PZUSKbtAvarGOliNXjeRFGHnA1rrOE/sIo9RRMEsp0+bxcfcqFyM8jRV1So5V168xhgkqho/2JVzCjS3yvIhybXXEg4QEE3KUF1N1i4kcunin6Bn8eXyPvjDhET0/wYrrZYCdOvsgitDxhWVNdpvRCU0L3VQsR8lprOCTztOdIEDQJ/MCGrasseGCmAgVN+AK11B3FUPnRtBAkUhEKXjquQm/JY/GU/oHFidOWYefdmS13NC0gM4vqMVmVtFxdVywlpnJTnHZAa+NgEUDMV1NRaUCwdc9QSlbb7UoGdBg4SnolCyLP6aYq8v7O2Dq/YOPoehoy+upGaJ4OSH/UKN6Tn2hUTERUQaLvHq4M1i1nRnvlGE4vjNx6O/dLYItlX9QaWhBoMLpyg== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR08MB3354 Original-Authentication-Results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT006.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 9b51a338-1042-4c03-8721-08d85593678b X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oihYvI5URwPaHTozrr0T71DXxAzo7fFEk9DM70ORhBmhe2Nd/2VvC9cttWpMX/TSeTVfiIWZAhzoEtc62AojvjWUz5mswaAYbUNI1idmM/uFndMi3v6YpZyIzSOqdakQKperYDb6cCt/gRHkplY+aJQY+NNJIgdf2AjDzRNEd5zOfOS/Ocm7lOWzFs5/TyUzbxXIO/T5X7vXDIZsdNFUTxrWfh2KpQrn1+dlWu/j94xMW0nXewewV2eWogMU2nlVS0qSGWxVkU+HoZgnF90BlWRUmz7orWFeQi1xNeW9s6WQYqXuU6qjAbBpzsCYJZHv7S4jbMIJwe26nzGRYZG1zc7KACPXgkQsWwc1X5+NZ9U8PPL7a21dZoPwOS9w5/8K5CYGBJrThdy9TW3pSCVElw== 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)(136003)(396003)(376002)(39860400002)(346002)(46966005)(5660300002)(33656002)(110136005)(36906005)(316002)(336012)(7696005)(47076004)(186003)(53546011)(6506007)(82740400003)(52536014)(356005)(81166007)(26005)(83380400001)(82310400003)(478600001)(8676002)(8936002)(55016002)(86362001)(70206006)(2906002)(70586007)(9686003); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Sep 2020 14:11:33.4565 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 39a0b729-e97f-4d07-95ce-08d855936c22 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: VE1EUR03FT006.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3059 X-Spam-Status: No, score=-9.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, UNPARSEABLE_RELAY autolearn=no 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: Thu, 10 Sep 2020 14:11:38 -0000 Hi Jakub, > -----Original Message----- > From: Jakub Jelinek > Sent: 10 September 2020 09:51 > To: Richard Earnshaw ; Kyrylo Tkachov > ; gcc-patches@gcc.gnu.org > Subject: [PATCH] arm: Fix up arm_override_options_after_change_1 >=20 > On Tue, Sep 08, 2020 at 10:45:12AM +0200, Jakub Jelinek via Gcc-patches > wrote: > > Looking further at arm_override_options_after_change_1, it also seems t= o > be > > incorrect, rather than testing > > !opts->x_str_align_functions > > it should be really testing > > !opts_set->x_str_align_functions > > and get &global_options_set or similar passed to it as additional opts_= set > > argument. That is because otherwise the decision will be sticky, while= it > > should be done whenever use provided -falign-functions but didn't provi= de > > -falign-functions=3D (either on the command line, or through optimize > > attribute or pragma). >=20 > Here is a fix for that (incremental change on top of the previous patch). > Bootstrapped/regtested on armv7hl-linux-gnueabi, ok for trunk? This looks ok to me. Please commit to master so we can get some wider testing before backporting= . Thanks, Kyrill >=20 > 2020-09-10 Jakub Jelinek >=20 > * config/arm/arm.c (arm_override_options_after_change_1): Add > opts_set > argument, test opts_set->x_str_align_functions rather than > opts->x_str_align_functions. > (arm_override_options_after_change, arm_option_override_internal, > arm_set_current_function): Adjust callers. >=20 > --- gcc/config/arm/arm.c.jj 2020-09-09 09:19:42.911419411 +0200 > +++ gcc/config/arm/arm.c 2020-09-09 09:28:02.392897384 +0200 > @@ -3024,10 +3024,11 @@ static GTY(()) bool thumb_flipper; > static GTY(()) tree init_optimize; >=20 > static void > -arm_override_options_after_change_1 (struct gcc_options *opts) > +arm_override_options_after_change_1 (struct gcc_options *opts, > + struct gcc_options *opts_set) > { > /* -falign-functions without argument: supply one. */ > - if (opts->x_flag_align_functions && !opts->x_str_align_functions) > + if (opts->x_flag_align_functions && !opts_set->x_str_align_functions) > opts->x_str_align_functions =3D TARGET_THUMB_P (opts->x_target_flags= ) > && opts->x_optimize_size ? "2" : "4"; > } > @@ -3037,7 +3038,7 @@ arm_override_options_after_change_1 (str > static void > arm_override_options_after_change (void) > { > - arm_override_options_after_change_1 (&global_options); > + arm_override_options_after_change_1 (&global_options, > &global_options_set); > } >=20 > /* Implement TARGET_OPTION_SAVE. */ > @@ -3065,7 +3066,7 @@ static void > arm_option_override_internal (struct gcc_options *opts, > struct gcc_options *opts_set) > { > - arm_override_options_after_change_1 (opts); > + arm_override_options_after_change_1 (opts, opts_set); >=20 > if (TARGET_INTERWORK && !bitmap_bit_p (arm_active_target.isa, > isa_bit_thumb)) > { > @@ -32335,7 +32336,7 @@ arm_set_current_function (tree fndecl) >=20 > save_restore_target_globals (new_tree); >=20 > - arm_override_options_after_change_1 (&global_options); > + arm_override_options_after_change_1 (&global_options, > &global_options_set); > } >=20 > /* Implement TARGET_OPTION_PRINT. */ >=20 >=20 > Jakub