[PATCH] D102292: [docs] Add page on opaque pointer types

Nuno Lopes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 12 11:48:54 PDT 2021


nlopes added a comment.

In D102292#2754879 <https://reviews.llvm.org/D102292#2754879>, @aeubanks wrote:

> In D102292#2753579 <https://reviews.llvm.org/D102292#2753579>, @nlopes wrote:
>
>> Can you clarify if this only for data type or also for function types pls?
>> (data and function pointer types don't have the same bit-width on all architectures)
>
> This should apply to all pointer types.
> Do you have an example in LLVM of where this matters for function vs data?
> In TargetMachine I only see the pointer size differences per address space, not function vs data. `TargetMachine::getPointerSize()`/`DataLayout::getPointerSize()`.

I'm not an expert on the backend stuff. I just wanted to get it documented, while we are at it, whether LLVM supports architectures with different data/function pointer sizes or not.
I guess the answer that you point at, is that one needs to use different address spaces if working with such architectures. I would be grateful if you could document this here as well.



================
Comment at: llvm/docs/OpaquePointers.rst:127
+* Migrate away from LLVM IR instruction builders that rely on pointee types
+  (e.g. GEP)
----------------
this sounds like you can't use GEP anymore. I believe you mean certain ways of building GEPs have to be replaced? Maybe give an example of old/new API?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102292



More information about the llvm-commits mailing list