[llvm-commits] CVS: llvm/tools/bugpoint/BugDriver.h CrashDebugger.cpp ExtractFunction.cpp

Chris Lattner lattner at cs.uiuc.edu
Tue Aug 5 10:52:01 PDT 2003


Changes in directory llvm/tools/bugpoint:

BugDriver.h updated: 1.13 -> 1.14
CrashDebugger.cpp updated: 1.13 -> 1.14
ExtractFunction.cpp updated: 1.11 -> 1.12

---
Log message:

If we're debugging the SimplifyCFG pass, we _REALLY_ don't want to use it for
narrowing, no matter what.


---
Diffs of the changes:

Index: llvm/tools/bugpoint/BugDriver.h
diff -u llvm/tools/bugpoint/BugDriver.h:1.13 llvm/tools/bugpoint/BugDriver.h:1.14
--- llvm/tools/bugpoint/BugDriver.h:1.13	Fri Aug  1 11:13:49 2003
+++ llvm/tools/bugpoint/BugDriver.h	Tue Aug  5 10:51:05 2003
@@ -27,6 +27,8 @@
 class CBE;
 class GCC;
 
+extern bool DisableSimplifyCFG;
+
 class BugDriver {
   const std::string ToolName;  // Name of bugpoint
   std::string ReferenceOutputFile; // Name of `good' output file


Index: llvm/tools/bugpoint/CrashDebugger.cpp
diff -u llvm/tools/bugpoint/CrashDebugger.cpp:1.13 llvm/tools/bugpoint/CrashDebugger.cpp:1.14
--- llvm/tools/bugpoint/CrashDebugger.cpp:1.13	Tue Aug  5 10:26:21 2003
+++ llvm/tools/bugpoint/CrashDebugger.cpp	Tue Aug  5 10:51:05 2003
@@ -304,11 +304,13 @@
   // to a return instruction then running simplifycfg, which can potentially
   // shrinks the code dramatically quickly
   //
-  std::vector<BasicBlock*> Blocks;
-  for (Module::iterator I = Program->begin(), E = Program->end(); I != E; ++I)
-    for (Function::iterator FI = I->begin(), E = I->end(); FI != E; ++FI)
-      Blocks.push_back(FI);
-  ReduceCrashingBlocks(*this).reduceList(Blocks);
+  if (!DisableSimplifyCFG) {
+    std::vector<BasicBlock*> Blocks;
+    for (Module::iterator I = Program->begin(), E = Program->end(); I != E; ++I)
+      for (Function::iterator FI = I->begin(), E = I->end(); FI != E; ++FI)
+        Blocks.push_back(FI);
+    ReduceCrashingBlocks(*this).reduceList(Blocks);
+  }
 
   // FIXME: This should use the list reducer to converge faster by deleting
   // larger chunks of instructions at a time!


Index: llvm/tools/bugpoint/ExtractFunction.cpp
diff -u llvm/tools/bugpoint/ExtractFunction.cpp:1.11 llvm/tools/bugpoint/ExtractFunction.cpp:1.12
--- llvm/tools/bugpoint/ExtractFunction.cpp:1.11	Fri Aug  1 11:13:49 2003
+++ llvm/tools/bugpoint/ExtractFunction.cpp	Tue Aug  5 10:51:05 2003
@@ -16,6 +16,8 @@
 #include "llvm/Constant.h"
 #include "Support/CommandLine.h"
 
+bool DisableSimplifyCFG = false;
+
 namespace {
   cl::opt<bool>
   NoADCE("disable-adce",
@@ -23,8 +25,8 @@
   cl::opt<bool>
   NoDCE ("disable-dce",
          cl::desc("Do not use the -dce pass to reduce testcases"));
-  cl::opt<bool>
-  NoSCFG("disable-simplifycfg",
+  cl::opt<bool, true>
+  NoSCFG("disable-simplifycfg", cl::location(DisableSimplifyCFG),
          cl::desc("Do not use the -simplifycfg pass to reduce testcases"));
   cl::opt<bool>
   NoFinalCleanup("disable-final-cleanup",
@@ -67,7 +69,7 @@
   //Passes.add(createInstructionCombiningPass());
   if (Simplification > 1 && !NoDCE)
     Passes.add(createDeadCodeEliminationPass());
-  if (Simplification && !NoSCFG)
+  if (Simplification && !DisableSimplifyCFG)
     Passes.add(createCFGSimplificationPass());      // Delete dead control flow
 
   Passes.add(createVerifierPass());





More information about the llvm-commits mailing list