diff options
author | Eric Christopher <echristo@gmail.com> | 2015-02-02 19:22:01 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2015-02-02 19:22:01 +0000 |
commit | 90295c9c63f2e20f3fa2b6b67d5d15441a765524 (patch) | |
tree | ca04b677bbd519e435ccca23ad0a5185608ba154 /llvm/lib | |
parent | 2ba2b2663288e91311fdd76b5fbfcd3645952f35 (diff) | |
download | bcm5719-llvm-90295c9c63f2e20f3fa2b6b67d5d15441a765524.tar.gz bcm5719-llvm-90295c9c63f2e20f3fa2b6b67d5d15441a765524.zip |
Use the getSubtarget call off of the MachineFunction rather than
the TargetMachine.
llvm-svn: 227839
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp b/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp index 9d1a527eddb..aac06edf033 100644 --- a/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp +++ b/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp @@ -50,10 +50,8 @@ void HexagonFrameLowering::determineFrameLayout(MachineFunction &MF) const { unsigned FrameSize = MFI->getStackSize(); // Get the alignments provided by the target. - unsigned TargetAlign = MF.getTarget() - .getSubtargetImpl() - ->getFrameLowering() - ->getStackAlignment(); + unsigned TargetAlign = + MF.getSubtarget().getFrameLowering()->getStackAlignment(); // Get the maximum call frame size of all the calls. unsigned maxCallFrameSize = MFI->getMaxCallFrameSize(); @@ -80,8 +78,8 @@ void HexagonFrameLowering::emitPrologue(MachineFunction &MF) const { MachineBasicBlock &MBB = MF.front(); MachineFrameInfo *MFI = MF.getFrameInfo(); MachineBasicBlock::iterator MBBI = MBB.begin(); - const HexagonRegisterInfo *QRI = static_cast<const HexagonRegisterInfo *>( - MF.getSubtarget().getRegisterInfo()); + const HexagonRegisterInfo *QRI = + MF.getSubtarget<HexagonSubtarget>().getRegisterInfo(); DebugLoc dl = MBBI != MBB.end() ? MBBI->getDebugLoc() : DebugLoc(); determineFrameLayout(MF); @@ -168,7 +166,7 @@ void HexagonFrameLowering::emitEpilogue(MachineFunction &MF, } // Replace 'jumpr r31' instruction with dealloc_return for V4 and higher // versions. - if (MF.getTarget().getSubtarget<HexagonSubtarget>().hasV4TOps() && + if (MF.getSubtarget<HexagonSubtarget>().hasV4TOps() && MBBI->getOpcode() == Hexagon::JMPret && !DisableDeallocRet) { // Check for RESTORE_DEALLOC_RET_JMP_V4 call. Don't emit an extra DEALLOC // instruction if we encounter it. |