diff options
author | Eric Christopher <echristo@gmail.com> | 2014-10-09 01:35:29 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2014-10-09 01:35:29 +0000 |
commit | 147c2ea05af0fbaf6d15c1572ecc403a08e564ea (patch) | |
tree | c343d7afb12e7c5c58336c4bda4775c6a617f134 | |
parent | 85de8f98a925afd91098d5727eb0f89b04c38441 (diff) | |
download | bcm5719-llvm-147c2ea05af0fbaf6d15c1572ecc403a08e564ea.tar.gz bcm5719-llvm-147c2ea05af0fbaf6d15c1572ecc403a08e564ea.zip |
Remove the uses of getSubtargetImpl from InstrEmitter and remove
the now unused TargetMachine variable.
llvm-svn: 219379
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp | 14 | ||||
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h | 1 |
2 files changed, 6 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp b/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp index 32d5ddca615..a65f33e1777 100644 --- a/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp @@ -27,7 +27,6 @@ #include "llvm/Support/MathExtras.h" #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/TargetLowering.h" -#include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetSubtargetInfo.h" using namespace llvm; @@ -407,11 +406,10 @@ void InstrEmitter::AddOperand(MachineInstrBuilder &MIB, Type *Type = CP->getType(); // MachineConstantPool wants an explicit alignment. if (Align == 0) { - Align = - TM->getSubtargetImpl()->getDataLayout()->getPrefTypeAlignment(Type); + Align = MF->getSubtarget().getDataLayout()->getPrefTypeAlignment(Type); if (Align == 0) { // Alignment of vector types. FIXME! - Align = TM->getSubtargetImpl()->getDataLayout()->getTypeAllocSize(Type); + Align = MF->getSubtarget().getDataLayout()->getTypeAllocSize(Type); } } @@ -1022,8 +1020,8 @@ EmitSpecialNode(SDNode *Node, bool IsClone, bool IsCloned, /// at the given position in the given block. InstrEmitter::InstrEmitter(MachineBasicBlock *mbb, MachineBasicBlock::iterator insertpos) - : MF(mbb->getParent()), MRI(&MF->getRegInfo()), TM(&MF->getTarget()), - TII(TM->getSubtargetImpl()->getInstrInfo()), - TRI(TM->getSubtargetImpl()->getRegisterInfo()), - TLI(TM->getSubtargetImpl()->getTargetLowering()), MBB(mbb), + : MF(mbb->getParent()), MRI(&MF->getRegInfo()), + TII(MF->getSubtarget().getInstrInfo()), + TRI(MF->getSubtarget().getRegisterInfo()), + TLI(MF->getSubtarget().getTargetLowering()), MBB(mbb), InsertPos(insertpos) {} diff --git a/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h b/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h index f50aa250093..7b86f7dd8de 100644 --- a/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h +++ b/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h @@ -29,7 +29,6 @@ class SDDbgValue; class InstrEmitter { MachineFunction *MF; MachineRegisterInfo *MRI; - const TargetMachine *TM; const TargetInstrInfo *TII; const TargetRegisterInfo *TRI; const TargetLowering *TLI; |