Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JIT: Remove unnecessary argument and fix a JITDUMP format string #105074

Merged
merged 2 commits into from
Jul 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions src/coreclr/jit/inductionvariableopts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1300,7 +1300,7 @@ class StrengthReductionContext
bool InitializeCursors(GenTreeLclVarCommon* primaryIVLcl, ScevAddRec* primaryIV);
bool IsUseExpectedToBeRemoved(BasicBlock* block, Statement* stmt, GenTreeLclVarCommon* tree);
void AdvanceCursors(ArrayStack<CursorInfo>* cursors, ArrayStack<CursorInfo>* nextCursors);
bool CheckAdvancedCursors(ArrayStack<CursorInfo>* cursors, int derivedLevel, ScevAddRec** nextIV);
bool CheckAdvancedCursors(ArrayStack<CursorInfo>* cursors, ScevAddRec** nextIV);
bool StaysWithinManagedObject(ArrayStack<CursorInfo>* cursors, ScevAddRec* addRec);
bool TryReplaceUsesWithNewPrimaryIV(ArrayStack<CursorInfo>* cursors, ScevAddRec* iv);
BasicBlock* FindUpdateInsertionPoint(ArrayStack<CursorInfo>* cursors);
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -1734,7 +1734,7 @@ void StrengthReductionContext::AdvanceCursors(ArrayStack<CursorInfo>* 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("<null IV>");
Expand All @@ -1755,8 +1755,6 @@ void StrengthReductionContext::AdvanceCursors(ArrayStack<CursorInfo>* 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.
//
Expand All @@ -1768,9 +1766,7 @@ void StrengthReductionContext::AdvanceCursors(ArrayStack<CursorInfo>* 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<CursorInfo>* cursors,
int derivedLevel,
ScevAddRec** nextIV)
bool StrengthReductionContext::CheckAdvancedCursors(ArrayStack<CursorInfo>* cursors, ScevAddRec** nextIV)
{
*nextIV = nullptr;

Expand Down
Loading