diff options
author | Eric Christopher <echristo@apple.com> | 2011-01-22 21:56:53 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2011-01-22 21:56:53 +0000 |
commit | c70e037b73f21cd638031b2e32c1c8720c684916 (patch) | |
tree | 45083f3557722420680eba16fcbff3daf6e21327 /llvm/lib/Analysis/InlineCost.cpp | |
parent | 08e8b3b629de18115996c63841eceb3083ac51ea (diff) | |
download | bcm5719-llvm-c70e037b73f21cd638031b2e32c1c8720c684916.tar.gz bcm5719-llvm-c70e037b73f21cd638031b2e32c1c8720c684916.zip |
Add a FIXME explaining the move to a single indirect call bonus per function
that we can change from indirect to direct.
llvm-svn: 124045
Diffstat (limited to 'llvm/lib/Analysis/InlineCost.cpp')
-rw-r--r-- | llvm/lib/Analysis/InlineCost.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp index 6e251aa2140..86f98c6b0fe 100644 --- a/llvm/lib/Analysis/InlineCost.cpp +++ b/llvm/lib/Analysis/InlineCost.cpp @@ -189,6 +189,11 @@ unsigned CodeMetrics::CountBonusForConstant(Value *V) { } } + // FIXME: The only reason we're applying the bonus once is while it's great + // to devirtualize calls the magnitude of the bonus x number of call sites + // can lead to a huge code explosion when we prefer to inline 1000 instruction + // functions that have 10 call sites. This should be made a function of the + // estimated inline penalty/benefit + the indirect call bonus. if (indirectCallBonus) Bonus += InlineConstants::IndirectCallBonus; return Bonus; |