-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Continuation] Update to deprecated LLVM API #2872
[Continuation] Update to deprecated LLVM API #2872
Conversation
isOpaqueOrPointeeTypeMatches and PointerType::getWithSamePointeeType are now deprecated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I already have an internal PR for this issue though (I'll add you there), and I'm planning to port it to GPUOpen once merged.
New = Builder.CreateCast(Inst->getOpcode(), MemSrc, | ||
PointerType::get(Inst->getType(), Data.Addrspace)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is incorrect: inst->getType()
is the pointer type, but PointerType::get
expects the element type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is not a case anymore with opaque pointers. PointerType::get
is just taking ->getContext()
from the Type, but I can change this to PointerType::get(Inst->getType()->getContext()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With opaque pointers, this is just returning a ptr addrspace(..)
type, so it is correct (because the element type does not matter and is ignored).
But this code needs to function with typed pointers for the time being, and in that case it is incorrect.
Covered in different review. |
Test summary for commit 15af9caCTS tests (Failed: 0/138443)
Ubuntu navi3x, SrdcvkUbuntu navi2x, Srdcvk |
isOpaqueOrPointeeTypeMatches and PointerType::getWithSamePointeeType are now deprecated.