[PATCH] D111227: [WebAssembly] Implementation of table.grow/size and ref.null intrinsics

Thomas Lively via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 19 18:24:12 PDT 2021


tlively added inline comments.


================
Comment at: llvm/include/llvm/IR/Intrinsics.h:144
+      AMX,
+      Function
     } Kind;
----------------
Both `externref` and `funcref` are modeled as pointers, so I'm surprised we have to add a new type here. It looks like there is already a field in the following union for `Pointer_AddressSpace`, so hopefully that would be sufficient?


================
Comment at: llvm/lib/CodeGen/ValueTypes.cpp:207
+    // FIXME: unsure this correct but before it was definitely NOT!
+    return PointerType::get(0, 20); // opaque pointer to addrspace(20)
   case MVT::v1i1:
----------------
Maybe we should go along with the transition to opaque pointers and do `PointerType::get(Context, 20)`? If so, we should probably do the same for `externref`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111227



More information about the llvm-commits mailing list