[llvm] [NewPM][CodeGen] add TargetPassConfig like API (PR #70906)

via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 19 00:07:16 PST 2023


================
@@ -134,7 +167,19 @@ template <typename DerivedT> class CodeGenPassBuilder {
   }
 
   PassInstrumentationCallbacks *getPassInstrumentationCallbacks() const {
-    return PIC;
+    static PassInstrumentationCallbacks PseudoPIC;
+    return PIC ? PIC : &PseudoPIC;
----------------
paperchalice wrote:

Just follow the [`PassBuilder`](https://llvm.org/doxygen/classllvm_1_1PassBuilder.html#a322fc14d985cd25592d641ab24cc787e), `PIC` is allowed to be `nullptr`.

https://github.com/llvm/llvm-project/pull/70906


More information about the llvm-commits mailing list