[llvm-dev] [RFC] Asynchronous unwind tables attribute
Momchil Velikov via llvm-dev
llvm-dev at lists.llvm.org
Sat Dec 11 01:03:41 PST 2021
On Sat, 11 Dec 2021 at 00:47, Eric Christopher <echristo at gmail.com> wrote:
> Ultimately I think I'd like to know why you think you should do this, hence the request for use cases :)
Right, so the use cases I have in mind are:
* synchronous exceptions: these need non-instruction precise unwind
tables, correct at function calls; generally all the callee-saved
registers need to be described
no `uwtable`, `uwtable(1)` support this case; `uwtable(2)` too, but
is needlessly precise and verbose
* debugging: best debugging experience would be instruction precise
unwind tables,
over the whole function, however, there is a bit of a wiggle room:
- unwind tables may not be instruction precise, essentially at the
same level of precision as the case for exceptions
- unwind tables for epilogues might be missing
This is what we have in most backends now. `uwtable(2)` supports
this case, `uwtable(1)` results in smaller unwind tables, at the cost
of a degraded user experience.
* sampling profilers: for best precision need instruction precise
unwind tables both in the prologue and in the epilogue (which makes
for comparatively large unwind tables)
`uiwtable(2)` supports this case.
In principle, there is no need to describe all the callee-saved
registers, just those needed to get a function's caller, so, whatever
passes for "return address, "SP", and "FP", and others. In the
course of the discussion, we agreed that's best addressed by a
separate mechanism.
~chill
More information about the llvm-dev
mailing list