[llvm-dev] [RFC] Introducing the opaque pointer type

Arthur Eubanks via llvm-dev llvm-dev at lists.llvm.org
Tue May 4 11:20:00 PDT 2021


Somebody pointed out to me that there's very little actual documentation on
opaque pointer types. I'll try to write up some documentation so that the
motivation and tradeoffs can be better discussed.



> Thank you for doing this, and the approach seems largely good to me,
>>> except for one important point: We've been moving steadily towards making
>>> addrspace 0 be non-special for a long time now, so I *strongly* prefer a
>>> spelling that always has an address space. I don't care too much about the
>>> exact spelling, pN and ptr(N) both seem fine to me assuming technical
>>> issues can be sorted out. pN has the benefit of already being used in
>>> codegen contexts, so count that as a *mild* preference for that spelling.
>>>
>>
> There are many other places in the textual IR where we use the
> "addrspace(N)" syntax -- and AFAIK they all default to 0 right now. So my
> first inclination would be to agree with Arthur that it's a shame to have
> this syntax diverge from that. But -- do you have plans to change the
> behavior of those other contexts in the future?
>
+1 from somebody not super familiar with address spaces.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210504/0e4d2ea3/attachment.html>


More information about the llvm-dev mailing list