summaryrefslogtreecommitdiff
path: root/include/llvm/Analysis/InlineCost.h
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2011-01-26 02:58:39 +0000
committerEric Christopher <echristo@apple.com>2011-01-26 02:58:39 +0000
commit5d83955b8c2bdca28d0a0c62a9d0f9bbd5a6d668 (patch)
tree5da3ed3420490a80233182e7b3e1e2083db78a2d /include/llvm/Analysis/InlineCost.h
parent717082b9bd634ea406ca63b3a9358ffd09091b9c (diff)
downloadllvm-5d83955b8c2bdca28d0a0c62a9d0f9bbd5a6d668.tar.gz
llvm-5d83955b8c2bdca28d0a0c62a9d0f9bbd5a6d668.tar.bz2
llvm-5d83955b8c2bdca28d0a0c62a9d0f9bbd5a6d668.tar.xz
Separate out the constant bonus from the size reduction metrics. Rework
a few loops accordingly. Should be no functional change. This is a step for more accurate cost/benefit analysis of devirt/inlining bonuses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124275 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/InlineCost.h')
-rw-r--r--include/llvm/Analysis/InlineCost.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/llvm/Analysis/InlineCost.h b/include/llvm/Analysis/InlineCost.h
index a138fc41e9..e53d7f6528 100644
--- a/include/llvm/Analysis/InlineCost.h
+++ b/include/llvm/Analysis/InlineCost.h
@@ -96,10 +96,9 @@ namespace llvm {
public:
unsigned ConstantWeight;
unsigned AllocaWeight;
- unsigned ConstantBonus;
- ArgInfo(unsigned CWeight, unsigned AWeight, unsigned CBonus)
- : ConstantWeight(CWeight), AllocaWeight(AWeight), ConstantBonus(CBonus)
+ ArgInfo(unsigned CWeight, unsigned AWeight)
+ : ConstantWeight(CWeight), AllocaWeight(AWeight)
{}
};
@@ -125,6 +124,7 @@ namespace llvm {
// the ValueMap will update itself when this happens.
ValueMap<const Function *, FunctionInfo> CachedFunctionInfo;
+ unsigned CountBonusForConstant(Value *V);
public:
/// getInlineCost - The heuristic used to determine if we should inline the