Implement basic block extraction for the miscompilation debugger. This still needs
[oota-llvm.git] / tools / bugpoint / BugDriver.h
index 92fdb7c0a1c9cec9fd5721f8a162f84350664b17..5e78145b6f8769be35cb1885a91b3de3f969622a 100644 (file)
@@ -24,6 +24,7 @@ namespace llvm {
 class PassInfo;
 class Module;
 class Function;
+class BasicBlock;
 class AbstractInterpreter;
 class Instruction;
 
@@ -200,6 +201,14 @@ public:
   /// program or if the loop extractor crashes.
   Module *ExtractLoop(Module *M);
 
+  /// ExtractMappedBlocksFromModule - Extract all but the specified basic blocks
+  /// into their own functions.  The only detail is that M is actually a module
+  /// cloned from the one the BBs are in, so some mapping needs to be performed.
+  /// If this operation fails for some reason (ie the implementation is buggy),
+  /// this function should return null, otherwise it returns a new Module.
+  Module *ExtractMappedBlocksFromModule(const std::vector<BasicBlock*> &BBs,
+                                        Module *M);
+
   /// runPassesOn - Carefully run the specified set of pass on the specified
   /// module, returning the transformed module on success, or a null pointer on
   /// failure.  If AutoDebugCrashes is set to true, then bugpoint will