[PATCH] D50933: [WebAssembly] Remove an unused argument from writeSPToMemory (NFC)
Heejin Ahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 20 16:03:02 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL340230: [WebAssembly] Remove an unused argument from writeSPToMemory (NFC) (authored by aheejin, committed by ).
Repository:
rL LLVM
https://reviews.llvm.org/D50933
Files:
llvm/trunk/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp
Index: llvm/trunk/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp
===================================================================
--- llvm/trunk/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp
+++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp
@@ -99,7 +99,6 @@
static void writeSPToMemory(unsigned SrcReg, MachineFunction &MF,
MachineBasicBlock &MBB,
- MachineBasicBlock::iterator &InsertAddr,
MachineBasicBlock::iterator &InsertStore,
const DebugLoc &DL) {
const auto *TII = MF.getSubtarget<WebAssemblySubtarget>().getInstrInfo();
@@ -121,7 +120,7 @@
if (I->getOpcode() == TII->getCallFrameDestroyOpcode() &&
needsSPWriteback(MF, MF.getFrameInfo())) {
DebugLoc DL = I->getDebugLoc();
- writeSPToMemory(WebAssembly::SP32, MF, MBB, I, I, DL);
+ writeSPToMemory(WebAssembly::SP32, MF, MBB, I, DL);
}
return MBB.erase(I);
}
@@ -194,7 +193,7 @@
.addReg(WebAssembly::SP32);
}
if (StackSize && needsSPWriteback(MF, MFI)) {
- writeSPToMemory(WebAssembly::SP32, MF, MBB, InsertPt, InsertPt, DL);
+ writeSPToMemory(WebAssembly::SP32, MF, MBB, InsertPt, DL);
}
}
@@ -214,17 +213,15 @@
// Restore the stack pointer. If we had fixed-size locals, add the offset
// subtracted in the prolog.
unsigned SPReg = 0;
- MachineBasicBlock::iterator InsertAddr = InsertPt;
if (hasBP(MF)) {
auto FI = MF.getInfo<WebAssemblyFunctionInfo>();
SPReg = FI->getBasePointerVreg();
} else if (StackSize) {
const TargetRegisterClass *PtrRC =
MRI.getTargetRegisterInfo()->getPointerRegClass(MF);
unsigned OffsetReg = MRI.createVirtualRegister(PtrRC);
- InsertAddr =
- BuildMI(MBB, InsertPt, DL, TII->get(WebAssembly::CONST_I32), OffsetReg)
- .addImm(StackSize);
+ BuildMI(MBB, InsertPt, DL, TII->get(WebAssembly::CONST_I32), OffsetReg)
+ .addImm(StackSize);
// In the epilog we don't need to write the result back to the SP32 physreg
// because it won't be used again. We can use a stackified register instead.
SPReg = MRI.createVirtualRegister(PtrRC);
@@ -235,5 +232,5 @@
SPReg = hasFP(MF) ? WebAssembly::FP32 : WebAssembly::SP32;
}
- writeSPToMemory(SPReg, MF, MBB, InsertAddr, InsertPt, DL);
+ writeSPToMemory(SPReg, MF, MBB, InsertPt, DL);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50933.161600.patch
Type: text/x-patch
Size: 2421 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180820/4d79567e/attachment.bin>
More information about the llvm-commits
mailing list