[PATCH] D111863: [libunwind] Add an interface for dynamic .eh_frame registration
Joerg Sonnenberger via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 19 06:49:58 PDT 2021
joerg added a comment.
In D111863#3071651 <https://reviews.llvm.org/D111863#3071651>, @lhames wrote:
> In D111863#3071353 <https://reviews.llvm.org/D111863#3071353>, @joerg wrote:
>
>> I would strongly prefer if ORCv2 doesn't depend on this. It essentially forces libunwind to parse the whole section just to find the delimiters of the FDEs. That's a lot of unnecessary work as JIT use normally allows registering functions individually.
>
> I don't follow this. Does libunwind provide some way to register FDEs without parsing the FDE content? If so we can definitely use that, but we should still process the whole section: ORC links objects (not functions), and we should register every FDE for an object when it's linked in.
>
> It's also worth noting that ORC and MCJIT have always called `__register_frame` on every frame, which seems like it should be at least as much work as this.
`__register_frame` requires parsing the CIE header, but not the whole FDE program. E.g. that's the `findPCRange` logic. After that, the FDE is just added to the internal block list. Parsing a whole segment is more involved as it needs to look for the terminator of each block to find the next FDE.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111863/new/
https://reviews.llvm.org/D111863
More information about the cfe-commits
mailing list