]> granicus.if.org Git - llvm/commitdiff
[Bugpoint redesign] Reduced scope of variables in Delta implementation
authorDiego Trevino Ferrer <diegof30@gmail.com>
Wed, 14 Aug 2019 20:34:12 +0000 (20:34 +0000)
committerDiego Trevino Ferrer <diegof30@gmail.com>
Wed, 14 Aug 2019 20:34:12 +0000 (20:34 +0000)
Summary: This diff also changed the check in `Delta.cpp` to verify interesting-ness, so it exits when the input isn't interesting

Subscribers: llvm-commits

Tags: #llvm

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

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

tools/llvm-reduce/deltas/Delta.cpp

index cf8d88424e274ed060a2fc1478d3018d0aa3d5f6..d33c8e39bf3c9564b50d4b41afc0fea4983d0656 100644 (file)
@@ -115,16 +115,15 @@ void llvm::runDeltaPass(
     outs() << "\nNothing to reduce\n";
     return;
   }
+  if (!Test.run(Test.getReducedFilepath())) {
+    outs() << "\nInput isn't interesting! Verify interesting-ness test\n";
+    exit(1);
+  }
 
   std::vector<Chunk> Chunks = {{1, Targets}};
   std::set<Chunk> UninterestingChunks;
   std::unique_ptr<Module> ReducedProgram;
 
-  if (!Test.run(Test.getReducedFilepath())) {
-    outs() << "\nInput isn't interesting! Verify interesting-ness test\n";
-    return;
-  }
-
   if (!increaseGranularity(Chunks)) {
     outs() << "\nAlready at minimum size. Cannot reduce anymore.\n";
     return;