diff options
author | Dan Gohman <dan433584@gmail.com> | 2016-01-19 14:53:19 +0000 |
---|---|---|
committer | Dan Gohman <dan433584@gmail.com> | 2016-01-19 14:53:19 +0000 |
commit | 3196650bf31201ade71e01840fe844ecfaf9a687 (patch) | |
tree | 27b273ccba759b8d4b7d0fb139c5537f49433e9b /llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp | |
parent | 055329958622d4989ad63e9a7d0dc6c9aca2e4e0 (diff) | |
download | llvm-3196650bf31201ade71e01840fe844ecfaf9a687.zip llvm-3196650bf31201ade71e01840fe844ecfaf9a687.tar.gz llvm-3196650bf31201ade71e01840fe844ecfaf9a687.tar.bz2 |
[WebAssembly] Use the templated form of MachineFunction::getSubtarget(). NFC.
llvm-svn: 258126
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp')
-rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp index 0eefd57..43d9b53 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp @@ -109,8 +109,7 @@ static void adjustStackPointer(unsigned StackSize, void WebAssemblyFrameLowering::eliminateCallFramePseudoInstr( MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator I) const { - const auto *TII = - static_cast<const WebAssemblyInstrInfo*>(MF.getSubtarget().getInstrInfo()); + const auto *TII = MF.getSubtarget<WebAssemblySubtarget>().getInstrInfo(); DebugLoc DL = I->getDebugLoc(); unsigned Opc = I->getOpcode(); bool IsDestroy = Opc == TII->getCallFrameDestroyOpcode(); @@ -132,7 +131,7 @@ void WebAssemblyFrameLowering::emitPrologue(MachineFunction &MF, if (!StackSize && (!MFI->adjustsStack() || MFI->getMaxCallFrameSize() == 0)) return; - const auto *TII = MF.getSubtarget().getInstrInfo(); + const auto *TII = MF.getSubtarget<WebAssemblySubtarget>().getInstrInfo(); auto InsertPt = MBB.begin(); DebugLoc DL; @@ -145,7 +144,7 @@ void WebAssemblyFrameLowering::emitEpilogue(MachineFunction &MF, uint64_t StackSize = MF.getFrameInfo()->getStackSize(); if (!StackSize) return; - const auto *TII = MF.getSubtarget().getInstrInfo(); + const auto *TII = MF.getSubtarget<WebAssemblySubtarget>().getInstrInfo(); auto &MRI = MF.getRegInfo(); unsigned OffsetReg = MRI.createVirtualRegister(&WebAssembly::I32RegClass); auto InsertPt = MBB.getFirstTerminator(); |