[PATCH] D136768: Make typed pointers to be yet again recognized as pointers

Joshua Cranmer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 26 08:46:48 PDT 2022


jcranmer-intel added a comment.

I'm similarly skeptical that this is the best way to go about the problem. Making typed pointers qualify under `isPointerTy()` potentially breaks a lot of code that assumes `isPointerTy()` means that it is indeed a `PointerType`, although this is ameliorated to some degree by the hard prohibition `llvm::Value` has on construction types with `TypedPointerType`.

If the problem is that vector types cannot be constructed with typed pointer types as element types, then the best fix is probably to adjust `VectorType::isValidElementType` to allow typed pointer types as well (and adjust the `checkType` assertion for `Value` to check `!isa<TypedPointerType>(Ty->getScalarType())` to ensure that vectors-of-typed-pointer-types don't leak into IR).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136768



More information about the llvm-commits mailing list