mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-26 21:47:07 +00:00
Implement ExtractCodeRegion()
llvm-svn: 12070
This commit is contained in:
parent
057b5d5519
commit
c58f772803
@ -443,7 +443,7 @@ CodeExtractor::emitCallAndSwitchStatement(Function *newFunction,
|
||||
brInst);
|
||||
}
|
||||
|
||||
// Rewrite branches into exists which return a value based on which
|
||||
// Rewrite branches into exits which return a value based on which
|
||||
// exit we take from this function
|
||||
if (brInst->isUnconditional()) {
|
||||
if (!contains(code, brInst->getSuccessor(0))) {
|
||||
@ -566,6 +566,14 @@ Function *CodeExtractor::ExtractCodeRegion(const std::vector<BasicBlock*> &code)
|
||||
return newFunction;
|
||||
}
|
||||
|
||||
/// ExtractCodeRegion - slurp a sequence of basic blocks into a brand new
|
||||
/// function
|
||||
///
|
||||
Function* llvm::ExtractCodeRegion(const std::vector<BasicBlock*> &code) {
|
||||
CodeExtractor CE;
|
||||
return CE.ExtractCodeRegion(code);
|
||||
}
|
||||
|
||||
/// ExtractBasicBlock - slurp a natural loop into a brand new function
|
||||
///
|
||||
Function* llvm::ExtractLoop(Loop *L) {
|
||||
|
Loading…
Reference in New Issue
Block a user