summaryrefslogtreecommitdiff
path: root/src/jit/inline.h
diff options
context:
space:
mode:
authorAndy Ayers <andya@microsoft.com>2016-04-26 19:54:33 -0700
committerAndy Ayers <andya@microsoft.com>2016-04-27 11:49:23 -0700
commit8bed64ec2b36608367fc8c075b796b1bd34ab89f (patch)
tree1e0bc7fa72f31f380c8237ad36c4d899fff9ba8d /src/jit/inline.h
parent1da89fe00fa48d589c4817093497bf8bfcfdc34a (diff)
downloadcoreclr-8bed64ec2b36608367fc8c075b796b1bd34ab89f.tar.gz
coreclr-8bed64ec2b36608367fc8c075b796b1bd34ab89f.tar.bz2
coreclr-8bed64ec2b36608367fc8c075b796b1bd34ab89f.zip
Inliner: implement FullPolicy
The FullPolicy will be used to grow maximal potential inline trees for methods. It inlines all legal candidates subject to depth and size limits. Add a config flag to select this as the policy to use. Also add a config flag so the inline depth limit becomes adjustable, and rework the code so that checking this limit is now a matter of policy. Add in an implementation max depth limit of 1000. Revise names of some statics to make their intent clearer, and add some missing header comments.
Diffstat (limited to 'src/jit/inline.h')
-rw-r--r--src/jit/inline.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/jit/inline.h b/src/jit/inline.h
index d8f9c54b6d..cd16c93c7c 100644
--- a/src/jit/inline.h
+++ b/src/jit/inline.h
@@ -670,6 +670,12 @@ public:
return m_MaxInlineSize;
}
+ // Get depth of maximum allowable inline
+ unsigned GetMaxInlineDepth()
+ {
+ return m_MaxInlineDepth;
+ }
+
// Number of successful inlines into the root.
unsigned GetInlineCount()
{
@@ -701,7 +707,8 @@ public:
enum
{
ALWAYS_INLINE_SIZE = 16,
- IMPLEMENTATION_MAX_INLINE_SIZE= _UI16_MAX
+ IMPLEMENTATION_MAX_INLINE_SIZE = _UI16_MAX,
+ IMPLEMENTATION_MAX_INLINE_DEPTH = 1000
};
private:
@@ -731,8 +738,8 @@ private:
int EstimateSize(InlineContext* context);
#if defined(DEBUG) || defined(INLINE_DATA)
- static bool s_DumpDataHeader;
- static bool s_DumpXmlHeader;
+ static bool s_HasDumpedDataHeader;
+ static bool s_HasDumpedXmlHeader;
#endif // defined(DEBUG) || defined(INLINE_DATA)
Compiler* m_Compiler;
@@ -742,6 +749,7 @@ private:
unsigned m_InlineAttemptCount;
unsigned m_InlineCount;
unsigned m_MaxInlineSize;
+ unsigned m_MaxInlineDepth;
int m_InitialTimeBudget;
int m_InitialTimeEstimate;
int m_CurrentTimeBudget;