Remove the query for TargetMachine and TargetInstrInfo since we're
authorEric Christopher <echristo@gmail.com>
Wed, 23 Jul 2014 22:12:03 +0000 (22:12 +0000)
committerEric Christopher <echristo@gmail.com>
Wed, 23 Jul 2014 22:12:03 +0000 (22:12 +0000)
already inside TargetInstrInfo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213806 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/TargetInstrInfo.cpp

index 83966bd0c208b9d5316d067539d2f5bc3be3b4f6..fc74899f479b06dfab1f09e93be32fa20373b23b 100644 (file)
@@ -562,8 +562,6 @@ isReallyTriviallyReMaterializableGeneric(const MachineInstr *MI,
                                          AliasAnalysis *AA) const {
   const MachineFunction &MF = *MI->getParent()->getParent();
   const MachineRegisterInfo &MRI = MF.getRegInfo();
-  const TargetMachine &TM = MF.getTarget();
-  const TargetInstrInfo &TII = *TM.getInstrInfo();
 
   // Remat clients assume operand 0 is the defined register.
   if (!MI->getNumOperands() || !MI->getOperand(0).isReg())
@@ -582,7 +580,7 @@ isReallyTriviallyReMaterializableGeneric(const MachineInstr *MI,
   // redundant with subsequent checks, but it's target-independent,
   // simple, and a common case.
   int FrameIdx = 0;
-  if (TII.isLoadFromStackSlot(MI, FrameIdx) &&
+  if (isLoadFromStackSlot(MI, FrameIdx) &&
       MF.getFrameInfo()->isImmutableObjectIndex(FrameIdx))
     return true;