Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
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 #8932.
  • Loading branch information
AndyAyersMS committed Jan 13, 2017
1 parent b775947 commit 7a4db67
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
5 changes: 0 additions & 5 deletions src/jit/sm.cpp
Expand Up @@ -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()
Expand Down
3 changes: 0 additions & 3 deletions src/jit/sm.h
Expand Up @@ -42,9 +42,7 @@ class CodeSeqSM // Represent a particualr run of the state machine
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)
{
Expand All @@ -65,7 +63,6 @@ class CodeSeqSM // Represent a particualr run of the state machine
}

#ifdef DEBUG
WORD StateMatchedCounts[NUM_SM_STATES];
const char* StateDesc(SM_STATE_ID stateID);
#endif

Expand Down

0 comments on commit 7a4db67

Please sign in to comment.