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

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 8 13:39:00 PST 2024


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

similar to the start/stop, I think this would be better handled by not adding the pass at all to the pipeline by checking in `addPass`, rather than working around it later on using pass instrumentation

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


More information about the llvm-commits mailing list