Follow the same syntax as for the spec repo. Both have evolved slightly independently and need to converge again.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
This is still a work in progress, I'm still playing with a few options and figure uploading something is helpful.
lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp | ||
---|---|---|
252 | 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. |
Comment Actions
- Use parens for get_local. Kinda hacky, but it makes the end-to-end thing happy. We can figure out what it should look like with wasmate later.
Comment Actions
- Don't print an extra line if there are no locals. Fix call.ll to follow the new syntax.
Comment Actions
- Auto-upgrade returns: find ./test/CodeGen/WebAssembly/ -name '*.ll' | xargs -n1 sed -i 's/return \([0-9]\)/return (get_local \1)/g'
- s/: \([0-9]\)/: get_local \1/g
- Fix the other tests.
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.