mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-03-04 02:18:46 +00:00
MachineRegisterInfo: Remove unused arg from isConstantPhysReg(); NFC
llvm-svn: 285423
This commit is contained in:
parent
b3cd5f40cd
commit
fcada89b82
@ -553,7 +553,7 @@ public:
|
||||
/// isConstantPhysReg - Returns true if PhysReg is unallocatable and constant
|
||||
/// throughout the function. It is safe to move instructions that read such
|
||||
/// a physreg.
|
||||
bool isConstantPhysReg(unsigned PhysReg, const MachineFunction &MF) const;
|
||||
bool isConstantPhysReg(unsigned PhysReg) const;
|
||||
|
||||
/// Get an iterator over the pressure sets affected by the given physical or
|
||||
/// virtual register. If RegUnit is physical, it must be a register unit (from
|
||||
|
@ -103,7 +103,7 @@ bool LiveRangeEdit::allUsesAvailableAt(const MachineInstr *OrigMI,
|
||||
|
||||
// We can't remat physreg uses, unless it is a constant.
|
||||
if (TargetRegisterInfo::isPhysicalRegister(MO.getReg())) {
|
||||
if (MRI.isConstantPhysReg(MO.getReg(), *OrigMI->getParent()->getParent()))
|
||||
if (MRI.isConstantPhysReg(MO.getReg()))
|
||||
continue;
|
||||
return false;
|
||||
}
|
||||
|
@ -227,7 +227,7 @@ bool MachineCSE::hasLivePhysRegDefUses(const MachineInstr *MI,
|
||||
if (TargetRegisterInfo::isVirtualRegister(Reg))
|
||||
continue;
|
||||
// Reading constant physregs is ok.
|
||||
if (!MRI->isConstantPhysReg(Reg, *MBB->getParent()))
|
||||
if (!MRI->isConstantPhysReg(Reg))
|
||||
for (MCRegAliasIterator AI(Reg, TRI, true); AI.isValid(); ++AI)
|
||||
PhysRefs.insert(*AI);
|
||||
}
|
||||
|
@ -895,7 +895,7 @@ bool MachineLICM::IsLoopInvariantInst(MachineInstr &I) {
|
||||
// If the physreg has no defs anywhere, it's just an ambient register
|
||||
// and we can freely move its uses. Alternatively, if it's allocatable,
|
||||
// it could get allocated to something with a def during allocation.
|
||||
if (!MRI->isConstantPhysReg(Reg, *I.getParent()->getParent()))
|
||||
if (!MRI->isConstantPhysReg(Reg))
|
||||
return false;
|
||||
// Otherwise it's safe to move.
|
||||
continue;
|
||||
|
@ -468,8 +468,7 @@ void MachineRegisterInfo::freezeReservedRegs(const MachineFunction &MF) {
|
||||
"Invalid ReservedRegs vector from target");
|
||||
}
|
||||
|
||||
bool MachineRegisterInfo::isConstantPhysReg(unsigned PhysReg,
|
||||
const MachineFunction &MF) const {
|
||||
bool MachineRegisterInfo::isConstantPhysReg(unsigned PhysReg) const {
|
||||
assert(TargetRegisterInfo::isPhysicalRegister(PhysReg));
|
||||
|
||||
const TargetRegisterInfo *TRI = getTargetRegisterInfo();
|
||||
|
@ -636,7 +636,7 @@ MachineSinking::FindSuccToSinkTo(MachineInstr &MI, MachineBasicBlock *MBB,
|
||||
// If the physreg has no defs anywhere, it's just an ambient register
|
||||
// and we can freely move its uses. Alternatively, if it's allocatable,
|
||||
// it could get allocated to something with a def during allocation.
|
||||
if (!MRI->isConstantPhysReg(Reg, *MBB->getParent()))
|
||||
if (!MRI->isConstantPhysReg(Reg))
|
||||
return nullptr;
|
||||
} else if (!MO.isDead()) {
|
||||
// A def that isn't dead. We can't move it.
|
||||
|
@ -884,7 +884,7 @@ bool TargetInstrInfo::isReallyTriviallyReMaterializableGeneric(
|
||||
// If the physreg has no defs anywhere, it's just an ambient register
|
||||
// and we can freely move its uses. Alternatively, if it's allocatable,
|
||||
// it could get allocated to something with a def during allocation.
|
||||
if (!MRI.isConstantPhysReg(Reg, MF))
|
||||
if (!MRI.isConstantPhysReg(Reg))
|
||||
return false;
|
||||
} else {
|
||||
// A physreg def. We can't remat it.
|
||||
|
Loading…
x
Reference in New Issue
Block a user