[PATCH] D114979: [WebAssembly] Implementation of intrinsic for ref.null and HeapType removal

Thomas Lively via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 3 20:31:12 PST 2021


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

LGTM modulo comments. It's nice that we get to delete so much code this way.



================
Comment at: llvm/lib/IR/Function.cpp:930-944
+  IIT_I1 = 1,
+  IIT_I8 = 2,
+  IIT_I16 = 3,
+  IIT_I32 = 4,
+  IIT_I64 = 5,
+  IIT_F16 = 6,
+  IIT_F32 = 7,
----------------
It would be good to undo these unrelated formatting changes.


================
Comment at: llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCCodeEmitter.cpp:91
+      MI.getOpcode() == WebAssembly::REF_NULL_FUNCREF_S)
+    OS << uint8_t(0x70);
+  if (MI.getOpcode() == WebAssembly::REF_NULL_EXTERNREF ||
----------------
Can we roll these values into the opcodes defined in the tablegen files? That would remove the need for this exception and would make the disassembler recover the correct instruction. The only issue I can think of is that there might be code paths that depend on the opcodes being in a certain range that this would exceed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114979



More information about the llvm-commits mailing list