[llvm] r219668 - Access subtarget specific variables off of the MachineFunction's
Eric Christopher
echristo at gmail.com
Tue Oct 14 00:00:33 PDT 2014
Author: echristo
Date: Tue Oct 14 02:00:33 2014
New Revision: 219668
URL: http://llvm.org/viewvc/llvm-project?rev=219668&view=rev
Log:
Access subtarget specific variables off of the MachineFunction's
cached subtarget and not the TargetMachine.
Modified:
llvm/trunk/lib/CodeGen/MachineSink.cpp
llvm/trunk/lib/CodeGen/MachineVerifier.cpp
Modified: llvm/trunk/lib/CodeGen/MachineSink.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineSink.cpp?rev=219668&r1=219667&r2=219668&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineSink.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineSink.cpp Tue Oct 14 02:00:33 2014
@@ -29,7 +29,6 @@
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetInstrInfo.h"
-#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetRegisterInfo.h"
#include "llvm/Target/TargetSubtargetInfo.h"
using namespace llvm;
@@ -246,9 +245,8 @@ bool MachineSinking::runOnMachineFunctio
DEBUG(dbgs() << "******** Machine Sinking ********\n");
- const TargetMachine &TM = MF.getTarget();
- TII = TM.getSubtargetImpl()->getInstrInfo();
- TRI = TM.getSubtargetImpl()->getRegisterInfo();
+ TII = MF.getSubtarget().getInstrInfo();
+ TRI = MF.getSubtarget().getRegisterInfo();
MRI = &MF.getRegInfo();
DT = &getAnalysis<MachineDominatorTree>();
LI = &getAnalysis<MachineLoopInfo>();
Modified: llvm/trunk/lib/CodeGen/MachineVerifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineVerifier.cpp?rev=219668&r1=219667&r2=219668&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineVerifier.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineVerifier.cpp Tue Oct 14 02:00:33 2014
@@ -294,8 +294,8 @@ bool MachineVerifier::runOnMachineFuncti
this->MF = &MF;
TM = &MF.getTarget();
- TII = TM->getSubtargetImpl()->getInstrInfo();
- TRI = TM->getSubtargetImpl()->getRegisterInfo();
+ TII = MF.getSubtarget().getInstrInfo();
+ TRI = MF.getSubtarget().getRegisterInfo();
MRI = &MF.getRegInfo();
LiveVars = nullptr;
More information about the llvm-commits
mailing list