aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Transforms/Utils/InlineCost.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/Transforms/Utils/InlineCost.h b/include/llvm/Transforms/Utils/InlineCost.h
index 2d0c397..bfcb546 100644
--- a/include/llvm/Transforms/Utils/InlineCost.h
+++ b/include/llvm/Transforms/Utils/InlineCost.h
@@ -27,6 +27,14 @@ namespace llvm {
template<class PtrType, unsigned SmallSize>
class SmallPtrSet;
+ namespace InlineConstants {
+ // Various magic constants used to adjust heuristics.
+ const int CallPenalty = 5;
+ const int LastCallToStaticBonus = -15000;
+ const int ColdccPenalty = 2000;
+ const int NoreturnPenalty = 10000;
+ }
+
/// InlineCost - Represent the cost of inlining a function. This
/// supports special values for functions which should "always" or
/// "never" be inlined. Otherwise, the cost represents a unitless