Skip to content

Commit 8920fde

Browse files
committed
Merge from mainline.
Revert r63600. llvm-svn: 63787
1 parent 597ba6f commit 8920fde

File tree

2 files changed

+2
-39
lines changed

2 files changed

+2
-39
lines changed

llvm/lib/Transforms/Utils/InlineFunction.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ bool llvm::InlineFunction(InvokeInst *II, CallGraph *CG, const TargetData *TD) {
4141
/// block of the inlined code (the last block is the end of the function),
4242
/// and InlineCodeInfo is information about the code that got inlined.
4343
static void HandleInlinedInvoke(InvokeInst *II, BasicBlock *FirstNewBlock,
44-
ClonedCodeInfo &InlinedCodeInfo,
45-
CallGraph *CG) {
44+
ClonedCodeInfo &InlinedCodeInfo) {
4645
BasicBlock *InvokeDest = II->getUnwindDest();
4746
std::vector<Value*> InvokeDestPHIValues;
4847

@@ -94,10 +93,6 @@ static void HandleInlinedInvoke(InvokeInst *II, BasicBlock *FirstNewBlock,
9493
// Make sure that anything using the call now uses the invoke!
9594
CI->replaceAllUsesWith(II);
9695

97-
// Update the callgraph.
98-
if (CG)
99-
(*CG)[Caller]->replaceCallSite(CI, II);
100-
10196
// Delete the unconditional branch inserted by splitBasicBlock
10297
BB->getInstList().pop_back();
10398
Split->getInstList().pop_front(); // Delete the original call
@@ -438,7 +433,7 @@ bool llvm::InlineFunction(CallSite CS, CallGraph *CG, const TargetData *TD) {
438433
// any inlined 'unwind' instructions into branches to the invoke exception
439434
// destination, and call instructions into invoke instructions.
440435
if (InvokeInst *II = dyn_cast<InvokeInst>(TheCall))
441-
HandleInlinedInvoke(II, FirstNewBlock, InlinedFunctionInfo, CG);
436+
HandleInlinedInvoke(II, FirstNewBlock, InlinedFunctionInfo);
442437

443438
// If we cloned in _exactly one_ basic block, and if that block ends in a
444439
// return instruction, we splice the body of the inlined callee directly into

llvm/test/Transforms/Inline/2009-02-02-InvokeUpdateCG.ll

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)