[PATCH] D69236: [bugpoint] Try to reduce passes after reducing everything.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 20 21:56:10 PDT 2019
fhahn created this revision.
fhahn added reviewers: davide, reames, modocache.
Herald added a project: LLVM.
In some cases, we fail to reduce the pass list earlier because of
complex pass dependencies, but we can reduce it after we simplified the
reproducer.
An example of that is PR43474, which can limit the crash to
-loop-interchange. Adding a test case would require at least 2
interacting Loop passes I think.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D69236
Files:
llvm/tools/bugpoint/CrashDebugger.cpp
Index: llvm/tools/bugpoint/CrashDebugger.cpp
===================================================================
--- llvm/tools/bugpoint/CrashDebugger.cpp
+++ llvm/tools/bugpoint/CrashDebugger.cpp
@@ -1289,7 +1289,21 @@
EmitProgressBitcode(*Program, ID);
- return DebugACrash(*this, TestForOptimizerCrash);
+ auto Res = DebugACrash(*this, TestForOptimizerCrash);
+ if (Res || DontReducePassList)
+ return Res;
+ // Try to reduce the pass list again. This covers additional cases
+ // we failed to reduce earlier, because of more complex pass dependencies
+ // triggering the crash.
+ auto SecondRes = ReducePassList(*this).reduceList(PassesToRun);
+ if (Error E = SecondRes.takeError())
+ return E;
+ outs() << "\n*** Found crashing pass"
+ << (PassesToRun.size() == 1 ? ": " : "es: ")
+ << getPassesString(PassesToRun) << '\n';
+
+ EmitProgressBitcode(getProgram(), "reduced-simplified");
+ return Res;
}
static bool TestForCodeGenCrash(const BugDriver &BD, Module *M) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69236.225820.patch
Type: text/x-patch
Size: 1016 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191021/f5e5f164/attachment.bin>
More information about the llvm-commits
mailing list