[llvm-branch-commits] [llvm-branch] r101683 - /llvm/branches/Apple/Morbo/lib/Analysis/InlineCost.cpp
Dale Johannesen
dalej at apple.com
Sat Apr 17 17:13:23 PDT 2010
Author: johannes
Date: Sat Apr 17 19:13:23 2010
New Revision: 101683
URL: http://llvm.org/viewvc/llvm-project?rev=101683&view=rev
Log:
Merge 101658. svn merge didn't get this one for some reason.
Modified:
llvm/branches/Apple/Morbo/lib/Analysis/InlineCost.cpp
Modified: llvm/branches/Apple/Morbo/lib/Analysis/InlineCost.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/lib/Analysis/InlineCost.cpp?rev=101683&r1=101682&r2=101683&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/lib/Analysis/InlineCost.cpp (original)
+++ llvm/branches/Apple/Morbo/lib/Analysis/InlineCost.cpp Sat Apr 17 19:13:23 2010
@@ -309,9 +309,14 @@
FunctionInfo &CallerFI = CachedFunctionInfo[Caller];
// If we haven't calculated this information yet, do so now.
- if (CallerFI.Metrics.NumBlocks == 0)
+ if (CallerFI.Metrics.NumBlocks == 0) {
CallerFI.analyzeFunction(Caller);
+ // Recompute the CalleeFI pointer, getting Caller could have invalidated
+ // it.
+ CalleeFI = CachedFunctionInfo[Callee];
+ }
+
// Don't inline a callee with dynamic alloca into a caller without them.
// Functions containing dynamic alloca's are inefficient in various ways;
// don't create more inefficiency.
@@ -410,6 +415,7 @@
resetCachedCostInfo(Caller);
return;
}
+
CallerFI.Metrics.NeverInline |= CalleeFI.Metrics.NeverInline;
CallerFI.Metrics.usesDynamicAlloca |= CalleeFI.Metrics.usesDynamicAlloca;
More information about the llvm-branch-commits
mailing list