[PATCH] D116464: [SPIRV 5/6] Add LegalizerInfo, InstructionSelector and utilities
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 20 12:20:57 PDT 2022
nikic added inline comments.
================
Comment at: llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.cpp:286
+ if (auto PType = dyn_cast<PointerType>(Ty)) {
+ Type *ElemType = PType->getPointerElementType();
+
----------------
zuban32 wrote:
> nikic wrote:
> > This is incompatible with opaque pointers (https://llvm.org/docs/OpaquePointers.html). Please remove this call or revert the patch if this is non-trivial.
> What if we use PointerType::getNonOpaquePointerElementType() instead? IMO that should do the trick while SPIR-V has no support of opaque pointers yet so we're only oging non-opaque way here.
You can use getNonOpaquePointerElementType(), but you need to implement a separate code-path for isOpaquePointerTy() if you do so.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116464/new/
https://reviews.llvm.org/D116464
More information about the llvm-commits
mailing list