@@ -535,7 +535,7 @@ class VSETVLIInfo {
535
535
bool getTailAgnostic () const { return TailAgnostic; }
536
536
bool getMaskAgnostic () const { return MaskAgnostic; }
537
537
538
- bool hasNonZeroAVL (const MachineRegisterInfo &MRI ) const {
538
+ bool hasNonZeroAVL () const {
539
539
if (hasAVLImm ())
540
540
return getAVLImm () > 0 ;
541
541
if (hasAVLReg ()) {
@@ -550,11 +550,10 @@ class VSETVLIInfo {
550
550
return false ;
551
551
}
552
552
553
- bool hasEquallyZeroAVL (const VSETVLIInfo &Other,
554
- const MachineRegisterInfo &MRI) const {
553
+ bool hasEquallyZeroAVL (const VSETVLIInfo &Other) const {
555
554
if (hasSameAVL (Other))
556
555
return true ;
557
- return (hasNonZeroAVL (MRI ) && Other.hasNonZeroAVL (MRI ));
556
+ return (hasNonZeroAVL () && Other.hasNonZeroAVL ());
558
557
}
559
558
560
559
bool hasSameAVL (const VSETVLIInfo &Other) const {
@@ -655,7 +654,7 @@ class VSETVLIInfo {
655
654
if (Used.VLAny && !(hasSameAVL (Require) && hasSameVLMAX (Require)))
656
655
return false ;
657
656
658
- if (Used.VLZeroness && !hasEquallyZeroAVL (Require, MRI ))
657
+ if (Used.VLZeroness && !hasEquallyZeroAVL (Require))
659
658
return false ;
660
659
661
660
return hasCompatibleVTYPE (Used, Require);
@@ -1192,7 +1191,7 @@ void RISCVInsertVSETVLI::transferBefore(VSETVLIInfo &Info,
1192
1191
// variant, so we avoid the transform to prevent extending live range of an
1193
1192
// avl register operand.
1194
1193
// TODO: We can probably relax this for immediates.
1195
- bool EquallyZero = IncomingInfo.hasEquallyZeroAVL (PrevInfo, *MRI ) &&
1194
+ bool EquallyZero = IncomingInfo.hasEquallyZeroAVL (PrevInfo) &&
1196
1195
IncomingInfo.hasSameVLMAX (PrevInfo);
1197
1196
if (Demanded.VLAny || (Demanded.VLZeroness && !EquallyZero))
1198
1197
Info.setAVL (IncomingInfo);
@@ -1586,7 +1585,7 @@ static bool canMutatePriorConfig(const MachineInstr &PrevMI,
1586
1585
if (isVLPreservingConfig (PrevMI))
1587
1586
return false ;
1588
1587
if (!getInfoForVSETVLI (PrevMI, MRI)
1589
- .hasEquallyZeroAVL (getInfoForVSETVLI (MI, MRI), MRI ))
1588
+ .hasEquallyZeroAVL (getInfoForVSETVLI (MI, MRI)))
1590
1589
return false ;
1591
1590
}
1592
1591
0 commit comments