[llvm-commits] CVS: llvm/lib/Transforms/Utils/InlineFunction.cpp

Chris Lattner lattner at cs.uiuc.edu
Fri Jan 13 11:18:24 PST 2006



Changes in directory llvm/lib/Transforms/Utils:

InlineFunction.cpp updated: 1.38 -> 1.39
---
Log message:

Use ClonedCodeInfo to avoid another walk over the inlined code, this this
time in common C cases.


---
Diffs of the changes:  (+4 -2)

 InlineFunction.cpp |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)


Index: llvm/lib/Transforms/Utils/InlineFunction.cpp
diff -u llvm/lib/Transforms/Utils/InlineFunction.cpp:1.38 llvm/lib/Transforms/Utils/InlineFunction.cpp:1.39
--- llvm/lib/Transforms/Utils/InlineFunction.cpp:1.38	Fri Jan 13 13:15:15 2006
+++ llvm/lib/Transforms/Utils/InlineFunction.cpp	Fri Jan 13 13:18:11 2006
@@ -215,8 +215,10 @@
         }
   }
 
-  // If we are inlining tail call instruction through an invoke or
-  if (MustClearTailCallFlags) {
+  // If we are inlining tail call instruction through a call site that isn't 
+  // 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();
          BB != E; ++BB)
       for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I)






More information about the llvm-commits mailing list