mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-07 14:33:15 +00:00
* Add implementation of ExtractBasicBlock()
* Add comments to ExtractLoop() git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12053 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a8a06367f8
commit
b97fce5252
@ -566,8 +566,18 @@ Function *CodeExtractor::ExtractCodeRegion(const std::vector<BasicBlock*> &code)
|
||||
return newFunction;
|
||||
}
|
||||
|
||||
/// ExtractBasicBlock - slurp a natural loop into a brand new function
|
||||
///
|
||||
Function* llvm::ExtractLoop(Loop *L) {
|
||||
CodeExtractor CE;
|
||||
return CE.ExtractCodeRegion(L->getBlocks());
|
||||
}
|
||||
|
||||
/// ExtractBasicBlock - slurp a basic block into a brand new function
|
||||
///
|
||||
Function* llvm::ExtractBasicBlock(BasicBlock *BB) {
|
||||
CodeExtractor CE;
|
||||
std::vector<BasicBlock*> Blocks;
|
||||
Blocks.push_back(BB);
|
||||
return CE.ExtractCodeRegion(Blocks);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user