diff options
author | Chad Rosier <mcrosier@apple.com> | 2011-06-21 02:09:03 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2011-06-21 02:09:03 +0000 |
commit | 184f3b37e2a6812c647c2614613a9eebfe33247b (patch) | |
tree | c716044e0e18ef2e5a91d6daa7286896d80d38b5 /llvm/lib/Transforms/Utils/InlineFunction.cpp | |
parent | fe356d356ad411306d360da58c9b5fef1175fc95 (diff) | |
download | llvm-184f3b37e2a6812c647c2614613a9eebfe33247b.zip llvm-184f3b37e2a6812c647c2614613a9eebfe33247b.tar.gz llvm-184f3b37e2a6812c647c2614613a9eebfe33247b.tar.bz2 |
Revert r133435 and r133449 to appease buildbots.
llvm-svn: 133499
Diffstat (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/InlineFunction.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp index 18ecd61..946e62f 100644 --- a/llvm/lib/Transforms/Utils/InlineFunction.cpp +++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp @@ -1097,15 +1097,15 @@ bool llvm::InlineFunction(CallSite CS, InlineFunctionInfo &IFI) { TheCall->replaceAllUsesWith(Returns[0]->getReturnValue()); } - // Update PHI nodes that use the ReturnBB to use the AfterCallBB. - BasicBlock *ReturnBB = Returns[0]->getParent(); - ReturnBB->replaceAllUsesWith(AfterCallBB); - // Splice the code from the return block into the block that it will return // to, which contains the code that was after the call. + BasicBlock *ReturnBB = Returns[0]->getParent(); AfterCallBB->getInstList().splice(AfterCallBB->begin(), ReturnBB->getInstList()); + // Update PHI nodes that use the ReturnBB to use the AfterCallBB. + ReturnBB->replaceAllUsesWith(AfterCallBB); + // Delete the return instruction now and empty ReturnBB now. Returns[0]->eraseFromParent(); ReturnBB->eraseFromParent(); @@ -1125,8 +1125,8 @@ bool llvm::InlineFunction(CallSite CS, InlineFunctionInfo &IFI) { // Splice the code entry block into calling block, right before the // unconditional branch. - CalleeEntry->replaceAllUsesWith(OrigBB); // Update PHI nodes OrigBB->getInstList().splice(Br, CalleeEntry->getInstList()); + CalleeEntry->replaceAllUsesWith(OrigBB); // Update PHI nodes // Remove the unconditional branch. OrigBB->getInstList().erase(Br); |