[llvm-branch-commits] [RFC][Clang] Allow plugins to hook into back-end (PR #165257)

Alexis Engelke via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Oct 27 07:19:42 PDT 2025


https://github.com/aengelke created https://github.com/llvm/llvm-project/pull/165257

Add a mechanism to permit plugins running code between optimizations and
the back-end passes.

The primary motivation for this point is TPDE-LLVM, which substitutes
the LLVM back-end (optionally falling back to it for unsupported IR). We
have been distributing a Clang patch; but requiring a custom-build
toolchain is impracticable for many users.

---

I'm not sure whether this is the best way to achieve the goal. Front-end
plugins are not viable. Any kind of pass manager plugin is not an
option, as the entire pass pipeline needs to be (optionally) skipped.

Tests are currently missing; I will add them once there's consensus that
this is the way to go.





More information about the llvm-branch-commits mailing list