summaryrefslogtreecommitdiff
path: root/src/jit/inlinepolicy.h
diff options
context:
space:
mode:
authorAndy Ayers <andya@microsoft.com>2016-03-09 16:04:11 -0800
committerAndy Ayers <andya@microsoft.com>2016-03-09 18:20:38 -0800
commit9cbd25871b360647686a79be6d9021bbefd84313 (patch)
tree06bc910f599177f77f7ce817dc3e38c0c66155e0 /src/jit/inlinepolicy.h
parent587e7c08ef1edc53d2ce6bf90da0c63ba70aa00b (diff)
downloadcoreclr-9cbd25871b360647686a79be6d9021bbefd84313.tar.gz
coreclr-9cbd25871b360647686a79be6d9021bbefd84313.tar.bz2
coreclr-9cbd25871b360647686a79be6d9021bbefd84313.zip
Inline refactoring: move profitability assessment to LegacyPolicy
LegacyPolicy now encapsulates all the computations needed to evaluate whether an inline is profitable or not. This completes the main objective of the refactoring effort, which was to preserve and encapsulate the current inliner's behavior.
Diffstat (limited to 'src/jit/inlinepolicy.h')
-rw-r--r--src/jit/inlinepolicy.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/jit/inlinepolicy.h b/src/jit/inlinepolicy.h
index 0f9138ffb8..34e1b99e78 100644
--- a/src/jit/inlinepolicy.h
+++ b/src/jit/inlinepolicy.h
@@ -43,7 +43,6 @@ public:
, m_Compiler(compiler)
, m_StateMachine(nullptr)
, m_CodeSize(0)
- , m_NativeSizeEstimate(NATIVE_SIZE_INVALID)
, m_CallsiteFrequency(InlineCallsiteFrequency::UNUSED)
, m_IsForceInline(false)
, m_IsForceInlineKnown(false)
@@ -67,9 +66,7 @@ public:
void NoteDouble(InlineObservation obs, double value) override;
// Policy determinations
- double DetermineMultiplier() override;
- int DetermineNativeSizeEstimate() override;
- int DetermineCallsiteNativeSizeEstimate(CORINFO_METHOD_INFO* methodInfo) override;
+ void DetermineProfitability(CORINFO_METHOD_INFO* methodInfo) override;
// Policy policies
bool PropagateNeverToRuntime() const override { return true; }
@@ -85,6 +82,9 @@ private:
void SetCandidate(InlineObservation obs);
void SetFailure(InlineObservation obs);
void SetNever(InlineObservation obs);
+ double DetermineMultiplier();
+ int DetermineNativeSizeEstimate();
+ int DetermineCallsiteNativeSizeEstimate(CORINFO_METHOD_INFO* methodInfo);
// Constants
const unsigned MAX_BASIC_BLOCKS = 5;
@@ -93,7 +93,6 @@ private:
Compiler* m_Compiler;
CodeSeqSM* m_StateMachine;
unsigned m_CodeSize;
- int m_NativeSizeEstimate;
InlineCallsiteFrequency m_CallsiteFrequency;
bool m_IsForceInline :1;
bool m_IsForceInlineKnown :1;