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

Paulo Matos via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 6 00:45:10 PST 2021


pmatos added inline comments.


================
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,
----------------
tlively wrote:
> It would be good to undo these unrelated formatting changes.
Yes, well, I want clang-format and it suggested the change, which is why I accepted it but fair enough...  I will roll them back.


================
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 ||
----------------
tlively wrote:
> 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.
Ah - love the suggestion. Completely forgot I could and should roll these into tablegen. Also bonus points as I learned to use `!cond(...)`. 


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