Skip to content

Commit e10e2f7

Browse files
authored
[RISCV] Remove 'Use' from name of two members of DemandedFields. NFC (#163234)
Every member represents a vtype field that is used/demanded, but the others don't say 'Use'. Make them consistent.
1 parent e56b592 commit e10e2f7

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -168,13 +168,13 @@ struct DemandedFields {
168168
// If this is true, we demand that VTYPE is set to some legal state, i.e. that
169169
// vill is unset.
170170
bool VILL = false;
171-
bool UseTWiden = false;
172-
bool UseAltFmt = false;
171+
bool TWiden = false;
172+
bool AltFmt = false;
173173

174174
// Return true if any part of VTYPE was used
175175
bool usedVTYPE() const {
176176
return SEW || LMUL || SEWLMULRatio || TailPolicy || MaskPolicy || VILL ||
177-
UseTWiden || UseAltFmt;
177+
TWiden || AltFmt;
178178
}
179179

180180
// Return true if any property of VL was used
@@ -190,8 +190,8 @@ struct DemandedFields {
190190
TailPolicy = true;
191191
MaskPolicy = true;
192192
VILL = true;
193-
UseTWiden = true;
194-
UseAltFmt = true;
193+
TWiden = true;
194+
AltFmt = true;
195195
}
196196

197197
// Mark all VL properties as demanded
@@ -217,8 +217,8 @@ struct DemandedFields {
217217
TailPolicy |= B.TailPolicy;
218218
MaskPolicy |= B.MaskPolicy;
219219
VILL |= B.VILL;
220-
UseAltFmt |= B.UseAltFmt;
221-
UseTWiden |= B.UseTWiden;
220+
AltFmt |= B.AltFmt;
221+
TWiden |= B.TWiden;
222222
}
223223

224224
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
@@ -266,8 +266,8 @@ struct DemandedFields {
266266
OS << "TailPolicy=" << TailPolicy << ", ";
267267
OS << "MaskPolicy=" << MaskPolicy << ", ";
268268
OS << "VILL=" << VILL << ", ";
269-
OS << "UseAltFmt=" << UseAltFmt << ", ";
270-
OS << "UseTWiden=" << UseTWiden;
269+
OS << "AltFmt=" << AltFmt << ", ";
270+
OS << "TWiden=" << TWiden;
271271
OS << "}";
272272
}
273273
#endif
@@ -337,13 +337,13 @@ static bool areCompatibleVTYPEs(uint64_t CurVType, uint64_t NewVType,
337337
if (Used.MaskPolicy && RISCVVType::isMaskAgnostic(CurVType) !=
338338
RISCVVType::isMaskAgnostic(NewVType))
339339
return false;
340-
if (Used.UseTWiden && (RISCVVType::hasXSfmmWiden(CurVType) !=
341-
RISCVVType::hasXSfmmWiden(NewVType) ||
342-
(RISCVVType::hasXSfmmWiden(CurVType) &&
343-
RISCVVType::getXSfmmWiden(CurVType) !=
344-
RISCVVType::getXSfmmWiden(NewVType))))
340+
if (Used.TWiden && (RISCVVType::hasXSfmmWiden(CurVType) !=
341+
RISCVVType::hasXSfmmWiden(NewVType) ||
342+
(RISCVVType::hasXSfmmWiden(CurVType) &&
343+
RISCVVType::getXSfmmWiden(CurVType) !=
344+
RISCVVType::getXSfmmWiden(NewVType))))
345345
return false;
346-
if (Used.UseAltFmt &&
346+
if (Used.AltFmt &&
347347
RISCVVType::isAltFmt(CurVType) != RISCVVType::isAltFmt(NewVType))
348348
return false;
349349
return true;
@@ -497,10 +497,10 @@ DemandedFields getDemanded(const MachineInstr &MI, const RISCVSubtarget *ST) {
497497
Res.TailPolicy = false;
498498
}
499499

500-
Res.UseAltFmt = RISCVII::getAltFmtType(MI.getDesc().TSFlags) !=
501-
RISCVII::AltFmtType::DontCare;
502-
Res.UseTWiden = RISCVII::hasTWidenOp(MI.getDesc().TSFlags) ||
503-
RISCVInstrInfo::isXSfmmVectorConfigInstr(MI);
500+
Res.AltFmt = RISCVII::getAltFmtType(MI.getDesc().TSFlags) !=
501+
RISCVII::AltFmtType::DontCare;
502+
Res.TWiden = RISCVII::hasTWidenOp(MI.getDesc().TSFlags) ||
503+
RISCVInstrInfo::isXSfmmVectorConfigInstr(MI);
504504

505505
return Res;
506506
}
@@ -1347,8 +1347,8 @@ void RISCVInsertVSETVLI::transferBefore(VSETVLIInfo &Info,
13471347
IncomingInfo.getTailAgnostic(),
13481348
(Demanded.MaskPolicy ? IncomingInfo : Info).getMaskAgnostic() ||
13491349
IncomingInfo.getMaskAgnostic(),
1350-
(Demanded.UseAltFmt ? IncomingInfo : Info).getAltFmt(),
1351-
Demanded.UseTWiden ? IncomingInfo.getTWiden() : 0);
1350+
(Demanded.AltFmt ? IncomingInfo : Info).getAltFmt(),
1351+
Demanded.TWiden ? IncomingInfo.getTWiden() : 0);
13521352

13531353
// If we only knew the sew/lmul ratio previously, replace the VTYPE but keep
13541354
// the AVL.

0 commit comments

Comments
 (0)