[PATCH] D51046: [WebAssembly] Change writeSPToMemory to writeSPToGlobal (NFC)
Heejin Ahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 21 10:14:27 PDT 2018
aheejin created this revision.
aheejin added a reviewer: dschuff.
Herald added subscribers: llvm-commits, sunfish, jgravelle-google, sbc100.
SP is now a __stack_pointer global and not a memory address anymore.
Repository:
rL LLVM
https://reviews.llvm.org/D51046
Files:
lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp
Index: lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp
===================================================================
--- lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp
+++ lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp
@@ -97,7 +97,7 @@
MF.getFunction().hasFnAttribute(Attribute::NoRedZone);
}
-static void writeSPToMemory(unsigned SrcReg, MachineFunction &MF,
+static void writeSPToGlobal(unsigned SrcReg, MachineFunction &MF,
MachineBasicBlock &MBB,
MachineBasicBlock::iterator &InsertStore,
const DebugLoc &DL) {
@@ -120,7 +120,7 @@
if (I->getOpcode() == TII->getCallFrameDestroyOpcode() &&
needsSPWriteback(MF, MF.getFrameInfo())) {
DebugLoc DL = I->getDebugLoc();
- writeSPToMemory(WebAssembly::SP32, MF, MBB, I, DL);
+ writeSPToGlobal(WebAssembly::SP32, MF, MBB, I, DL);
}
return MBB.erase(I);
}
@@ -193,7 +193,7 @@
.addReg(WebAssembly::SP32);
}
if (StackSize && needsSPWriteback(MF, MFI)) {
- writeSPToMemory(WebAssembly::SP32, MF, MBB, InsertPt, DL);
+ writeSPToGlobal(WebAssembly::SP32, MF, MBB, InsertPt, DL);
}
}
@@ -232,5 +232,5 @@
SPReg = hasFP(MF) ? WebAssembly::FP32 : WebAssembly::SP32;
}
- writeSPToMemory(SPReg, MF, MBB, InsertPt, DL);
+ writeSPToGlobal(SPReg, MF, MBB, InsertPt, DL);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51046.161750.patch
Type: text/x-patch
Size: 1393 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180821/3ad1851f/attachment.bin>
More information about the llvm-commits
mailing list