From: Eric Christopher Date: Mon, 2 Feb 2015 19:22:01 +0000 (+0000) Subject: Use the getSubtarget call off of the MachineFunction rather than X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=7529bb608808baa307085d2a55dc81e089e0876c;p=oota-llvm.git Use the getSubtarget call off of the MachineFunction rather than the TargetMachine. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227839 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/Hexagon/HexagonFrameLowering.cpp b/lib/Target/Hexagon/HexagonFrameLowering.cpp index 9d1a527eddb..aac06edf033 100644 --- a/lib/Target/Hexagon/HexagonFrameLowering.cpp +++ b/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( - MF.getSubtarget().getRegisterInfo()); + const HexagonRegisterInfo *QRI = + MF.getSubtarget().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().hasV4TOps() && + if (MF.getSubtarget().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.