[PATCH] D25708: [WebAssembly] Fix for 0xc call_indirect changes

Dan Gohman via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 20 13:50:50 PDT 2016


sunfish accepted this revision.
sunfish added a comment.
This revision is now accepted and ready to land.

Looks good!



================
Comment at: lib/Target/WebAssembly/WebAssemblyInstrCall.td:32
                    !strconcat(prefix, "call\t$dst, $callee")>;
-  def CALL_INDIRECT_#vt : I<(outs vt:$dst), (ins I32:$callee, variable_ops),
+  def PCALL_INDIRECT_#vt : I<(outs vt:$dst), (ins I32:$callee, variable_ops),
                             [(set vt:$dst, (WebAssemblycall1 I32:$callee))],
----------------
We can add "let isCodeGenOnly = 1 in" before this instruction to let various parts of LLVM know that this instruction isn't ever encoded or parsed.


================
Comment at: lib/Target/WebAssembly/WebAssemblyInstrCall.td:45
                          !strconcat(prefix, "call\t$dst, $callee")>;
-  def CALL_INDIRECT_#vt : SIMD_I<(outs V128:$dst),
+  def PCALL_INDIRECT_#vt : SIMD_I<(outs V128:$dst),
                                   (ins I32:$callee, variable_ops),
----------------
Ditto about isCodeGenOnly.


================
Comment at: lib/Target/WebAssembly/WebAssemblyInstrCall.td:69
                     "call    \t$callee">;
-  def CALL_INDIRECT_VOID : I<(outs), (ins I32:$callee, variable_ops),
-                             [(WebAssemblycall0 I32:$callee)],
-                             "call_indirect\t$callee">;
+  def PCALL_INDIRECT_VOID : I<(outs), (ins I32:$callee, variable_ops),
+                    [(WebAssemblycall0 I32:$callee)],
----------------
Ditto here too :-).


https://reviews.llvm.org/D25708





More information about the llvm-commits mailing list