Skip to content

Commit

Permalink
remove the logging
Browse files Browse the repository at this point in the history
  • Loading branch information
kunalspathak committed Sep 11, 2024
1 parent bfc1444 commit d8f2f17
Showing 1 changed file with 4 additions and 48 deletions.
52 changes: 4 additions & 48 deletions src/coreclr/jit/lsra.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9714,14 +9714,6 @@ void LinearScan::resolveEdge(BasicBlock* fromBlock,
}
}

// kpathak
bool startLogging = false;
bool revertChange = false;
if ((fromBlock->bbNum == 12) && (toBlock->bbNum == 13))
{
printf("targetRegsToDo=%x\n", targetRegsToDo);
startLogging = true;
}
// First:
// - Perform all moves from reg to stack (no ordering needed on these)
// - For reg to reg moves, record the current location, associating their
Expand Down Expand Up @@ -9784,14 +9776,6 @@ void LinearScan::resolveEdge(BasicBlock* fromBlock,
source[toReg] = (regNumberSmall)fromReg;
sourceIntervals[fromReg] = interval;
targetRegsToDo |= genRegMask(toReg);
if (startLogging && genIsValidFloatReg(fromReg))
{
printf("Added ");
interval->tinyDump();
printf(" for %s -> %s (%s). targetRegsToDo= ", getRegName(fromReg), getRegName(toReg), ((interval->registerType == TYP_DOUBLE)? "double" : "float"));
compiler->dumpRegMask(targetRegsToDo.getLow(), TYP_FLOAT);
printf("\n");
}
}
}
// REGISTER to REGISTER MOVES
Expand All @@ -9815,13 +9799,7 @@ void LinearScan::resolveEdge(BasicBlock* fromBlock,
Interval* interval = sourceIntervals[sourceReg];
Interval* otherTargetInterval = nullptr;
regNumber otherHalfTargetReg = REG_NA;
if (startLogging && genIsValidFloatReg(sourceReg))
{
printf("For ");
interval->tinyDump();
printf(" from %s -> %s.\n", getRegName(sourceReg), getRegName(targetReg));
}
if (!revertChange && genIsValidFloatReg(targetReg) && !genIsValidDoubleReg(targetReg))
if (genIsValidFloatReg(targetReg) && !genIsValidDoubleReg(targetReg))
{
otherHalfTargetReg = REG_PREV(targetReg);
otherTargetInterval = sourceIntervals[otherHalfTargetReg];
Expand Down Expand Up @@ -9859,27 +9837,11 @@ void LinearScan::resolveEdge(BasicBlock* fromBlock,
// Perform reg to reg moves
while (targetRegsToDo.IsNonEmpty())
{
if (startLogging)
{
printf("targetRegsReady: ");
compiler->dumpRegMask(targetRegsReady.getLow(), TYP_FLOAT);
printf(", targetRegsToDo: ");
compiler->dumpRegMask(targetRegsToDo.getLow(), TYP_FLOAT);
printf("\n");
}
while (targetRegsReady.IsNonEmpty())
{
regNumber targetReg = genFirstRegNumFromMaskAndToggle(targetRegsReady);
targetRegsToDo.RemoveRegNumFromMask(targetReg);
if (startLogging)
{
printf("targetReg: %s, ", getRegName(targetReg));
printf("targetRegsReady: ");
compiler->dumpRegMask(targetRegsReady.getLow(), TYP_FLOAT);
printf(", targetRegsToDo: ");
compiler->dumpRegMask(targetRegsToDo.getLow(), TYP_FLOAT);
printf("\n");
}

assert(location[targetReg] != targetReg);
assert(targetReg < REG_COUNT);
regNumber sourceReg = (regNumber)source[targetReg];
Expand All @@ -9891,13 +9853,7 @@ void LinearScan::resolveEdge(BasicBlock* fromBlock,
assert(interval != nullptr);
addResolution(block, insertionPoint, interval, targetReg,
fromReg DEBUG_ARG(fromBlock) DEBUG_ARG(toBlock) DEBUG_ARG(resolveTypeName[resolveType]));
if (startLogging && genIsValidFloatReg(sourceReg))
{
printf("Added resolution: %s -> %s\n", getRegName(fromReg), getRegName(targetReg));
printf(" Removing ");
interval->tinyDump();
printf("for %s.\n", getRegName(sourceReg));
}

sourceIntervals[sourceReg] = nullptr;
location[sourceReg] = REG_NA;

Expand Down Expand Up @@ -10098,7 +10054,7 @@ void LinearScan::resolveEdge(BasicBlock* fromBlock,
#ifdef TARGET_ARM
Interval* otherTargetInterval = nullptr;
regNumber otherHalfTargetReg = REG_NA;
if (!revertChange && genIsValidFloatReg(targetReg) && !genIsValidDoubleReg(targetReg))
if (genIsValidFloatReg(targetReg) && !genIsValidDoubleReg(targetReg))
{
otherHalfTargetReg = REG_PREV(targetReg);
otherTargetInterval = sourceIntervals[otherHalfTargetReg];
Expand Down

0 comments on commit d8f2f17

Please sign in to comment.