[PATCH] D55910: [WebAssembly] Emit a splat for v128 IMPLICIT_DEF

Heejin Ahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 19 18:52:34 PST 2018


aheejin added a comment.

- 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?



================
Comment at: lib/Target/WebAssembly/WebAssemblyRegStackify.cpp:130
+                              .getInstr();
+    MI->getParent()->insert(MI, Const);
+    LIS.InsertMachineInstrInMaps(*Const);
----------------
There is a [[ https://github.com/llvm-mirror/llvm/blob/d0092eb5f9ff4f2fb000fe20bf3b643aa4803565/include/llvm/CodeGen/MachineInstrBuilder.h#L346-L354 | 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.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55910/new/

https://reviews.llvm.org/D55910





More information about the llvm-commits mailing list