[PATCH] D104797: [WebAssembly] Implementation of global.get/set for reftypes in LLVM IR

Paulo Matos via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 1 07:22:25 PDT 2021


pmatos added inline comments.


================
Comment at: llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.h:69
+    if (AS == WasmAddressSpace::EXTERNREF)
+      return MVT::externref;
+    else if (AS == WasmAddressSpace::FUNCREF)
----------------
tlively wrote:
> It might be worth a comment explaining why the memtype is also externref and funcref. Is this just for lack of a more meaningful type to return?
As far as I understand that's the type in memory anyway, so it sounds like the right type to return in `getPointerMemTy`. I would think that if this question was for `getPointerTy` then the answer would be yes.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104797



More information about the llvm-commits mailing list