From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by sourceware.org (Postfix) with ESMTPS id CA02B3858C50 for ; Tue, 9 May 2023 07:33:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CA02B3858C50 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-50bc070c557so10703205a12.0 for ; Tue, 09 May 2023 00:33:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683617584; x=1686209584; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=YfVtEGXGXkm3bGgwnZNzXlC9iBQTwFPOvDCacynP+eg=; b=I+tSzcCm3bdGajqwns234dcUIilta+j4qC1RPqubJqeUD9Swx8+vhIrKZBAe10lqjO wKr8q0J00zGQugxA5+WbHckaFlgYIz8XMyh9ovEPgXAWFIafy9BWGogbHcCMFG+YlKHD J7MicSTHT7LBVUNP5xLUN66XAHb1nO8LmmJUNDq02ey5WPiVsN7NT1ihClT40CTabmpL 29kbOZcFm/p4sTflCCo5Iea+DBgrqgGiq50zRKKV8A9OGIgRPKql3CmxpHmv9+PJvqt4 UcWpgLpeSFhEK5pKKRmlqbrviYEhiIKtXCYKouD341jgaPJPTJnp8+7AMTYEMJIliOs1 ao2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683617584; x=1686209584; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=YfVtEGXGXkm3bGgwnZNzXlC9iBQTwFPOvDCacynP+eg=; b=WjK0mPsl1P27By00gJn4WUt2wQPMp1EC1bk8DkW9dpPj+ObW6S0BWRZ5TdYO8G6ATm tm9OXVXbvE9FjQWMqohlM5BVj6fG3GEgWH9fl+AfbrpqiaXmMVDYo2SlhG/0PAl6fyzx 831uEFA7m0fMhJ9NMKre3vkw/R4vlwDbRBuT+vpLW1NGxvgMqD7M24u++gVu0OnQZ3pj U1j+UmZ2GmP4EjpDQS7m55ckvIFVg3K2U1SYTPHwAuPgL5CTg2Y08menkDl1oWKtzgTD VVO01DFhI17FnjGRBQnBNYkrt5DtMs1HskS7bBWjO9c2FbUYWDNLPWdL+wfIbSqS0s5k sg7Q== X-Gm-Message-State: AC+VfDw4j+SuRJ8YinyiNSK+jpwYcKJwJf7vdU2q8aW4fDexQzFpi3Zw O7Ky0r255t+/YJ2WTB//m/dPucNe3bCIAmv8IKFmWQ== X-Google-Smtp-Source: ACHHUZ6iUsQgT4yH4i6wj4S5rbnFL2XTdTznaTSTyeak4vVgOd21XCWv+sCe8J6FYa0KR6MX11lsF/JbSLQenzgssg0= X-Received: by 2002:a05:6402:398:b0:50b:c4b7:ee7c with SMTP id o24-20020a056402039800b0050bc4b7ee7cmr10399642edv.36.1683617584419; Tue, 09 May 2023 00:33:04 -0700 (PDT) MIME-Version: 1.0 References: <20110927172322.GA21068@kam.mff.cuni.cz> <875y99d5rt.fsf@euler.schwinge.homeip.net> In-Reply-To: From: Christophe Lyon Date: Tue, 9 May 2023 09:32:55 +0200 Message-ID: Subject: Re: Let each 'lto_init' determine the default 'LTO_OPTIONS', and 'torture-init' the 'LTO_TORTURE_OPTIONS' (was: Update testsuite to run with slim LTO) To: Richard Biener Cc: Thomas Schwinge , Jan Hubicka , gcc-patches@gcc.gnu.org, Rainer Orth , Mike Stump Content-Type: multipart/alternative; boundary="0000000000000ead9d05fb3dc46b" X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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 List-Id: --0000000000000ead9d05fb3dc46b Content-Type: text/plain; charset="UTF-8" Hi! On Wed, 3 May 2023 at 13:47, Richard Biener via Gcc-patches < gcc-patches@gcc.gnu.org> wrote: > On Wed, 3 May 2023, Thomas Schwinge wrote: > > > Hi! > > > > This very likely isn't the only instance of such a kind of problem in the > > GCC testsuite ;-) -- but it's one that I've run into, and analyzed: > > > > On 2011-09-27T19:23:22+0200, Jan Hubicka wrote: > > > this patch updates testsuite to cover both fat and slim LTO when > linker plugin > > > is used [...] > > > > This change here: > > > > > *** lib/lto.exp (revision 179274) > > > --- lib/lto.exp (working copy) > > > *************** proc lto_init { args } { > > > *** 66,79 **** > > > # You can put this in the environment before site.exp is written > or > > > # add it to site.exp directly. > > > if ![info exists LTO_OPTIONS] { > > > ! set LTO_OPTIONS [list \ > > > ! {-O0 -flto -flto-partition=none } \ > > > ! {-O2 -flto -flto-partition=none } \ > > > ! {-O0 -flto -flto-partition=1to1 } \ > > > ! {-O2 -flto -flto-partition=1to1 } \ > > > ! {-O0 -flto} \ > > > ! {-O2 -flto} \ > > > ! ] > > > } > > > } > > > > > > --- 66,89 ---- > > > # You can put this in the environment before site.exp is written > or > > > # add it to site.exp directly. > > > if ![info exists LTO_OPTIONS] { > > > ! if [check_linker_plugin_available] { > > > ! set LTO_OPTIONS [list \ > > > ! {-O0 -flto -flto-partition=none -fuse-linker-plugin} \ > > > ! {-O2 -flto -flto-partition=none -fuse-linker-plugin > -fno-fat-lto-objects } \ > > > ! {-O0 -flto -flto-partition=1to1 -fno-use-linker-plugin } \ > > > ! {-O2 -flto -flto-partition=1to1 -fno-use-linker-plugin } \ > > > ! {-O0 -flto -fuse-linker-plugin -fno-fat-lto-objects } \ > > > ! {-O2 -flto -fuse-linker-plugin} \ > > > ! ] > > > ! } else { > > > ! set LTO_OPTIONS [list \ > > > ! {-O0 -flto -flto-partition=none } \ > > > ! {-O2 -flto -flto-partition=none } \ > > > ! {-O0 -flto -flto-partition=1to1 } \ > > > ! {-O2 -flto -flto-partition=1to1 } \ > > > ! {-O0 -flto } \ > > > ! {-O2 -flto} \ > > > ! } > > > } > > > } > > > > ... is problematic: initializing the persistent 'LTO_OPTIONS' dependent > > on 'check_linker_plugin_available' that is (potentially) variable per > > testing variant ('RUNTESTFLAGS=--target_board=unix\{-m64,-m32\}', for > > example). > > > > Similarly: > > > > > *** lib/c-torture.exp (revision 179274) > > > --- lib/c-torture.exp (working copy) > > > *************** if [info exists ADDITIONAL_TORTURE_OPTIO > > > *** 52,61 **** > > > > > > set LTO_TORTURE_OPTIONS "" > > > if [check_effective_target_lto] { > > > ! set LTO_TORTURE_OPTIONS [list \ > > > ! { -O2 -flto -flto-partition=none } \ > > > ! { -O2 -flto } > > > ! ] > > > } > > > > > > global GCC_UNDER_TEST > > > --- 52,69 ---- > > > > > > set LTO_TORTURE_OPTIONS "" > > > if [check_effective_target_lto] { > > > ! # When having plugin test both slim and fat LTO and > plugin/nonplugin > > > ! # path. > > > ! if [check_linker_plugin_available] { > > > ! set LTO_TORTURE_OPTIONS [list \ > > > ! { -O2 -flto -fno-use-linker-plugin -flto-partition=none } \ > > > ! { -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects } > > > ! ] > > > ! } else { > > > ! set LTO_TORTURE_OPTIONS [list \ > > > ! { -O2 -flto -flto-partition=none } \ > > > ! { -O2 -flto -fuse-linker-plugin } > > > ! } > > > } > > > > ..., and: > > > > > *** lib/gcc-dg.exp (revision 179274) > > > --- lib/gcc-dg.exp (working copy) > > > *************** if [info exists ADDITIONAL_TORTURE_OPTIO > > > *** 69,78 **** > > > > > > set LTO_TORTURE_OPTIONS "" > > > if [check_effective_target_lto] { > > > ! set LTO_TORTURE_OPTIONS [list \ > > > ! { -O2 -flto -flto-partition=none } \ > > > ! { -O2 -flto } > > > ! ] > > > } > > > > > > > > > --- 69,86 ---- > > > > > > set LTO_TORTURE_OPTIONS "" > > > if [check_effective_target_lto] { > > > ! # When having plugin test both slim and fat LTO and > plugin/nonplugin > > > ! # path. > > > ! if [check_linker_plugin_available] { > > > ! set LTO_TORTURE_OPTIONS [list \ > > > ! { -O2 -flto -fno-use-linker-plugin -flto-partition=none } \ > > > ! { -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects } > > > ! ] > > > ! } else { > > > ! set LTO_TORTURE_OPTIONS [list \ > > > ! { -O2 -flto -flto-partition=none } \ > > > ! { -O2 -flto -fuse-linker-plugin } > > > ! } > > > } > > > > OK to push the attached > > LGTM, please leave the others a chance to comment in case they > spotted anything wrong. > > Richard. > > > "Let each 'lto_init' determine the default 'LTO_OPTIONS', and > 'torture-init' the 'LTO_TORTURE_OPTIONS'"? > > This is causing issues on arm/aarch64, including: ERROR: can't read "LTO_TORTURE_OPTIONS": no such variable in gcc.target/arm/acle/acle.exp: ERROR: torture-init: LTO_TORTURE_OPTIONS is not empty as expected in gcc.target/aarch64/sls-mitigation/sls-mitigation.exp, gcc.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp, gcc.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp, gcc.target/aarch64/torture/aarch64-torture.exp and maybe others Are other targets affected too? > > > > Gr??e > > Thomas > > > > > > ----------------- > > Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra?e 201, > 80634 M?nchen; Gesellschaft mit beschr?nkter Haftung; Gesch?ftsf?hrer: > Thomas Heurung, Frank Th?rauf; Sitz der Gesellschaft: M?nchen; > Registergericht M?nchen, HRB 106955 > > > > -- > Richard Biener > SUSE Software Solutions Germany GmbH, Frankenstrasse 146, 90461 Nuernberg, > Germany; GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman; > HRB 36809 (AG Nuernberg) > --0000000000000ead9d05fb3dc46b--