[PATCH] D126535: [WebAssembly][NFC] Update reftype and table tests to use opaque pointers

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 27 07:39:03 PDT 2022


sbc100 added inline comments.


================
Comment at: llvm/test/CodeGen/WebAssembly/externref-globalset.ll:3
 
-%extern = type opaque
-%externref = type %extern addrspace(10)* ;; addrspace 10 is nonintegral
+%externref = type ptr addrspace(10) ;; addrspace 10 is nonintegral
 
----------------
asb wrote:
> sbc100 wrote:
> > So the old code used `type opaque` and the new code just uses `ptr`?     But I take that the `ptr` is also somehow implicitly "opaque".. otherwise the PR description would not make sense?   (Sorry i'm not familiar the opaque pointer stuff).
> See [here](https://llvm.org/docs/OpaquePointers.html) for an overview. Basically, pointers can still have an address space, but no longer have type information associated with them. Instead, you make use of a type argument for instructions that need it. As the page mentions, you can look at treatment of integer signedness as analogous - IR doesn't have signed and unsigned types, but has different operations that treat a value as signed or unsigned.
> 
> Clang now emits IR using opaque pointers by default, but the majority of .ll tests in llvm/test/ haven't been transitioned.
I see..  the new `ptr` type is also opaque, so that the fact that you are removing the keyword `opaque` is not actually removing the opaqueness, since its now baked in.


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

https://reviews.llvm.org/D126535



More information about the llvm-commits mailing list