summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp7
1 files changed, 3 insertions, 4 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();
OpenPOWER on IntegriCloud