diff options
author | Chris Lattner <sabre@nondot.org> | 2004-08-13 03:17:39 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-08-13 03:17:39 +0000 |
commit | f06b0432045ddf4bf59f1994b2c7ac17fb56789e (patch) | |
tree | e42854d41a25f8cedef4440e610ee84da8734d8d /llvm/lib/Transforms/Utils | |
parent | 664d88cbd05c45a48f03af000852c89ae39318cf (diff) | |
download | bcm5719-llvm-f06b0432045ddf4bf59f1994b2c7ac17fb56789e.tar.gz bcm5719-llvm-f06b0432045ddf4bf59f1994b2c7ac17fb56789e.zip |
When we code extract some stuff, leave the codeRepl block in the place where
the extracted code was, instead of putting it at the end of the function
llvm-svn: 15716
Diffstat (limited to 'llvm/lib/Transforms/Utils')
-rw-r--r-- | llvm/lib/Transforms/Utils/CodeExtractor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/CodeExtractor.cpp b/llvm/lib/Transforms/Utils/CodeExtractor.cpp index b3de38a5db3..4521038dd66 100644 --- a/llvm/lib/Transforms/Utils/CodeExtractor.cpp +++ b/llvm/lib/Transforms/Utils/CodeExtractor.cpp @@ -622,7 +622,7 @@ ExtractCodeRegion(const std::vector<BasicBlock*> &code) { Function *oldFunction = header->getParent(); // This takes place of the original loop - BasicBlock *codeReplacer = new BasicBlock("codeRepl", oldFunction); + BasicBlock *codeReplacer = new BasicBlock("codeRepl", oldFunction, header); // The new function needs a root node because other nodes can branch to the // head of the region, but the entry node of a function cannot have preds. |