diff --git a/src/coreclr/jit/inductionvariableopts.cpp b/src/coreclr/jit/inductionvariableopts.cpp index fba8febf0fe7c..748c5adebd629 100644 --- a/src/coreclr/jit/inductionvariableopts.cpp +++ b/src/coreclr/jit/inductionvariableopts.cpp @@ -1300,7 +1300,7 @@ class StrengthReductionContext bool InitializeCursors(GenTreeLclVarCommon* primaryIVLcl, ScevAddRec* primaryIV); bool IsUseExpectedToBeRemoved(BasicBlock* block, Statement* stmt, GenTreeLclVarCommon* tree); void AdvanceCursors(ArrayStack* cursors, ArrayStack* nextCursors); - bool CheckAdvancedCursors(ArrayStack* cursors, int derivedLevel, ScevAddRec** nextIV); + bool CheckAdvancedCursors(ArrayStack* cursors, ScevAddRec** nextIV); bool StaysWithinManagedObject(ArrayStack* cursors, ScevAddRec* addRec); bool TryReplaceUsesWithNewPrimaryIV(ArrayStack* cursors, ScevAddRec* iv); BasicBlock* FindUpdateInsertionPoint(ArrayStack* cursors); @@ -1423,7 +1423,7 @@ bool StrengthReductionContext::TryStrengthReduce() // Verify that all cursors still represent the same IV ScevAddRec* nextIV = nullptr; - if (!CheckAdvancedCursors(nextCursors, derivedLevel + 1, &nextIV)) + if (!CheckAdvancedCursors(nextCursors, &nextIV)) { break; } @@ -1734,7 +1734,7 @@ void StrengthReductionContext::AdvanceCursors(ArrayStack* cursors, A for (int i = 0; i < nextCursors->Height(); i++) { CursorInfo& nextCursor = nextCursors->BottomRef(i); - printf(" [%d] [%06u]%s: ", i, nextCursor.Tree == nullptr ? 0 : Compiler::dspTreeID(nextCursor.Tree)); + printf(" [%d] [%06u]: ", i, nextCursor.Tree == nullptr ? 0 : Compiler::dspTreeID(nextCursor.Tree)); if (nextCursor.IV == nullptr) { printf(""); @@ -1755,8 +1755,6 @@ void StrengthReductionContext::AdvanceCursors(ArrayStack* cursors, A // // Parameters: // cursors - List of cursors that were advanced. -// derivedLevel - The derived level of the advanced IVs. That is, the number -// of times they are derived from the primary IV. // nextIV - [out] The next derived IV from the subset of advanced // cursors to now consider strength reducing. // @@ -1768,9 +1766,7 @@ void StrengthReductionContext::AdvanceCursors(ArrayStack* cursors, A // This function may remove cursors from m_cursors1 and m_cursors2 if it // decides to no longer consider some cursors for strength reduction. // -bool StrengthReductionContext::CheckAdvancedCursors(ArrayStack* cursors, - int derivedLevel, - ScevAddRec** nextIV) +bool StrengthReductionContext::CheckAdvancedCursors(ArrayStack* cursors, ScevAddRec** nextIV) { *nextIV = nullptr;