From: Andy Ayers Date: Fri, 13 Jan 2017 00:59:00 +0000 (-0800) Subject: JIT: remove match accounting from inliner state machine X-Git-Tag: submit/tizen/20210909.063632~11030^2~8449^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4aefdd70ff0df62793f823713c9f712ca2f11b61;p=platform%2Fupstream%2Fdotnet%2Fruntime.git JIT: remove match accounting from inliner state machine The inliner's code-size estimating state machine keeps count of matches, but the count was only used in an assert that checked that the count did not overflow. The assert fired when jit stress drove the inliner to evaluate a huge method as a potential inline candidate and the count reached the overflow value. This change removes the counting and the related assert. Closes dotnet/coreclr#8932. Commit migrated from https://github.com/dotnet/coreclr/commit/7a4db6754a20aa6cb0a11850d08c844b9653af94 --- diff --git a/src/coreclr/src/jit/sm.cpp b/src/coreclr/src/jit/sm.cpp index 859b238..b016899 100644 --- a/src/coreclr/src/jit/sm.cpp +++ b/src/coreclr/src/jit/sm.cpp @@ -51,11 +51,6 @@ void CodeSeqSM::Start(Compiler* comp) void CodeSeqSM::Reset() { curState = SM_STATE_ID_START; - -#ifdef DEBUG - // Reset the state occurence counts - memset(StateMatchedCounts, 0, sizeof(StateMatchedCounts)); -#endif } void CodeSeqSM::End() diff --git a/src/coreclr/src/jit/sm.h b/src/coreclr/src/jit/sm.h index 33d6509..8c90e0b 100644 --- a/src/coreclr/src/jit/sm.h +++ b/src/coreclr/src/jit/sm.h @@ -42,9 +42,7 @@ public: inline void TermStateMatch(SM_STATE_ID stateID DEBUGARG(bool verbose)) { assert(States[stateID].term); - assert(StateMatchedCounts[stateID] < _UI16_MAX); #ifdef DEBUG - ++StateMatchedCounts[stateID]; #ifndef SMGEN_COMPILE if (verbose) { @@ -65,7 +63,6 @@ public: } #ifdef DEBUG - WORD StateMatchedCounts[NUM_SM_STATES]; const char* StateDesc(SM_STATE_ID stateID); #endif