diff options
author | Andy Ayers <andya@microsoft.com> | 2016-04-20 16:35:20 -0700 |
---|---|---|
committer | Andy Ayers <andya@microsoft.com> | 2016-04-20 17:15:18 -0700 |
commit | 048efd8bc74f5af0ae7a772c0afa536bdd49d2f3 (patch) | |
tree | e8a547db5a6371dc806f3b1a39ff31dbe039cd33 /src/jit/inline.h | |
parent | 354b777f798cd5ebb85894a721f5bb4c1e9b49f5 (diff) | |
download | coreclr-048efd8bc74f5af0ae7a772c0afa536bdd49d2f3.tar.gz coreclr-048efd8bc74f5af0ae7a772c0afa536bdd49d2f3.tar.bz2 coreclr-048efd8bc74f5af0ae7a772c0afa536bdd49d2f3.zip |
Inliner: restore ability to dump jit time, plus some cleanup
I zeroed out the jit time measurement when refactoring the data dumping
code to live in the InlineStrategy class, because it required adding a
helper to the Compiler class. Didn't mean to leave it this way, but did.
So, fixing it how I'd meant to all along.
Also, move a few of the inlining related constants and setup computation
over to InlineStrategy. I'd move `DEFAULT_MAX_INLINE_SIZE` too, but it
ends up getting used for some non-inlining purposes, so will hold off on
cleaning that part up.
Diffstat (limited to 'src/jit/inline.h')
-rw-r--r-- | src/jit/inline.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/jit/inline.h b/src/jit/inline.h index 0ce95d7b97..c23d8fa52a 100644 --- a/src/jit/inline.h +++ b/src/jit/inline.h @@ -661,6 +661,12 @@ public: // Root context InlineContext* GetRootContext(); + // Get IL size for maximum allowable inline + unsigned GetMaxInlineILSize() + { + return m_MaxInlineSize; + } + // Number of successful inlines into the root. unsigned GetInlineCount() { @@ -679,12 +685,18 @@ public: // Dump textual description of inlines done so far. void Dump(); - // Dump data-format description of inlines done so far. void DumpData(); #endif // defined(DEBUG) || defined(INLINE_DATA) + // Some inline limit values + enum + { + ALWAYS_INLINE_SIZE = 16, + IMPLEMENTATION_MAX_INLINE_SIZE= _UI16_MAX + }; + private: // Create a context for the root method. @@ -696,7 +708,10 @@ private: // Cap on allowable increase in jit time due to inlining. // Multiplicative, so BUDGET = 10 means up to 10x increase // in jit time. - enum { BUDGET = 10 }; + enum + { + BUDGET = 10 + }; // Estimate the jit time change because of this inline. int EstimateTime(InlineContext* context); @@ -718,6 +733,7 @@ private: unsigned m_CandidateCount; unsigned m_InlineAttemptCount; unsigned m_InlineCount; + unsigned m_MaxInlineSize; int m_InitialTimeBudget; int m_InitialTimeEstimate; int m_CurrentTimeBudget; |