[Debugify] Add a mode to opt to enable faster testing

Opt's "-enable-debugify" mode adds an instance of Debugify at the
beginning of the pass pipeline, and an instance of CheckDebugify at the
end.

You can enable this mode with lit using: -Dopt="opt -enable-debugify".
Note that running test suites in this mode will result in many failures
due to strict FileCheck commands, etc.

It can be more useful to look for assertion failures which arise only
when Debugify is enabled, e.g to prove that we have (or do not have)
test coverage for some code path with debug info present.

Differential Revision: https://reviews.llvm.org/D41793

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@323256 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Vedant Kumar
2018-01-23 20:43:50 +00:00
parent bfc9a5a17e
commit 48c582c9ac
3 changed files with 21 additions and 0 deletions
+4
View File
@@ -204,6 +204,10 @@ struct CheckDebugifyPass : public ModulePass {
} // end anonymous namespace
ModulePass *createDebugifyPass() { return new DebugifyPass(); }
ModulePass *createCheckDebugifyPass() { return new CheckDebugifyPass(); }
char DebugifyPass::ID = 0;
static RegisterPass<DebugifyPass> X("debugify",
"Attach debug info to everything");