[PATCH] D108897: [lld/mac] Set branchRange a bit more carefully

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 29 12:28:09 PDT 2021


thakis added inline comments.


================
Comment at: lld/MachO/ConcatOutputSection.cpp:167
     maxPotentialThunks +=
         !tp.first->isInStubs() && ti.callSitesUsed < ti.callSiteCount;
   }
----------------
I don't understand the `!tp.first->isInStubs()` check here btw – a jump to an import stub might still require a thunk if the stub is towards the end of the stubs table and the stubs table is large, no?

(I mean, the whole thing here is an over-estimate so in practice it should be fine, but is there something I'm missing here?)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108897/new/

https://reviews.llvm.org/D108897



More information about the llvm-commits mailing list