[PATCH] D105423: Add support for Opaque as a LowLevelType
Paulo Matos via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 7 08:14:36 PDT 2021
pmatos added a comment.
In D105423#2861795 <https://reviews.llvm.org/D105423#2861795>, @arsenm wrote:
> I'm not sure what an opaque type means. Do you have an IR sample?
Sure - for example, from how we represent externrefs (opaque object references in WebAssembly):
%extern = type opaque
%externref = type %extern addrspace(1)* ;; addrspace 1 is nonintegral
@externref_global = local_unnamed_addr addrspace(2) global %externref undef
define %externref @return_externref_global() {
;; this generates a global.get of @externref_global
%ref = load %externref, %externref addrspace(2)* @externref_global
ret %externref %ref
}
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105423/new/
https://reviews.llvm.org/D105423
More information about the llvm-commits
mailing list