[llvm] r219663 - Remove the use and member variable of the TargetMachine from

Eric Christopher echristo at gmail.com
Mon Oct 13 23:26:57 PDT 2014


Author: echristo
Date: Tue Oct 14 01:26:57 2014
New Revision: 219663

URL: http://llvm.org/viewvc/llvm-project?rev=219663&view=rev
Log:
Remove the use and member variable of the TargetMachine from
MachineLICM as we can get the same data off of the MachineFunction.

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

Modified: llvm/trunk/lib/CodeGen/MachineLICM.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineLICM.cpp?rev=219663&r1=219662&r2=219663&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineLICM.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineLICM.cpp Tue Oct 14 01:26:57 2014
@@ -62,7 +62,6 @@ STATISTIC(NumPostRAHoisted,
 
 namespace {
   class MachineLICM : public MachineFunctionPass {
-    const TargetMachine   *TM;
     const TargetInstrInfo *TII;
     const TargetLoweringBase *TLI;
     const TargetRegisterInfo *TRI;
@@ -322,13 +321,12 @@ bool MachineLICM::runOnMachineFunction(M
     return false;
 
   Changed = FirstInLoop = false;
-  TM = &MF.getTarget();
-  TII = TM->getSubtargetImpl()->getInstrInfo();
-  TLI = TM->getSubtargetImpl()->getTargetLowering();
-  TRI = TM->getSubtargetImpl()->getRegisterInfo();
+  TII = MF.getSubtarget().getInstrInfo();
+  TLI = MF.getSubtarget().getTargetLowering();
+  TRI = MF.getSubtarget().getRegisterInfo();
   MFI = MF.getFrameInfo();
   MRI = &MF.getRegInfo();
-  InstrItins = TM->getSubtargetImpl()->getInstrItineraryData();
+  InstrItins = MF.getSubtarget().getInstrItineraryData();
 
   PreRegAlloc = MRI->isSSA();
 





More information about the llvm-commits mailing list