[llvm-commits] CVS: llvm/tools/bugpoint/Miscompilation.cpp

Chris Lattner lattner at cs.uiuc.edu
Thu Apr 24 17:26:05 PDT 2003


Changes in directory llvm/tools/bugpoint:

Miscompilation.cpp updated: 1.5 -> 1.6

---
Log message:

Adjust to match new ListReducer interface
Move function to generic code


---
Diffs of the changes:

Index: llvm/tools/bugpoint/Miscompilation.cpp
diff -u llvm/tools/bugpoint/Miscompilation.cpp:1.5 llvm/tools/bugpoint/Miscompilation.cpp:1.6
--- llvm/tools/bugpoint/Miscompilation.cpp:1.5	Thu Apr 24 15:16:29 2003
+++ llvm/tools/bugpoint/Miscompilation.cpp	Thu Apr 24 17:24:22 2003
@@ -32,13 +32,13 @@
 public:
   ReduceMiscompilingPasses(BugDriver &bd) : BD(bd) {}
 
-  virtual TestResult doTest(const std::vector<const PassInfo*> &Prefix,
-                            const std::vector<const PassInfo*> &Kept);
+  virtual TestResult doTest(std::vector<const PassInfo*> &Prefix,
+                            std::vector<const PassInfo*> &Kept);
 };
 
 ReduceMiscompilingPasses::TestResult
-ReduceMiscompilingPasses::doTest(const std::vector<const PassInfo*> &Prefix,
-                                 const std::vector<const PassInfo*> &Kept) {
+ReduceMiscompilingPasses::doTest(std::vector<const PassInfo*> &Prefix,
+                                 std::vector<const PassInfo*> &Kept) {
   // First, run the program with just the Kept passes.  If it is still broken
   // with JUST the kept passes, discard the prefix passes.
   std::cout << "Checking to see if '" << getPassesString(Kept)
@@ -135,8 +135,8 @@
 public:
   ReduceMiscompilingFunctions(BugDriver &bd) : BD(bd) {}
 
-  virtual TestResult doTest(const std::vector<Function*> &Prefix,
-                            const std::vector<Function*> &Kept) {
+  virtual TestResult doTest(std::vector<Function*> &Prefix,
+                            std::vector<Function*> &Kept) {
     if (TestFuncs(Kept, false))
       return KeepSuffix;
     if (!Prefix.empty() && TestFuncs(Prefix, false))
@@ -146,21 +146,6 @@
   
   bool TestFuncs(const std::vector<Function*> &Prefix, bool EmitBytecode);
 };
-
-// DeleteFunctionBody - "Remove" the function by deleting all of it's basic
-// blocks, making it external.
-//
-static void DeleteFunctionBody(Function *F) {
-  // First, break circular use/def chain references...
-  for (Function::iterator I = F->begin(), E = F->end(); I != E; ++I)
-    I->dropAllReferences();
-
-  // Next, delete all of the basic blocks.
-  F->getBasicBlockList().clear();
-
-  assert(F->isExternal() && "This didn't make the function external!");
-}
-
 
 bool ReduceMiscompilingFunctions::TestFuncs(const std::vector<Function*> &Funcs,
                                             bool EmitBytecode) {





More information about the llvm-commits mailing list