[JITLink] Design a JIT linker pipeline configuration API.
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
Right now we don't provide any way to customize or introspect the default linker pipelines ([`jitlink::PassConfiguration`](https://github.com/llvm/llvm-project/blob/6f9646a598f25efa3c4db066d2d51fb248b13526/llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h#L1838)) that are created by the various JITLink backends (e.g. [here](https://github.com/llvm/llvm-project/blob/6f9646a598f25efa3c4db066d2d51fb248b13526/llvm/lib/ExecutionEngine/JITLink/ELF_x86_64.cpp#L360)).
JITLink plugins can add, remove, or shuffle passes in the pipelines, but they are fully responsible for understanding the impact of their changes.
It might be nice if we provided some options that could be passed to the JITLink backends that would allow them to tailor the pipeline to the current setup (or even the current graph).
Since different backends are likely to need different customizations any data structure used for this will need to be pretty generic. Maybe we could embed any customization options into the `LinkGraph` itself, since it's already also backend-specific?
Contributor guide
Research direction
Start by reading jitlink::PassConfiguration in llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h and the default pipeline construction in llvm/lib/ExecutionEngine/JITLink/ELF_x86_64.cpp. Review how LinkGraph is used and determine the requirements for a generic backend customization and introspection API; done means the design is agreed and supports the stated backend-specific use cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend-api-design, compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100