Try to run cleanups even if nothing was modified in the preview passes
authorChris Lattner <sabre@nondot.org>
Wed, 25 Jun 2003 04:13:52 +0000 (04:13 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 25 Jun 2003 04:13:52 +0000 (04:13 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6897 91177308-0d34-0410-b5e6-96231b3b80d8

tools/bugpoint/CrashDebugger.cpp

index a0da67ce985a8116a3524806ad4ab4d68f8f4130..40854aa380dce35490367088782b9928380487e8 100644 (file)
@@ -360,20 +360,18 @@ bool BugDriver::debugCrash() {
   } while (Simplification);
 
   // Try to clean up the testcase by running funcresolve and globaldce...
-  if (AnyReduction) {
-    std::cout << "\n*** Attempting to perform final cleanups: ";
-    Module *M = performFinalCleanups();
-    std::swap(Program, M);
+  std::cout << "\n*** Attempting to perform final cleanups: ";
+  Module *M = performFinalCleanups();
+  std::swap(Program, M);
             
-    // Find out if the pass still crashes on the cleaned up program...
-    if (runPasses(PassesToRun)) {
-      // Yup, it does, keep the reduced version...
-      delete M;
-      AnyReduction = true;
-    } else {
-      delete Program;   // Otherwise, restore the original module...
-      Program = M;
-    }
+  // Find out if the pass still crashes on the cleaned up program...
+  if (runPasses(PassesToRun)) {
+    // Yup, it does, keep the reduced version...
+    delete M;
+    AnyReduction = true;
+  } else {
+    delete Program;   // Otherwise, restore the original module...
+    Program = M;
   }
 
   if (AnyReduction)