This is a code size savings and is also important to get runnable code
while engines do not support v128.const.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
- So your intention was to do this even after we support v128.const, because it is code size savings, right?
- So there were no assumptions broken after we insert a new instruction after stackification?
lib/Target/WebAssembly/WebAssemblyRegStackify.cpp | ||
---|---|---|
130 ↗ | (On Diff #179003) | There is a version of BuildMI that takes an instruction before which a new instruction is inserted. With this you don't need to insert it explicitly after creation. |
Comment Actions
That's right. V8 not supporting v128.const just made it a little more urgent.
- So there were no assumptions broken after we insert a new instruction after stackification?
Looks like it worked out. The insertion is a local, type-safe change that happens before the registers are stripped and the opcodes changed to their stack forms, so it seems ok.
Comment Actions
LGTM with a nit.
lib/Target/WebAssembly/WebAssemblyRegStackify.cpp | ||
---|---|---|
129 ↗ | (On Diff #179008) | You don't need .getInstr(); MachineInstrBuilder has a conversion operator to MachineInstr *. |