[llvm] r267077 - Fix more -Wunused-variable in non-asserts build.

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 21 16:24:09 PDT 2016


Author: dblaikie
Date: Thu Apr 21 18:24:09 2016
New Revision: 267077

URL: http://llvm.org/viewvc/llvm-project?rev=267077&view=rev
Log:
Fix more -Wunused-variable in non-asserts build.

Modified:
    llvm/trunk/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp

Modified: llvm/trunk/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp?rev=267077&r1=267076&r2=267077&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp (original)
+++ llvm/trunk/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp Thu Apr 21 18:24:09 2016
@@ -444,8 +444,6 @@ bool RegisterBankInfo::InstructionMappin
   assert(MI.getParent() && MI.getParent()->getParent() &&
          "MI must be connected to a MachineFunction");
   const MachineFunction &MF = *MI.getParent()->getParent();
-  const TargetRegisterInfo &TRI = *MF.getSubtarget().getRegisterInfo();
-  const MachineRegisterInfo &MRI = MF.getRegInfo();
 
   for (unsigned Idx = 0; Idx < NumOperands; ++Idx) {
     const MachineOperand &MO = MI.getOperand(Idx);
@@ -461,7 +459,8 @@ bool RegisterBankInfo::InstructionMappin
       continue;
     // Register size in bits.
     // This size must match what the mapping expects.
-    assert(MOMapping.verify(getSizeInBits(Reg, MRI, TRI)) &&
+    assert(MOMapping.verify(getSizeInBits(
+               Reg, MF.getRegInfo(), *MF.getSubtarget().getRegisterInfo())) &&
            "Value mapping is invalid");
   }
   return true;




More information about the llvm-commits mailing list