summaryrefslogtreecommitdiff
path: root/src/jit/inline.h
diff options
context:
space:
mode:
authorAndy Ayers <andya@microsoft.com>2016-04-29 17:27:40 -0700
committerAndy Ayers <andya@microsoft.com>2016-05-03 09:31:38 -0700
commitf57f3737a356f12fb494945c5750980fe14af020 (patch)
treedc058ccd3ab7cb5107dd0f94bf79bfe0a325479a /src/jit/inline.h
parentea040083e57c706c6fe4c34f5a51b5851c249b43 (diff)
downloadcoreclr-f57f3737a356f12fb494945c5750980fe14af020.tar.gz
coreclr-f57f3737a356f12fb494945c5750980fe14af020.tar.bz2
coreclr-f57f3737a356f12fb494945c5750980fe14af020.zip
Inliner: initial version of SizePolicy
Add a new inline policy that tries to inline as much as possible without increasing method size. Fix one test that had an expected inline that doesn't happen under the SizePolicy, by marking a method with AggressiveInline.
Diffstat (limited to 'src/jit/inline.h')
-rw-r--r--src/jit/inline.h22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/jit/inline.h b/src/jit/inline.h
index d0eaf42735..19c3e2d09a 100644
--- a/src/jit/inline.h
+++ b/src/jit/inline.h
@@ -656,7 +656,7 @@ public:
InlineResult* inlineResult);
// Compiler associated with this strategy
- Compiler* GetCompiler()
+ Compiler* GetCompiler() const
{
return m_Compiler;
}
@@ -665,23 +665,35 @@ public:
InlineContext* GetRootContext();
// Get IL size for maximum allowable inline
- unsigned GetMaxInlineILSize()
+ unsigned GetMaxInlineILSize() const
{
return m_MaxInlineSize;
}
// Get depth of maximum allowable inline
- unsigned GetMaxInlineDepth()
+ unsigned GetMaxInlineDepth() const
{
return m_MaxInlineDepth;
}
- // Number of successful inlines into the root.
- unsigned GetInlineCount()
+ // Number of successful inlines into the root
+ unsigned GetInlineCount() const
{
return m_InlineCount;
}
+ // Return the current code size estimate for this method
+ int GetCurrentSizeEstimate() const
+ {
+ return m_CurrentSizeEstimate;
+ }
+
+ // Return the initial code size estimate for this method
+ int GetInitialSizeEstimate() const
+ {
+ return m_InitialSizeEstimate;
+ }
+
// Inform strategy that there's a new inline candidate.
void NoteCandidate();