[PATCH] D13712: WebAssembly: update syntax
Dan Gohman via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 14 18:37:16 PDT 2015
sunfish added inline comments.
================
Comment at: lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp:252
@@ +251,3 @@
+ bool First = true;
+ OS << "\t.local ";
+ for (const auto &IT : LocalTypes) {
----------------
Instead of collecting locals as we go and emitting them at the end, it'd be nice to declare them up front.
We can get the set of registers to declare up front by iterating through the vregs (using MRI->getNumVirtRegs(), TargetRegisterInfo::index2VirtReg(i)), use MRI->use_empty(Reg) to test whether a register is actually ever live, and use MRI->getRegClass(Reg) to get the type.
http://reviews.llvm.org/D13712
More information about the llvm-commits
mailing list