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

Andy Wingo via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 22 01:53:02 PDT 2021


wingo added inline comments.


================
Comment at: llvm/test/CodeGen/WebAssembly/externref-globalget.ll:4
+%extern = type opaque
+%externref = type %extern addrspace(1)* ;; addrspace 1 is nonintegral
+
----------------
tlively wrote:
> wingo wrote:
> > A design document for how this works would really be helpful :)  So LLVM is going to consider that any pointer to address space 1 has MVT exterrnref at lowering-time?  It's interesting to go down this route rather than adding a new `llvm::Type`.
> We essentially consider changes to LLVM IR to be out of scope to the extent possible. If we only touch code in the WebAssembly backend and maybe fix a few bugs in target independent code, then we are comfortable signing off on patches within the team, but if we do anything non-trivial in target independent code, we need sign off from the wider LLVM community. Changes to LLVM IR would require a full-blown RFC process and I expect they would not be accepted.
I guess my open question is really as regards the C mapping -- would the idea be for the front-end to also specially recognize pointers in address space 1 ?  If there were a first-class IR type for these values, as is the case for SVE, you'd have a straightforward answer.  More discussion in https://docs.google.com/document/d/1aVX0tQChxA2Tlno2KmEUjdruLoNgpwzV5Kv335HvNmI/edit#heading=h.u50o9qhzzjy6.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95425



More information about the llvm-commits mailing list