[llvm] r213806 - Remove the query for TargetMachine and TargetInstrInfo since we're

Eric Christopher echristo at gmail.com
Wed Jul 23 15:12:03 PDT 2014


Author: echristo
Date: Wed Jul 23 17:12:03 2014
New Revision: 213806

URL: http://llvm.org/viewvc/llvm-project?rev=213806&view=rev
Log:
Remove the query for TargetMachine and TargetInstrInfo since we're
already inside TargetInstrInfo.

Modified:
    llvm/trunk/lib/CodeGen/TargetInstrInfo.cpp

Modified: llvm/trunk/lib/CodeGen/TargetInstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TargetInstrInfo.cpp?rev=213806&r1=213805&r2=213806&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/TargetInstrInfo.cpp (original)
+++ llvm/trunk/lib/CodeGen/TargetInstrInfo.cpp Wed Jul 23 17:12:03 2014
@@ -562,8 +562,6 @@ isReallyTriviallyReMaterializableGeneric
                                          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
   // 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;
 





More information about the llvm-commits mailing list