[PATCH] D94202: Preserve the lexical order for global variables during llvm-link merge
Jin Lin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 26 23:52:57 PDT 2021
jinlin added inline comments.
================
Comment at: llvm/lib/Linker/IRMover.cpp:1522
+ if (NewGV)
+ Globals.splice(Globals.end(), Globals, NewGV->getIterator());
+ }
----------------
MaskRay wrote:
> See `test/tools/gold/X86/weak.ll` for a case (merging `a b` and `a c`, `a` is weak) where the splice usage regressed the order.
Yes. I have observed this. This change can improve the startup performance of Uber iOS app by 10%. I agree it may miss some corner cases. I can help update this test case if you prefer.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94202/new/
https://reviews.llvm.org/D94202
More information about the llvm-commits
mailing list