[PATCH] D86657: Add new hidden option -print-crash-IR that prints out IR that caused opt pipeline to crash

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 29 13:53:40 PDT 2021


aeubanks added a comment.

mostly looks good
should we always print the full module? generally if we're looking at some crashed IR, we want to be able to run opt on it, and just printing out a function won't allow us to do that



================
Comment at: llvm/include/llvm/Passes/StandardInstrumentations.h:427
+  // All of the crash reporters that will report on a crash.
+  static DenseSet<PrintCrashIRInstrumentation *> *CrashReporters;
+  // Crash handler registered when print-on-crash is specified.
----------------
we don't need a set anymore right? just one crash reporter


================
Comment at: llvm/lib/Passes/PassBuilder.cpp:449
+public:
+  struct Result {};
+  PreservedAnalyses run(Module &, ModuleAnalysisManager &) { assert(false); }
----------------
extraneous struct?


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

https://reviews.llvm.org/D86657



More information about the llvm-commits mailing list