diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2010-07-31 00:32:17 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2010-07-31 00:32:17 +0000 |
commit | 40f18838b7948a16073da2f5a9d1abccaaaa56e9 (patch) | |
tree | 9564464449329b84e412bd512271c11bfdd20955 /llvm/lib/Transforms/IPO/LoopExtractor.cpp | |
parent | c1561b84000dcca2132131bbb26be800b7c89d8b (diff) | |
download | bcm5719-llvm-40f18838b7948a16073da2f5a9d1abccaaaa56e9.tar.gz bcm5719-llvm-40f18838b7948a16073da2f5a9d1abccaaaa56e9.zip |
The BlockExtractorPass() constructor was not reading the BlockFile and that was
exactly what bugpoint expected it to do.
There was also only one user of
BlockExtractorPass(const std::vector<BasicBlock*> &B), so just remove it and
make BlockExtractorPass read BlockFile.
This fixes bugpoint's block extraction.
Nick, please review.
llvm-svn: 109936
Diffstat (limited to 'llvm/lib/Transforms/IPO/LoopExtractor.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/LoopExtractor.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/IPO/LoopExtractor.cpp b/llvm/lib/Transforms/IPO/LoopExtractor.cpp index fa8eb5e9fb2..fd60adfc507 100644 --- a/llvm/lib/Transforms/IPO/LoopExtractor.cpp +++ b/llvm/lib/Transforms/IPO/LoopExtractor.cpp @@ -147,12 +147,10 @@ namespace { std::vector<std::pair<std::string, std::string> > BlocksToNotExtractByName; public: static char ID; // Pass identification, replacement for typeid - explicit BlockExtractorPass(const std::vector<BasicBlock*> &B) - : ModulePass(&ID), BlocksToNotExtract(B) { + BlockExtractorPass() : ModulePass(&ID) { if (!BlockFile.empty()) LoadFile(BlockFile.c_str()); } - BlockExtractorPass() : ModulePass(&ID) {} bool runOnModule(Module &M); }; @@ -166,9 +164,9 @@ INITIALIZE_PASS(BlockExtractorPass, "extract-blocks", // createBlockExtractorPass - This pass extracts all blocks (except those // specified in the argument list) from the functions in the module. // -ModulePass *llvm::createBlockExtractorPass(const std::vector<BasicBlock*> &BTNE) +ModulePass *llvm::createBlockExtractorPass() { - return new BlockExtractorPass(BTNE); + return new BlockExtractorPass(); } void BlockExtractorPass::LoadFile(const char *Filename) { |