diff options
| author | Nick Lewycky <nicholas@mxc.ca> | 2009-02-03 06:30:37 +0000 |
|---|---|---|
| committer | Nick Lewycky <nicholas@mxc.ca> | 2009-02-03 06:30:37 +0000 |
| commit | 05daea5d32f79eec3257970f725d7f51f9223fcd (patch) | |
| tree | 99d85aada7362edfe9d4b31329bc3467ae169cd7 /llvm/lib/Transforms/Utils | |
| parent | 0136282a9c6d5d62e218bba107bb82263a56ac19 (diff) | |
| download | bcm5719-llvm-05daea5d32f79eec3257970f725d7f51f9223fcd.tar.gz bcm5719-llvm-05daea5d32f79eec3257970f725d7f51f9223fcd.zip | |
Revert r63600. It didn't fix the bug, it just moved it a bit.
llvm-svn: 63618
Diffstat (limited to 'llvm/lib/Transforms/Utils')
| -rw-r--r-- | llvm/lib/Transforms/Utils/InlineFunction.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp index eb136b50349..758b97ea915 100644 --- a/llvm/lib/Transforms/Utils/InlineFunction.cpp +++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp @@ -41,8 +41,7 @@ bool llvm::InlineFunction(InvokeInst *II, CallGraph *CG, const TargetData *TD) { /// block of the inlined code (the last block is the end of the function), /// and InlineCodeInfo is information about the code that got inlined. static void HandleInlinedInvoke(InvokeInst *II, BasicBlock *FirstNewBlock, - ClonedCodeInfo &InlinedCodeInfo, - CallGraph *CG) { + ClonedCodeInfo &InlinedCodeInfo) { BasicBlock *InvokeDest = II->getUnwindDest(); std::vector<Value*> InvokeDestPHIValues; @@ -94,10 +93,6 @@ static void HandleInlinedInvoke(InvokeInst *II, BasicBlock *FirstNewBlock, // Make sure that anything using the call now uses the invoke! CI->replaceAllUsesWith(II); - // Update the callgraph. - if (CG) - (*CG)[Caller]->replaceCallSite(CI, II); - // Delete the unconditional branch inserted by splitBasicBlock BB->getInstList().pop_back(); Split->getInstList().pop_front(); // Delete the original call @@ -438,7 +433,7 @@ bool llvm::InlineFunction(CallSite CS, CallGraph *CG, const TargetData *TD) { // any inlined 'unwind' instructions into branches to the invoke exception // destination, and call instructions into invoke instructions. if (InvokeInst *II = dyn_cast<InvokeInst>(TheCall)) - HandleInlinedInvoke(II, FirstNewBlock, InlinedFunctionInfo, CG); + HandleInlinedInvoke(II, FirstNewBlock, InlinedFunctionInfo); // If we cloned in _exactly one_ basic block, and if that block ends in a // return instruction, we splice the body of the inlined callee directly into |

