From: Christophe Lyon <christophe.lyon@linaro.org>
To: Richard Biener <rguenther@suse.de>
Cc: Thomas Schwinge <thomas@codesourcery.com>,
Jan Hubicka <hubicka@ucw.cz>,
gcc-patches@gcc.gnu.org,
Rainer Orth <ro@cebitec.uni-bielefeld.de>,
Mike Stump <mikestump@comcast.net>
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)
Date: Tue, 9 May 2023 09:32:55 +0200 [thread overview]
Message-ID: <CAPS5khbvrCEwLTo+Ycx2oVGLEm0DNV7F=2z=3xgWgGDQcYE0tw@mail.gmail.com> (raw)
In-Reply-To: <nycvar.YFH.7.77.849.2305031146280.4466@jbgna.fhfr.qr>
[-- Attachment #1: Type: text/plain, Size: 6066 bytes --]
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 <hubicka@ucw.cz> 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 <rguenther@suse.de>
> SUSE Software Solutions Germany GmbH, Frankenstrasse 146, 90461 Nuernberg,
> Germany; GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman;
> HRB 36809 (AG Nuernberg)
>
next prev parent reply other threads:[~2023-05-09 7:33 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-27 17:54 Update testsuite to run with slim LTO Jan Hubicka
2011-09-30 14:56 ` Diego Novillo
2011-10-20 19:34 ` Breakage with "Update testsuite to run with slim LTO" Hans-Peter Nilsson
2011-10-20 19:53 ` Andi Kleen
2011-10-21 0:39 ` Jan Hubicka
2011-10-21 5:22 ` [RFA:] fix breakage " Hans-Peter Nilsson
2011-10-21 9:58 ` Jan Hubicka
2011-10-21 12:23 ` Iain Sandoe
2011-10-21 12:35 ` Rainer Orth
2011-10-21 16:20 ` Jan Hubicka
2011-10-21 17:40 ` Hans-Peter Nilsson
2011-10-21 18:52 ` Jan Hubicka
2011-10-21 19:56 ` Hans-Peter Nilsson
2011-10-24 12:08 ` Richard Guenther
2011-10-28 14:59 ` ping: [RFA:] testsuite infrastructure for options implied by dg-final methods Hans-Peter Nilsson
2011-11-04 13:56 ` ping*2: " Hans-Peter Nilsson
2011-11-04 17:05 ` Mike Stump
2011-11-04 17:54 ` Hans-Peter Nilsson
2011-11-04 18:14 ` Mike Stump
2011-11-04 18:16 ` Hans-Peter Nilsson
2023-05-03 11:16 ` Let each 'lto_init' determine the default 'LTO_OPTIONS', and 'torture-init' the 'LTO_TORTURE_OPTIONS' (was: Update testsuite to run with slim LTO) Thomas Schwinge
2023-05-03 11:46 ` Richard Biener
2023-05-09 7:32 ` Christophe Lyon [this message]
2023-05-09 9:00 ` Testsuite: Add missing 'torture-init'/'torture-finish' around 'LTO_TORTURE_OPTIONS' usage (was: Let each 'lto_init' determine the default 'LTO_OPTIONS', and 'torture-init' the 'LTO_TORTURE_OPTIONS') Thomas Schwinge
2023-05-09 15:17 ` Christophe Lyon
2023-05-09 19:14 ` Christophe Lyon
2023-05-10 7:51 ` Testsuite: Add 'torture-init-done', and use it to conditionalize implicit 'torture-init' (was: Testsuite: Add missing 'torture-init'/'torture-finish' around 'LTO_TORTURE_OPTIONS' usage (was: Let each 'lto_init' determine the default 'LTO_OPTIONS', and 'torture-init' the 'LTO_TORTURE_OPTIONS')) Thomas Schwinge
2023-05-10 13:42 ` Christophe Lyon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAPS5khbvrCEwLTo+Ycx2oVGLEm0DNV7F=2z=3xgWgGDQcYE0tw@mail.gmail.com' \
--to=christophe.lyon@linaro.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=hubicka@ucw.cz \
--cc=mikestump@comcast.net \
--cc=rguenther@suse.de \
--cc=ro@cebitec.uni-bielefeld.de \
--cc=thomas@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).