@@ -4040,7 +4040,7 @@ void LinearScan::processKills(RefPosition* killRefPosition)
4040
4040
RefPosition* nextKill = killRefPosition->nextRefPosition;
4041
4041
4042
4042
regMaskTP killedRegs = killRefPosition->registerAssignment;
4043
- while (killedRegs != RBM_NONE )
4043
+ while (killedRegs.IsNonEmpty() )
4044
4044
{
4045
4045
regNumber killedReg = genFirstRegNumFromMaskAndToggle(killedRegs);
4046
4046
RegRecord* regRecord = getRegisterRecord(killedReg);
@@ -4744,7 +4744,7 @@ void LinearScan::processBlockStartLocations(BasicBlock* currentBlock)
4744
4744
// Only focus on actual registers present
4745
4745
deadCandidates &= actualRegistersMask;
4746
4746
4747
- while (deadCandidates != RBM_NONE )
4747
+ while (deadCandidates.IsNonEmpty() )
4748
4748
{
4749
4749
regNumber reg = genFirstRegNumFromMaskAndToggle(deadCandidates);
4750
4750
RegRecord* physRegRecord = getRegisterRecord(reg);
@@ -4940,7 +4940,7 @@ void LinearScan::freeRegisters(regMaskTP regsToFree)
4940
4940
4941
4941
INDEBUG(dumpLsraAllocationEvent(LSRA_EVENT_FREE_REGS));
4942
4942
makeRegsAvailable(regsToFree);
4943
- while (regsToFree != RBM_NONE )
4943
+ while (regsToFree.IsNonEmpty() )
4944
4944
{
4945
4945
regNumber nextReg = genFirstRegNumFromMaskAndToggle(regsToFree);
4946
4946
@@ -5028,7 +5028,7 @@ void LinearScan::allocateRegistersMinimal()
5028
5028
// mess with the dump, since this was previously being done before the call below
5029
5029
// to dumpRegRecords.
5030
5030
regMaskTP tempRegsToMakeInactive = (regsToMakeInactive | delayRegsToMakeInactive);
5031
- while (tempRegsToMakeInactive != RBM_NONE )
5031
+ while (tempRegsToMakeInactive.IsNonEmpty() )
5032
5032
{
5033
5033
regNumber nextReg = genFirstRegNumFromMaskAndToggle(tempRegsToMakeInactive);
5034
5034
RegRecord* regRecord = getRegisterRecord(nextReg);
@@ -5102,10 +5102,10 @@ void LinearScan::allocateRegistersMinimal()
5102
5102
copyRegsToFree = RBM_NONE;
5103
5103
regsInUseThisLocation = regsInUseNextLocation;
5104
5104
regsInUseNextLocation = RBM_NONE;
5105
- if ((regsToFree | delayRegsToFree) != RBM_NONE )
5105
+ if ((regsToFree | delayRegsToFree).IsNonEmpty() )
5106
5106
{
5107
5107
freeRegisters(regsToFree);
5108
- if ((currentLocation > (prevLocation + 1)) && (delayRegsToFree != RBM_NONE ))
5108
+ if ((currentLocation > (prevLocation + 1)) && (delayRegsToFree.IsNonEmpty() ))
5109
5109
{
5110
5110
// We should never see a delayReg that is delayed until a Location that has no RefPosition
5111
5111
// (that would be the RefPosition that it was supposed to interfere with).
@@ -5711,7 +5711,7 @@ void LinearScan::allocateRegisters()
5711
5711
// mess with the dump, since this was previously being done before the call below
5712
5712
// to dumpRegRecords.
5713
5713
regMaskTP tempRegsToMakeInactive = (regsToMakeInactive | delayRegsToMakeInactive);
5714
- while (tempRegsToMakeInactive != RBM_NONE )
5714
+ while (tempRegsToMakeInactive.IsNonEmpty() )
5715
5715
{
5716
5716
regNumber nextReg = genFirstRegNumFromMaskAndToggle(tempRegsToMakeInactive);
5717
5717
RegRecord* regRecord = getRegisterRecord(nextReg);
@@ -5789,10 +5789,10 @@ void LinearScan::allocateRegisters()
5789
5789
consecutiveRegsInUseThisLocation = RBM_NONE;
5790
5790
}
5791
5791
#endif
5792
- if ((regsToFree | delayRegsToFree) != RBM_NONE )
5792
+ if ((regsToFree | delayRegsToFree).IsNonEmpty() )
5793
5793
{
5794
5794
freeRegisters(regsToFree);
5795
- if ((currentLocation > (prevLocation + 1)) && (delayRegsToFree != RBM_NONE ))
5795
+ if ((currentLocation > (prevLocation + 1)) && (delayRegsToFree.IsNonEmpty() ))
5796
5796
{
5797
5797
// We should never see a delayReg that is delayed until a Location that has no RefPosition
5798
5798
// (that would be the RefPosition that it was supposed to interfere with).
@@ -9174,15 +9174,15 @@ void LinearScan::handleOutgoingCriticalEdges(BasicBlock* block)
9174
9174
regMaskTP sameToRegMask =
9175
9175
genRegMask(sameToReg, getIntervalForLocalVar(outResolutionSetVarIndex)->registerType);
9176
9176
if (maybeSameLivePaths &&
9177
- (((sameToRegMask & liveOutRegs) != RBM_NONE) || ((sameToRegMask & sameWriteRegs) != RBM_NONE )))
9177
+ (((sameToRegMask & liveOutRegs).IsNonEmpty()) || ((sameToRegMask & sameWriteRegs).IsNonEmpty() )))
9178
9178
{
9179
9179
sameToReg = REG_NA;
9180
9180
}
9181
9181
// If this register is busy because it is used by a switch table at the end of the block
9182
9182
// (or for Arm64, it is consumed by JCMP), we can't do the copy in this block since we can't
9183
9183
// insert it after the switch (or for Arm64, can't insert and overwrite the operand/source
9184
9184
// of operand of JCMP).
9185
- if ((sameToRegMask & consumedRegs) != RBM_NONE )
9185
+ if ((sameToRegMask & consumedRegs).IsNonEmpty() )
9186
9186
{
9187
9187
sameToReg = REG_NA;
9188
9188
}
@@ -9232,7 +9232,7 @@ void LinearScan::handleOutgoingCriticalEdges(BasicBlock* block)
9232
9232
9233
9233
if (!VarSetOps::IsEmpty(compiler, sameResolutionSet))
9234
9234
{
9235
- if ((sameWriteRegs & diffReadRegs) != RBM_NONE )
9235
+ if ((sameWriteRegs & diffReadRegs).IsNonEmpty() )
9236
9236
{
9237
9237
// We cannot split the "same" and "diff" regs if the "same" set writes registers
9238
9238
// that must be read by the "diff" set. (Note that when these are done as a "batch"
@@ -9746,7 +9746,7 @@ void LinearScan::resolveEdge(BasicBlock* fromBlock,
9746
9746
9747
9747
// First, find all the ones that are ready to move now
9748
9748
regMaskTP targetCandidates = targetRegsToDo;
9749
- while (targetCandidates != RBM_NONE )
9749
+ while (targetCandidates.IsNonEmpty() )
9750
9750
{
9751
9751
regNumber targetReg = genFirstRegNumFromMask(targetCandidates);
9752
9752
regMaskTP targetRegMask = genRegMask(targetReg);
@@ -9775,9 +9775,9 @@ void LinearScan::resolveEdge(BasicBlock* fromBlock,
9775
9775
}
9776
9776
9777
9777
// Perform reg to reg moves
9778
- while (targetRegsToDo != RBM_NONE )
9778
+ while (targetRegsToDo.IsNonEmpty() )
9779
9779
{
9780
- while (targetRegsReady != RBM_NONE )
9780
+ while (targetRegsReady.IsNonEmpty() )
9781
9781
{
9782
9782
regNumber targetReg = genFirstRegNumFromMask(targetRegsReady);
9783
9783
regMaskTP targetRegMask = genRegMask(targetReg);
@@ -9848,7 +9848,7 @@ void LinearScan::resolveEdge(BasicBlock* fromBlock,
9848
9848
}
9849
9849
}
9850
9850
}
9851
- if (targetRegsToDo != RBM_NONE )
9851
+ if (targetRegsToDo.IsNonEmpty() )
9852
9852
{
9853
9853
regNumber targetReg = genFirstRegNumFromMask(targetRegsToDo);
9854
9854
regMaskTP targetRegMask = genRegMask(targetReg);
@@ -9910,7 +9910,7 @@ void LinearScan::resolveEdge(BasicBlock* fromBlock,
9910
9910
// Look at the remaining registers from targetRegsToDo (which we expect to be relatively
9911
9911
// small at this point) to find out what's currently in targetReg.
9912
9912
regMaskTP mask = targetRegsToDo;
9913
- while (mask != RBM_NONE && otherTargetReg == REG_NA)
9913
+ while (mask.IsNonEmpty() && otherTargetReg == REG_NA)
9914
9914
{
9915
9915
regNumber nextReg = genFirstRegNumFromMaskAndToggle(mask);
9916
9916
if (location[source[nextReg]] == targetReg)
@@ -10013,7 +10013,7 @@ void LinearScan::resolveEdge(BasicBlock* fromBlock,
10013
10013
10014
10014
// Finally, perform stack to reg moves
10015
10015
// All the target regs will be empty at this point
10016
- while (targetRegsFromStack != RBM_NONE )
10016
+ while (targetRegsFromStack.IsNonEmpty() )
10017
10017
{
10018
10018
regNumber targetReg = genFirstRegNumFromMaskAndToggle(targetRegsFromStack);
10019
10019
@@ -11525,7 +11525,7 @@ void LinearScan::dumpRegRecords()
11525
11525
#endif // FEATURE_PARTIAL_SIMD_CALLEE_SAVE
11526
11526
printf("%c", activeChar);
11527
11527
}
11528
- else if ((genRegMask(regNum) & regsBusyUntilKill) != RBM_NONE )
11528
+ else if ((genRegMask(regNum) & regsBusyUntilKill).IsNonEmpty() )
11529
11529
{
11530
11530
printf(columnFormatArray, "Busy");
11531
11531
}
0 commit comments