void InlineResult::Report()
{
+
+#ifdef DEBUG
+ // If this is a failure of a specific inline candidate and we haven't captured
+ // a failing observation yet, do so now.
+ if (IsFailure() && (m_Call != nullptr))
+ {
+ // compiler should have revoked candidacy on the call by now
+ assert((m_Call->gtFlags & GTF_CALL_INLINE_CANDIDATE) == 0);
+
+ if (m_Call->gtInlineObservation == InlineObservation::CALLEE_UNUSED_INITIAL)
+ {
+ m_Call->gtInlineObservation = m_Policy->GetObservation();
+ }
+ }
+#endif // DEBUG
+
// If we weren't actually inlining, user may have suppressed
// reporting via setReported(). If so, do nothing.
if (m_Reported)
JITDUMP(format, m_Description, ResultString(), ReasonString(), caller, callee);
}
-
- // If the inline failed, leave information on the call so we can
- // later recover what observation lead to the failure.
- if (IsFailure() && (m_Call != nullptr))
- {
- // compiler should have revoked candidacy on the call by now
- assert((m_Call->gtFlags & GTF_CALL_INLINE_CANDIDATE) == 0);
-
- m_Call->gtInlineObservation = m_Policy->GetObservation();
- }
-
#endif // DEBUG
// Was the result NEVER? If so we might want to propagate this to