Skip to content

Commit c3cef70

Browse files
committed
[PowerPC] Use RegisterClassInfo::getRegPressureSetLimit
`RegisterClassInfo::getRegPressureSetLimit` is a wrapper of `TargetRegisterInfo::getRegPressureSetLimit` with some logics to adjust the limit by removing reserved registers. It seems that we shouldn't use `TargetRegisterInfo::getRegPressureSetLimit` directly, just like the comment "This limit must be adjusted dynamically for reserved registers" said. Separate from llvm#118787
1 parent 1235a93 commit c3cef70

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: llvm/lib/Target/PowerPC/PPCInstrInfo.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -643,8 +643,8 @@ bool PPCInstrInfo::shouldReduceRegisterPressure(
643643
};
644644

645645
// For now we only care about float and double type fma.
646-
unsigned VSSRCLimit = TRI->getRegPressureSetLimit(
647-
*MBB->getParent(), PPC::RegisterPressureSets::VSSRC);
646+
unsigned VSSRCLimit =
647+
RegClassInfo->getRegPressureSetLimit(PPC::RegisterPressureSets::VSSRC);
648648

649649
// Only reduce register pressure when pressure is high.
650650
return GetMBBPressure(MBB)[PPC::RegisterPressureSets::VSSRC] >

0 commit comments

Comments
 (0)