[llvm] [aarch64][win] Add support for import call optimization (equivalent to MSVC /d2ImportCallOptimization) (PR #121516)
Daniel Paoliello via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 7 10:36:07 PST 2025
dpaoliello wrote:
> > The .impcall section can only be filled in when we are writing the COFF object as it requires the actual section numbers, which are only assigned at that point (i.e., they don't exist during asm printing).
>
> You could possibly add a directive specifically to emit section numbers... that would allow you to move more of the logic into the AsmPrinter. We already have `.secidx`; that's not quite what you want here, but maybe to give you some idea what it would look like.
I considered this for an earlier design, but it ended up being very messy: the section numbers are assigned after the sections have been streamed, so if there is a general purpose "insert section number here" mechanism, it needs to be able to go back and rewrite already-streamed sections. The current design avoids that complexity since we only use the section numbers in the `.impcall` sections which we pre-allocate but then fill in afterwards.
https://github.com/llvm/llvm-project/pull/121516
More information about the llvm-commits
mailing list