summaryrefslogtreecommitdiff
path: root/llvm/unittests/CodeGen/CGPluginTest/Plugin/CodeGenTestPass.cpp
AgeCommit message (Collapse)Author
2025-07-10Reland "[CodeGen] Expose the extensibility of PassConfig to plugins (#139059)"Tcc100
Add missing dependencies to unittest target Original patch broke BUILD_SHARED bots and required revert #147947
2025-07-10Revert "[CodeGen] Expose the extensibility of PassConfig to plugins" (#147947)Jan Patrick Lehr
Reverts llvm/llvm-project#139059 This broke https://lab.llvm.org/buildbot/#/builders/10/builds/9125/steps/8/logs/stdio The bot does a SHARED_LIBS=ON build. I can reproduce locally with the CMake cache file in offload/cmake/caches/AMDGPUBot.cmake as the build config.
2025-07-10[CodeGen] Expose the extensibility of PassConfig to plugins (#139059)Tcc100
This PR exposes the backend pass config to plugins via a callback. Plugin authors can register a callback that is being triggered before the target backend adds their passes to the pipeline. In the callback they then get access to the `TargetMachine`, the `PassManager`, and the `TargetPassConfig`. This allows plugins to call `TargetPassConfig::insertPass`, which is honored in the subsequent `addPass` of the main backend. We implemented this using the legacy pass manager since backends still use it as the default.