Make bugpoint emit a bugpoint-reduced-blocks.bc, because bugpoint itself
authorTorok Edwin <edwintorok@gmail.com>
Sun, 24 May 2009 09:40:47 +0000 (09:40 +0000)
committerTorok Edwin <edwintorok@gmail.com>
Sun, 24 May 2009 09:40:47 +0000 (09:40 +0000)
can crash during instruction simplification (for example if it creates a
broken module).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72362 91177308-0d34-0410-b5e6-96231b3b80d8

tools/bugpoint/CrashDebugger.cpp

index 2e43f88c7114862f3ce3af18a8b32ee7212ebe17..f46fed78608a8423b155e0a76024929152e785c1 100644 (file)
@@ -426,7 +426,10 @@ static bool DebugACrash(BugDriver &BD,  bool (*TestFn)(BugDriver &, Module *)) {
            E = BD.getProgram()->end(); I != E; ++I)
       for (Function::const_iterator FI = I->begin(), E = I->end(); FI !=E; ++FI)
         Blocks.push_back(FI);
+    unsigned OldSize = Blocks.size();
     ReduceCrashingBlocks(BD, TestFn).reduceList(Blocks);
+    if (Blocks.size() < OldSize)
+      BD.EmitProgressBitcode("reduced-blocks");
   }
 
   // FIXME: This should use the list reducer to converge faster by deleting