diff options
Diffstat (limited to 'src/jit/inline.h')
-rw-r--r-- | src/jit/inline.h | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/src/jit/inline.h b/src/jit/inline.h index 19c3e2d09a..cac0fc8145 100644 --- a/src/jit/inline.h +++ b/src/jit/inline.h @@ -218,7 +218,7 @@ class InlinePolicy public: // Factory method for getting policies - static InlinePolicy* GetPolicy(Compiler* compiler, bool isPrejitRoot); + static InlinePolicy* GetPolicy(Compiler* compiler, InlineContext* context, bool isPrejitRoot); // Obligatory virtual dtor virtual ~InlinePolicy() {} @@ -289,13 +289,14 @@ public: // particular call for inlining. InlineResult(Compiler* compiler, GenTreeCall* call, - const char* context); + InlineContext* inlineContext, + const char* description); // Construct a new InlineResult to evaluate a particular // method to see if it is inlineable. InlineResult(Compiler* compiler, CORINFO_METHOD_HANDLE method, - const char* context); + const char* description); // Has the policy determined this inline should fail? bool IsFailure() const @@ -442,6 +443,12 @@ public: m_Reported = true; } + // Get the InlineContext for this inline + InlineContext* GetInlineContext() const + { + return m_InlineContext; + } + private: // No copying or assignment allowed. @@ -454,9 +461,10 @@ private: Compiler* m_RootCompiler; InlinePolicy* m_Policy; GenTreeCall* m_Call; + InlineContext* m_InlineContext; CORINFO_METHOD_HANDLE m_Caller; // immediate caller's handle CORINFO_METHOD_HANDLE m_Callee; - const char* m_Context; + const char* m_Description; bool m_Reported; }; @@ -570,6 +578,12 @@ public: // Dump full subtree in xml format void DumpXml(FILE* file = stderr, unsigned indent = 0); + // Get callee handle + CORINFO_METHOD_HANDLE GetCallee() const + { + return m_Callee; + } + #endif // defined(DEBUG) || defined(INLINE_DATA) // Get the parent context for this context. @@ -591,7 +605,7 @@ public: } // Get the observation that supported or disqualified this inline. - InlineObservation GetObservation() + InlineObservation GetObservation() const { return m_Observation; } @@ -608,6 +622,12 @@ public: return m_CodeSizeEstimate; } + // True if this is the root context + bool IsRoot() const + { + return m_Parent == nullptr; + } + private: InlineContext(InlineStrategy* strategy); |