[PATCH] D130592: [IR] Move support for dxil::TypedPointerType to LLVM core IR.

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 28 08:13:24 PDT 2022


aeubanks added a comment.

In D130592#3683896 <https://reviews.llvm.org/D130592#3683896>, @beanz wrote:

> In D130592#3683662 <https://reviews.llvm.org/D130592#3683662>, @aeubanks wrote:
>
>> but looking at `PointerTypeAnalysis::run`, if I'm understanding correctly, the pointee type can change based on optimizations. e.g. with a `load i32, ptr %p` the pointee type is `i32`, but if that load is eliminated and there are no users of the pointer, its pointee type is `i8`. and I believe this currently makes it into the generated DXIL. is this an issue? I'd assume so since the idea to use `i8*` everywhere doesn't seem to be the direction we're going
>
> DXIL is LLVM 3.7 bitcode, so opaque pointers don’t exist. `i8*` if we can’t figure out a pointer type is the closest we get to `void*`.

I mean, is it okay if a pointer parameter can either be inferred and written as `i8*` or `i32*` depending on optimizations?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130592



More information about the llvm-commits mailing list