diff options
author | Eric Christopher <echristo@gmail.com> | 2014-10-08 23:38:33 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2014-10-08 23:38:33 +0000 |
commit | 4e3d6ded99cc408e8f62c6eb99ebe8574fa97b17 (patch) | |
tree | 8cc92acd0471ac8677d940feb5179ae08a8fac3f /llvm/lib | |
parent | ebacdcafd96876ce403e3673ea5e40ebe680d158 (diff) | |
download | bcm5719-llvm-4e3d6ded99cc408e8f62c6eb99ebe8574fa97b17.tar.gz bcm5719-llvm-4e3d6ded99cc408e8f62c6eb99ebe8574fa97b17.zip |
Remove getSubtargetImpl calls from FastISel, we can get it from
the MachineFunction where it's already cached.
llvm-svn: 219366
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/FastISel.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp index ab3dbfa40bc..33ae609643b 100644 --- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp @@ -1579,10 +1579,10 @@ FastISel::FastISel(FunctionLoweringInfo &FuncInfo, bool SkipTargetIndependentISel) : FuncInfo(FuncInfo), MF(FuncInfo.MF), MRI(FuncInfo.MF->getRegInfo()), MFI(*FuncInfo.MF->getFrameInfo()), MCP(*FuncInfo.MF->getConstantPool()), - TM(FuncInfo.MF->getTarget()), DL(*TM.getSubtargetImpl()->getDataLayout()), - TII(*TM.getSubtargetImpl()->getInstrInfo()), - TLI(*TM.getSubtargetImpl()->getTargetLowering()), - TRI(*TM.getSubtargetImpl()->getRegisterInfo()), LibInfo(LibInfo), + TM(FuncInfo.MF->getTarget()), DL(*MF->getSubtarget().getDataLayout()), + TII(*MF->getSubtarget().getInstrInfo()), + TLI(*MF->getSubtarget().getTargetLowering()), + TRI(*MF->getSubtarget().getRegisterInfo()), LibInfo(LibInfo), SkipTargetIndependentISel(SkipTargetIndependentISel) {} FastISel::~FastISel() {} @@ -2132,8 +2132,7 @@ FastISel::createMachineMemOperandFor(const Instruction *I) const { if (Alignment == 0) // Ensure that codegen never sees alignment 0. Alignment = DL.getABITypeAlignment(ValTy); - unsigned Size = - TM.getSubtargetImpl()->getDataLayout()->getTypeStoreSize(ValTy); + unsigned Size = DL.getTypeStoreSize(ValTy); if (IsVolatile) Flags |= MachineMemOperand::MOVolatile; |