@@ -546,7 +546,7 @@ class VSETVLIInfo {
546
546
bool getTailAgnostic () const { return TailAgnostic; }
547
547
bool getMaskAgnostic () const { return MaskAgnostic; }
548
548
549
- bool hasNonZeroAVL (const MachineRegisterInfo &MRI ) const {
549
+ bool hasNonZeroAVL () const {
550
550
if (hasAVLImm ())
551
551
return getAVLImm () > 0 ;
552
552
if (hasAVLReg ()) {
@@ -561,11 +561,10 @@ class VSETVLIInfo {
561
561
return false ;
562
562
}
563
563
564
- bool hasEquallyZeroAVL (const VSETVLIInfo &Other,
565
- const MachineRegisterInfo &MRI) const {
564
+ bool hasEquallyZeroAVL (const VSETVLIInfo &Other) const {
566
565
if (hasSameAVL (Other))
567
566
return true ;
568
- return (hasNonZeroAVL (MRI ) && Other.hasNonZeroAVL (MRI ));
567
+ return (hasNonZeroAVL () && Other.hasNonZeroAVL ());
569
568
}
570
569
571
570
bool hasSameAVL (const VSETVLIInfo &Other) const {
@@ -666,7 +665,7 @@ class VSETVLIInfo {
666
665
if (Used.VLAny && !(hasSameAVL (Require) && hasSameVLMAX (Require)))
667
666
return false ;
668
667
669
- if (Used.VLZeroness && !hasEquallyZeroAVL (Require, MRI ))
668
+ if (Used.VLZeroness && !hasEquallyZeroAVL (Require))
670
669
return false ;
671
670
672
671
return hasCompatibleVTYPE (Used, Require);
@@ -1203,7 +1202,7 @@ void RISCVInsertVSETVLI::transferBefore(VSETVLIInfo &Info,
1203
1202
// variant, so we avoid the transform to prevent extending live range of an
1204
1203
// avl register operand.
1205
1204
// TODO: We can probably relax this for immediates.
1206
- bool EquallyZero = IncomingInfo.hasEquallyZeroAVL (PrevInfo, *MRI ) &&
1205
+ bool EquallyZero = IncomingInfo.hasEquallyZeroAVL (PrevInfo) &&
1207
1206
IncomingInfo.hasSameVLMAX (PrevInfo);
1208
1207
if (Demanded.VLAny || (Demanded.VLZeroness && !EquallyZero))
1209
1208
Info.setAVL (IncomingInfo);
@@ -1592,7 +1591,7 @@ static bool canMutatePriorConfig(const MachineInstr &PrevMI,
1592
1591
if (isVLPreservingConfig (PrevMI))
1593
1592
return false ;
1594
1593
if (!getInfoForVSETVLI (PrevMI, MRI)
1595
- .hasEquallyZeroAVL (getInfoForVSETVLI (MI, MRI), MRI ))
1594
+ .hasEquallyZeroAVL (getInfoForVSETVLI (MI, MRI)))
1596
1595
return false ;
1597
1596
}
1598
1597
0 commit comments