[PATCH] D69236: [bugpoint] Try to reduce passes after reducing everything.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 29 07:30:11 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rG43a46f1c0938: [bugpoint] Try to reduce passes after reducing everything. (authored by fhahn).

Repository:
  rG LLVM Github Monorepo

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

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.226898.patch
Type: text/x-patch
Size: 1016 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191029/675828d7/attachment.bin>


More information about the llvm-commits mailing list