[PATCH] D147544: [BOLT] Move from RuntimeDyld to JITLink

Rafael Auler via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 14 20:45:19 PDT 2023


rafauler added a comment.

In D147544#4270631 <https://reviews.llvm.org/D147544#4270631>, @lhames wrote:

> In D147544#4255091 <https://reviews.llvm.org/D147544#4255091>, @Amir wrote:
>
>> ...
>> BOLT operates per-function, the optimized function is placed in a newly-created .text section (or is split between .text and .text.cold), or, if the function is not updated, it's copied to .bolt.org.text and only the external references are patched.
>
> Thanks @Amir!
>
> This patch is impressive, and I think I see how bolt is (ab)using the JIT linker to do its job. I'll just mention two final things from my perspective: (1) you should expect more API churn in JITLink compared to RuntimeDyld, given that JITLink is being more actively developed (though I don't expect it to be prohibitive given the JITLink  API surface you're using), (2) JITLink is missing some relocations, e.g. for the static relocation model. They're easy to add, we just haven't had anyone ask for them yet. If you hit missing relocations -- that's what's going on.
>
> - Lang.

If it is not the intent of JITLink to support such use cases, and given that BOLT has a unique use case on these components, one thing we can consider doing is to just copy RuntimeDyld to bolt's folder as a specific bolt-only private linker. In that way, BOLT doesn't get in the way of deprecating RuntimeDyld and doesn't put unwanted requirements on the JITLink API.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147544



More information about the llvm-commits mailing list