[lld] [lld][ELF] Sort thunks by their destination to allow quicker convergence (PR #209962)

Pranav Kant via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 16 14:01:21 PDT 2026


================
@@ -1235,7 +1225,7 @@ class ThunkSection final : public SyntheticSection {
   size_t getSize() const override;
   void writeTo(uint8_t *buf) override;
   InputSection *getTargetInputSection() const;
-  bool assignOffsets();
+  bool assignOffsets(bool sort = false);
----------------
pranavk wrote:

Could do that. This is leftover from my earlier attempts where I wasn't sorting only the first time but sorting at pass X to ensure we have created all the thunks before I do the sorting operation. I realized later that it's not any better than just sort in the beginning as bulk of the thunks are already created at pass 0. 

https://github.com/llvm/llvm-project/pull/209962


More information about the llvm-commits mailing list