[llvm] e706116 - X86FrameLowering::adjustStackWithPops - cleanup auto usage. NFCI.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 9 08:15:37 PDT 2020


Author: Simon Pilgrim
Date: 2020-09-09T16:15:02+01:00
New Revision: e706116e1182f39c8de5d9c9981df08a9f614e7a

URL: https://github.com/llvm/llvm-project/commit/e706116e1182f39c8de5d9c9981df08a9f614e7a
DIFF: https://github.com/llvm/llvm-project/commit/e706116e1182f39c8de5d9c9981df08a9f614e7a.diff

LOG: X86FrameLowering::adjustStackWithPops - cleanup auto usage. NFCI.

Don't use auto for non-obvious types, and use const references.

Added: 
    

Modified: 
    llvm/lib/Target/X86/X86FrameLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/X86/X86FrameLowering.cpp b/llvm/lib/Target/X86/X86FrameLowering.cpp
index 7437c2e978af..90265ddf344a 100644
--- a/llvm/lib/Target/X86/X86FrameLowering.cpp
+++ b/llvm/lib/Target/X86/X86FrameLowering.cpp
@@ -2919,7 +2919,6 @@ bool X86FrameLowering::adjustStackWithPops(MachineBasicBlock &MBB,
                                            MachineBasicBlock::iterator MBBI,
                                            const DebugLoc &DL,
                                            int Offset) const {
-
   if (Offset <= 0)
     return false;
 
@@ -2942,14 +2941,13 @@ bool X86FrameLowering::adjustStackWithPops(MachineBasicBlock &MBB,
   unsigned Regs[2];
   unsigned FoundRegs = 0;
 
-  auto &MRI = MBB.getParent()->getRegInfo();
-  auto RegMask = Prev->getOperand(1);
+  const MachineRegisterInfo &MRI = MBB.getParent()->getRegInfo();
+  const MachineOperand &RegMask = Prev->getOperand(1);
 
   auto &RegClass =
       Is64Bit ? X86::GR64_NOREX_NOSPRegClass : X86::GR32_NOREX_NOSPRegClass;
   // Try to find up to NumPops free registers.
   for (auto Candidate : RegClass) {
-
     // Poor man's liveness:
     // Since we're immediately after a call, any register that is clobbered
     // by the call and not defined by it can be considered dead.


        


More information about the llvm-commits mailing list