Skip to content

Commit

Permalink
Change some more methods to return SingleTypeRegMask
Browse files Browse the repository at this point in the history
  • Loading branch information
kunalspathak committed May 31, 2024
1 parent cedb079 commit edccae2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/coreclr/jit/compiler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,7 @@ inline regNumber genRegNumFromMask(const SingleTypeRegSet& mask)
regNumber regNum = (regNumber)genLog2(mask);

/* Make sure we got it right */
assert(genRegMask(regNum) == mask);
assert(genSingleTypeRegMask(regNum) == mask);

return regNum;
}
Expand Down
6 changes: 3 additions & 3 deletions src/coreclr/jit/lsra.h
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ class LinearScan : public LinearScanInterface
// This is the main driver
virtual PhaseStatus doLinearScan();

static bool isSingleRegister(regMaskTP regMask)
static bool isSingleRegister(SingleTypeRegSet regMask)
{
return (genExactlyOneBit(regMask));
}
Expand Down Expand Up @@ -2735,7 +2735,7 @@ class RefPosition

// isFixedRefOfRegMask indicates that the RefPosition has a fixed assignment to the register
// specified by the given mask
bool isFixedRefOfRegMask(regMaskTP regMask)
bool isFixedRefOfRegMask(SingleTypeRegSet regMask)
{
assert(genMaxOneBit(regMask));
return (registerAssignment == regMask);
Expand All @@ -2744,7 +2744,7 @@ class RefPosition
// isFixedRefOfReg indicates that the RefPosition has a fixed assignment to the given register
bool isFixedRefOfReg(regNumber regNum)
{
return (isFixedRefOfRegMask(genRegMask(regNum)));
return (isFixedRefOfRegMask(genSingleTypeRegMask(regNum)));
}

#ifdef TARGET_ARM64
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/jit/lsrabuild.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3082,7 +3082,7 @@ RefPosition* LinearScan::BuildDef(GenTree* tree, SingleTypeRegSet dstCandidates,

if (dstCandidates != RBM_NONE)
{
assert((tree->GetRegNum() == REG_NA) || (dstCandidates == genRegMask(tree->GetRegByIndex(multiRegIdx))));
assert((tree->GetRegNum() == REG_NA) || (dstCandidates == genSingleTypeRegMask(tree->GetRegByIndex(multiRegIdx))));
}

RegisterType type;
Expand All @@ -3105,7 +3105,7 @@ RefPosition* LinearScan::BuildDef(GenTree* tree, SingleTypeRegSet dstCandidates,
{
if (!tree->IsMultiRegNode() || (multiRegIdx == 0))
{
assert((dstCandidates == RBM_NONE) || (dstCandidates == genRegMask(tree->GetRegNum())));
assert((dstCandidates == RBM_NONE) || (dstCandidates == genSingleTypeRegMask(tree->GetRegNum())));
dstCandidates = genSingleTypeRegMask(tree->GetRegNum());
}
else
Expand Down

0 comments on commit edccae2

Please sign in to comment.