@@ -337,9 +337,7 @@ static bool areCompatibleVTYPEs(uint64_t CurVType, uint64_t NewVType,
337
337
}
338
338
339
339
// / Return the fields and properties demanded by the provided instruction.
340
- DemandedFields getDemanded (const MachineInstr &MI,
341
- const MachineRegisterInfo *MRI,
342
- const RISCVSubtarget *ST) {
340
+ DemandedFields getDemanded (const MachineInstr &MI, const RISCVSubtarget *ST) {
343
341
// Warning: This function has to work on both the lowered (i.e. post
344
342
// emitVSETVLIs) and pre-lowering forms. The main implication of this is
345
343
// that it can't use the value of a SEW, VL, or Policy operand as they might
@@ -1072,7 +1070,7 @@ bool RISCVInsertVSETVLI::needVSETVLI(const MachineInstr &MI,
1072
1070
if (!CurInfo.isValid () || CurInfo.isUnknown () || CurInfo.hasSEWLMULRatioOnly ())
1073
1071
return true ;
1074
1072
1075
- DemandedFields Used = getDemanded (MI, MRI, ST);
1073
+ DemandedFields Used = getDemanded (MI, ST);
1076
1074
1077
1075
// A slidedown/slideup with an *undefined* merge op can freely clobber
1078
1076
// elements not copied from the source vector (e.g. masked off, tail, or
@@ -1163,7 +1161,7 @@ void RISCVInsertVSETVLI::transferBefore(VSETVLIInfo &Info,
1163
1161
if (!Info.isValid () || Info.isUnknown ())
1164
1162
Info = NewInfo;
1165
1163
1166
- DemandedFields Demanded = getDemanded (MI, MRI, ST);
1164
+ DemandedFields Demanded = getDemanded (MI, ST);
1167
1165
const VSETVLIInfo IncomingInfo = adjustIncoming (PrevInfo, NewInfo, Demanded);
1168
1166
1169
1167
// If MI only demands that VL has the same zeroness, we only need to set the
@@ -1572,7 +1570,7 @@ bool RISCVCoalesceVSETVLI::coalesceVSETVLIs(MachineBasicBlock &MBB) {
1572
1570
for (MachineInstr &MI : make_range (MBB.rbegin (), MBB.rend ())) {
1573
1571
1574
1572
if (!isVectorConfigInstr (MI)) {
1575
- Used.doUnion (getDemanded (MI, MRI, ST));
1573
+ Used.doUnion (getDemanded (MI, ST));
1576
1574
if (MI.isCall () || MI.isInlineAsm () ||
1577
1575
MI.modifiesRegister (RISCV::VL, /* TRI=*/ nullptr ) ||
1578
1576
MI.modifiesRegister (RISCV::VTYPE, /* TRI=*/ nullptr ))
@@ -1645,7 +1643,7 @@ bool RISCVCoalesceVSETVLI::coalesceVSETVLIs(MachineBasicBlock &MBB) {
1645
1643
}
1646
1644
}
1647
1645
NextMI = &MI;
1648
- Used = getDemanded (MI, MRI, ST);
1646
+ Used = getDemanded (MI, ST);
1649
1647
}
1650
1648
1651
1649
NumCoalescedVSETVL += ToDelete.size ();
0 commit comments