forked from OSchip/llvm-project
X86FrameLowering::adjustStackWithPops - cleanup auto usage. NFCI.
Don't use auto for non-obvious types, and use const references.
This commit is contained in:
parent
88ff4d2ca1
commit
e706116e11
|
@ -2919,7 +2919,6 @@ bool X86FrameLowering::adjustStackWithPops(MachineBasicBlock &MBB,
|
||||||
MachineBasicBlock::iterator MBBI,
|
MachineBasicBlock::iterator MBBI,
|
||||||
const DebugLoc &DL,
|
const DebugLoc &DL,
|
||||||
int Offset) const {
|
int Offset) const {
|
||||||
|
|
||||||
if (Offset <= 0)
|
if (Offset <= 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -2942,14 +2941,13 @@ bool X86FrameLowering::adjustStackWithPops(MachineBasicBlock &MBB,
|
||||||
unsigned Regs[2];
|
unsigned Regs[2];
|
||||||
unsigned FoundRegs = 0;
|
unsigned FoundRegs = 0;
|
||||||
|
|
||||||
auto &MRI = MBB.getParent()->getRegInfo();
|
const MachineRegisterInfo &MRI = MBB.getParent()->getRegInfo();
|
||||||
auto RegMask = Prev->getOperand(1);
|
const MachineOperand &RegMask = Prev->getOperand(1);
|
||||||
|
|
||||||
auto &RegClass =
|
auto &RegClass =
|
||||||
Is64Bit ? X86::GR64_NOREX_NOSPRegClass : X86::GR32_NOREX_NOSPRegClass;
|
Is64Bit ? X86::GR64_NOREX_NOSPRegClass : X86::GR32_NOREX_NOSPRegClass;
|
||||||
// Try to find up to NumPops free registers.
|
// Try to find up to NumPops free registers.
|
||||||
for (auto Candidate : RegClass) {
|
for (auto Candidate : RegClass) {
|
||||||
|
|
||||||
// Poor man's liveness:
|
// Poor man's liveness:
|
||||||
// Since we're immediately after a call, any register that is clobbered
|
// Since we're immediately after a call, any register that is clobbered
|
||||||
// by the call and not defined by it can be considered dead.
|
// by the call and not defined by it can be considered dead.
|
||||||
|
|
Loading…
Reference in New Issue