From: Michael Matz <matz@suse.de>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Andreas Schwab <schwab@suse.de>,
gcc-patches@gcc.gnu.org,
Richard Biener <richard.guenther@gmail.com>,
Jan Hubicka <hubicka@ucw.cz>
Subject: Re: [PATCH] lto: pass through -funwind-tables and -fasynchronous-unwind-tables
Date: Wed, 18 Jan 2023 15:32:00 +0000 (UTC) [thread overview]
Message-ID: <alpine.LSU.2.20.2301181522420.30340@wotan.suse.de> (raw)
In-Reply-To: <Y8gOEME3YvzaTr9L@tucnak>
Hello,
On Wed, 18 Jan 2023, Jakub Jelinek wrote:
> > > > > Partly OT, what is riscv not defaulting that on as well? Does it have
> > > > > usable unwind info even without that option, something else?
> > > >
> > > > The RISC-V ABI does not address this, AFAICS.
> > >
> > > And neither do many other ABIs, still we default there to
> > > -fasynchronous-unwind-tables because we've decided it is a good idea.
> >
> > That might or might not be, but in the context of this thread that's
> > immaterial. Doing the same as the other archs will then simply hide the
> > problem on risc-v as well, instead of fixing it.
>
> Yeah, that is why I've mentioned "Partly OT". We want this bug to be fixed
> (but the fix is not what has been posted but rather decide what we want to
> ask there; if it is at the end of compilation, whether it is at least one
> function with that flag has been compiled, or all functions have been with
> that flag, something else),
The answer to this should be guided by normal use cases. The normal use
case is that a whole input file is compiled with or without
-funwind-tables, and not that individual functions change this. So any
solution in which that usecase doesn't work is not a solution.
The purest solution is to emit unwind tables for all functions that
request it into .eh_frame and for those that don't request it put
into .debug_frame (if also -g is on). If that requires enabling
unwind-tables globally first (i.e. if even just one input function
requests it) then that is what needs to be done. (this seems to be the
problem currently, that the unwind-table activation on a per-function
basis comes too late).
The easier solution might be to make funwind-tables also be a global
special-cased option for LTO (so that the usual use-case above works),
that would trade one or another bug, but I'd say the current bug is more
serious than the other bug that would be introduced.
> and IMHO riscv should switch to
> -fasynchronous-unwind-tables by default.
I don't disagree, as long as that doesn't lead to the bug being ignored :)
Ciao,
Michael.
next prev parent reply other threads:[~2023-01-18 15:32 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-18 10:16 Andreas Schwab
2023-01-18 11:05 ` Richard Biener
2023-01-18 11:25 ` Andreas Schwab
2023-01-18 11:31 ` Jakub Jelinek
2023-01-18 12:30 ` Andreas Schwab
2023-01-18 12:35 ` Jakub Jelinek
2023-01-18 12:39 ` Andreas Schwab
2023-01-18 12:47 ` Jakub Jelinek
2023-01-18 13:00 ` Andreas Schwab
2023-01-18 14:03 ` Michael Matz
2023-01-18 14:14 ` Andreas Schwab
2023-01-18 14:25 ` Jakub Jelinek
2023-01-18 15:11 ` Andreas Schwab
2023-01-18 14:27 ` Jakub Jelinek
2023-01-18 15:09 ` Andreas Schwab
2023-01-18 15:11 ` Jakub Jelinek
2023-01-18 15:16 ` Michael Matz
2023-01-18 15:19 ` Jakub Jelinek
2023-01-18 15:32 ` Michael Matz [this message]
2023-01-18 16:09 ` Andreas Schwab
2023-01-18 16:25 ` Jan Hubicka
2023-01-18 16:28 ` Jakub Jelinek
2023-01-18 15:07 ` Jan Hubicka
2023-01-19 7:14 ` Richard Biener
2023-01-18 13:36 ` Andreas Schwab
2023-01-25 13:16 ` Richard Biener
2023-01-25 13:50 ` Andreas Schwab
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=alpine.LSU.2.20.2301181522420.30340@wotan.suse.de \
--to=matz@suse.de \
--cc=gcc-patches@gcc.gnu.org \
--cc=hubicka@ucw.cz \
--cc=jakub@redhat.com \
--cc=richard.guenther@gmail.com \
--cc=schwab@suse.de \
/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).