[llvm] [LTO] Turn ImportListsTy into a proper class (NFC) (PR #106427)
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 18 07:22:23 PDT 2024
teresajohnson wrote:
> After some further investigation, this issue occurs when empty or mostly empty (e.g. module inline asm only) modules are part of the thin link.
>
> And the reason why LLVM did not hit this problem is this code:
>
> https://github.com/llvm/llvm-project/blob/0dd56858fe188419182a57d0e03c8cd0aa693867/llvm/lib/LTO/ThinLTOCodeGenerator.cpp#L1102-L1111
That is the old LTO API but fyi the new LTO API (used by lld and gold) uses the same approach: https://github.com/llvm/llvm-project/blob/0dd56858fe188419182a57d0e03c8cd0aa693867/llvm/lib/LTO/LTO.cpp#L1706-L1715
>
> So LLVM's solution here was to force-initialize all map entries, while Rust's solution was to use read-only access to the maps.
https://github.com/llvm/llvm-project/pull/106427
More information about the llvm-commits
mailing list