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 | |
| parent | 055329958622d4989ad63e9a7d0dc6c9aca2e4e0 (diff) | |
| download | bcm5719-llvm-3196650bf31201ade71e01840fe844ecfaf9a687.tar.gz bcm5719-llvm-3196650bf31201ade71e01840fe844ecfaf9a687.zip | |
[WebAssembly] Use the templated form of MachineFunction::getSubtarget(). NFC.
llvm-svn: 258126
Diffstat (limited to 'llvm/lib/Target/WebAssembly')
| -rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp | 7 | ||||
| -rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyRegisterInfo.cpp | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp index 0eefd57f1f2..43d9b53adaf 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(); diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyRegisterInfo.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyRegisterInfo.cpp index 90d8dda530b..2c22865342f 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyRegisterInfo.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyRegisterInfo.cpp @@ -79,7 +79,7 @@ void WebAssemblyRegisterInfo::eliminateFrameIndex( } else { // Otherwise create an i32.add SP, offset and make it the operand. auto &MRI = MF.getRegInfo(); - const auto *TII = MF.getSubtarget().getInstrInfo(); + const auto *TII = MF.getSubtarget<WebAssemblySubtarget>().getInstrInfo(); unsigned OffsetReg = MRI.createVirtualRegister(&WebAssembly::I32RegClass); BuildMI(MBB, MI, MI.getDebugLoc(), TII->get(WebAssembly::CONST_I32), OffsetReg) |

