[PATCH] D15546: [WebAssembly] Print an extra local decl when the user stack pointer is used
Dan Gohman via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 15 16:58:26 PST 2015
sunfish added inline comments.
================
Comment at: lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp:185
@@ -183,1 +184,3 @@
}
+ if (MF->getFrameInfo()->getStackSize() > 0) {
+ // TODO: wasm64
----------------
dschuff wrote:
> well, IIUC it would be "iterate over phys regs except for ARGUMENTS and EXPR_STACK" which would leave us with SP and FP. so approximately the same level of weirdness either way?
I mean iterate over MFI->PhysRegs and only look at elements that are not -1U. That way if we implement MFI->adjustsStack() or hasFP(MF) or whatever in WebAssemblyFrameInfo.cpp, we won't need to update this code too.
I think you can extend WebAssemblyAsmPrinter::getRegType to know about physregs using TRI->getMinimalPhysRegClass.
http://reviews.llvm.org/D15546
More information about the llvm-commits
mailing list