Use ClonedCodeInfo to avoid another walk over the inlined code, this this

time in common C cases.

llvm-svn: 25285
This commit is contained in:
Chris Lattner 2006-01-13 19:18:11 +00:00
parent 19e6a08d78
commit e24f79a032
1 changed files with 4 additions and 2 deletions

View File

@ -215,8 +215,10 @@ bool llvm::InlineFunction(CallSite CS) {
} }
} }
// If we are inlining tail call instruction through an invoke or // If we are inlining tail call instruction through a call site that isn't
if (MustClearTailCallFlags) { // marked 'tail', we must remove the tail marker for any calls in the inlined
// code.
if (MustClearTailCallFlags && InlinedFunctionInfo.ContainsCalls) {
for (Function::iterator BB = FirstNewBlock, E = Caller->end(); for (Function::iterator BB = FirstNewBlock, E = Caller->end();
BB != E; ++BB) BB != E; ++BB)
for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I) for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I)