[PATCH] D99599: [NewPM] Add an option to dump pass structure

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 23 10:18:39 PDT 2021


tejohnson added inline comments.


================
Comment at: clang/lib/CodeGen/BackendUtil.cpp:872
+    if (!CodeGenOpts.LegacyPassManager && CodeGenOpts.DebugPass == "Structure")
+      BackendArgs.push_back("-debug-pass-structure");
   }
----------------
Looks like there is no existing test for -fdebug-pass-manager, even for the legacy PM.  Could you add one? It looks like the way to test this would be via "-mllvm -debug-only=commandline" which currently emits:

Args: clang -debug-pass Structure


================
Comment at: llvm/include/llvm/IR/PassManagerImpl.h:77
 
-    PI.runAfterAnalysis(P, IR);
+    if (ID != PassInstrumentationAnalysis::ID())
+      PI.runAfterAnalysis(P, IR);
----------------
What is this check needed for?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99599/new/

https://reviews.llvm.org/D99599



More information about the llvm-commits mailing list