// Let underlying policy do its thing.
DiscretionaryPolicy::NoteInt(obs, value);
+ if (InlDecisionIsFailure(m_Decision))
+ {
+ return;
+ }
+
// Fail fast for inlinees that are too large to ever inline.
// The value of 120 is model-dependent; see notes above.
if (!m_IsForceInline && (obs == InlineObservation::CALLEE_IL_CODE_SIZE) && (value >= 120))
SetNever(InlineObservation::CALLEE_TOO_MUCH_IL);
return;
}
-
- // Safeguard against overly deep inlines
- if (obs == InlineObservation::CALLSITE_DEPTH)
- {
- unsigned depthLimit = m_RootCompiler->m_inlineStrategy->GetMaxInlineDepth();
-
- if (m_CallsiteDepth > depthLimit)
- {
- SetFailure(InlineObservation::CALLSITE_IS_TOO_DEEP);
- return;
- }
- }
}
//------------------------------------------------------------------------
// Let underlying policy do its thing.
DiscretionaryPolicy::NoteInt(obs, value);
+ if (InlDecisionIsFailure(m_Decision))
+ {
+ return;
+ }
+
// Fail fast for inlinees that are too large to ever inline.
//
if (!m_IsForceInline && (obs == InlineObservation::CALLEE_IL_CODE_SIZE) && (value >= 1000))
return;
}
- // Safeguard against overly deep inlines
- if (obs == InlineObservation::CALLSITE_DEPTH)
- {
- unsigned depthLimit = m_RootCompiler->m_inlineStrategy->GetMaxInlineDepth();
-
- if (m_CallsiteDepth > depthLimit)
- {
- SetFailure(InlineObservation::CALLSITE_IS_TOO_DEEP);
- return;
- }
- }
-
// This observation happens after we determine profitability
// so we need to special case it here.
//