public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "yangyujie at loongson dot cn" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/113233] LoongArch: target options from LTO objects not respected during linking
Date: Fri, 05 Jan 2024 01:31:16 +0000 [thread overview]
Message-ID: <bug-113233-4-HnAptkK3lm@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-113233-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113233
--- Comment #6 from Yang Yujie <yangyujie at loongson dot cn> ---
(In reply to Xi Ruoyao from comment #4)
> (In reply to Jan Hubicka from comment #3)
> > > Confirm. But option save/restore has been always implemented:
> > >
> > > .section .gnu.lto_.opts,"",@progbits
> > > .ascii "'-fno-openmp' '-fno-openacc' '-fno-pie' '-fcf-protection"
> > > .ascii "=none' '-mabi=lp64d' '-march=loongarch64' '-mfpu=64' '-m"
> > > .ascii "simd=lasx' '-mcmodel=normal' '-mtune=loongarch64' '-flto"
> > > .ascii "'\000"
> > >
> > > So -msimd=lasx is correctly recorded. Not sure why it does not work.
> >
> > With LTO we need to mix code compiled with different sets of options.
> > For this reason we imply for every function defition and optimization
> > and target attribute which record the flags. So it seems target
> > attribute is likely broken for this flag.
>
> Target attribute is not implemented for LoongArch. And I don't think it's a
> good idea to implement it in stage 3.
Yes, target attribute may have to wait. But save/restore can be implemented
without target attributes of functions. By marking options as "Save" in .opt
or implementing custom TARGET_OPTION_{SAVE,RESTORE} hooks, we can stream the
target configuration (which may come from the command line / the target
attributes / #pragma GCC target) into the per-function LTO bytecode, so that
lto1 can pick up and use them later when generating code for each function.
next prev parent reply other threads:[~2024-01-05 1:31 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-04 13:02 [Bug target/113233] New: " yangyujie at loongson dot cn
2024-01-04 13:06 ` [Bug target/113233] " yangyujie at loongson dot cn
2024-01-04 13:31 ` xry111 at gcc dot gnu.org
2024-01-04 13:49 ` Jan Hubicka
2024-01-04 13:49 ` hubicka at ucw dot cz
2024-01-04 13:51 ` xry111 at gcc dot gnu.org
2024-01-04 13:52 ` xry111 at gcc dot gnu.org
2024-01-05 1:31 ` yangyujie at loongson dot cn [this message]
2024-01-11 11:04 ` cvs-commit at gcc dot gnu.org
2024-04-01 3:21 ` cvs-commit at gcc dot gnu.org
2024-04-01 3:23 ` cvs-commit at gcc dot gnu.org
2024-04-01 3:30 ` xry111 at gcc dot gnu.org
2024-04-07 8:37 ` xry111 at gcc dot gnu.org
2024-04-07 8:37 ` xry111 at gcc dot gnu.org
2024-04-09 9:03 ` cvs-commit at gcc dot gnu.org
2024-04-09 10:13 ` xry111 at gcc dot gnu.org
2024-04-10 2:09 ` yangyujie at loongson dot cn
2024-04-10 4:06 ` xry111 at gcc dot gnu.org
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=bug-113233-4-HnAptkK3lm@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/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).