diff options
author | Chris Lattner <sabre@nondot.org> | 2004-05-11 21:54:13 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-05-11 21:54:13 +0000 |
commit | 5e783ab0b5fc3407ec59f1a598fdb9ef3b96b287 (patch) | |
tree | 53e4a120252283227be4ed517078b1d689228da8 /tools/bugpoint/BugDriver.h | |
parent | 1c2f68631e7710343bb7ba11b082ac91bdb9374d (diff) | |
download | llvm-5e783ab0b5fc3407ec59f1a598fdb9ef3b96b287.tar.gz llvm-5e783ab0b5fc3407ec59f1a598fdb9ef3b96b287.tar.bz2 llvm-5e783ab0b5fc3407ec59f1a598fdb9ef3b96b287.tar.xz |
Implement basic block extraction for the miscompilation debugger. This still needs
two things: the FIXME in ExtractBlocks needs to be implemented, and the basic block
extractor itself needs to have enough bugs fixed for this to be more or less
useful.
Until the time that this is generally useful, it is hidden behind the new bugpoint
-enable-block-extraction option. I hope to get the FIXME done tonight.
Also of note, this patch adds a -extract-bbs option to bugpoint which can be used
to debug the block extractor. (hint hint Misha :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13471 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/bugpoint/BugDriver.h')
-rw-r--r-- | tools/bugpoint/BugDriver.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/bugpoint/BugDriver.h b/tools/bugpoint/BugDriver.h index 92fdb7c0a1..5e78145b6f 100644 --- a/tools/bugpoint/BugDriver.h +++ b/tools/bugpoint/BugDriver.h @@ -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 |