diff options
author | Dan Gohman <dan433584@gmail.com> | 2015-12-04 23:22:35 +0000 |
---|---|---|
committer | Dan Gohman <dan433584@gmail.com> | 2015-12-04 23:22:35 +0000 |
commit | 35bfb24c28c2e54afa9a346a12216d5f52742f09 (patch) | |
tree | 67806d068a66cce67cce187f544ed4153bedf850 /llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp | |
parent | b6761c2e1e1b914dc695780792ffe86c29ce296f (diff) | |
download | llvm-35bfb24c28c2e54afa9a346a12216d5f52742f09.zip llvm-35bfb24c28c2e54afa9a346a12216d5f52742f09.tar.gz llvm-35bfb24c28c2e54afa9a346a12216d5f52742f09.tar.bz2 |
[WebAssembly] Initial varargs support.
Full varargs support will depend on prologue/epilogue support, but this patch
gets us started with most of the basic infrastructure.
Differential Revision: http://reviews.llvm.org/D15231
llvm-svn: 254799
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp')
-rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp index ecbbc5c..7abc20a8 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp @@ -204,6 +204,10 @@ bool WebAssemblyRegStackify::runOnMachineFunction(MachineFunction &MF) { continue; unsigned VReg = MO.getReg(); + // Don't stackify physregs like SP or FP. + if (!TargetRegisterInfo::isVirtualRegister(VReg)) + continue; + if (MFI.isVRegStackified(VReg)) { if (MO.isDef()) Stack.push_back(VReg); |