Skip to content
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

Conversation

mariusz-sikora-at-amd
Copy link
Contributor

isOpaqueOrPointeeTypeMatches and PointerType::getWithSamePointeeType are now deprecated.

isOpaqueOrPointeeTypeMatches and PointerType::getWithSamePointeeType
are now deprecated.
Copy link
Contributor

@jasilvanus jasilvanus left a 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.

Comment on lines +195 to +196
New = Builder.CreateCast(Inst->getOpcode(), MemSrc,
PointerType::get(Inst->getType(), Data.Addrspace));
Copy link
Contributor

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.

Copy link
Contributor Author

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() ?

Copy link
Contributor

@jasilvanus jasilvanus Dec 8, 2023

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.

@mariusz-sikora-at-amd
Copy link
Contributor Author

Covered in different review.

@mariusz-sikora-at-amd mariusz-sikora-at-amd deleted the masikora/continuation-deprecated-api branch December 8, 2023 10:35
@amdvlk-admin
Copy link

Test summary for commit 15af9ca

CTS tests (Failed: 0/138443)
  • Built with version 1.3.5.2
  • Ubuntu navi3x, Srdcvk
    • Passed: 35211/69228 (50.9%)
    • Failed: 0/69228 (0.0%)
    • Not Supported: 34017/69228 (49.1%)
    • Warnings: 0/69228 (0.0%)
    Ubuntu navi2x, Srdcvk
    • Passed: 35241/69215 (50.9%)
    • Failed: 0/69215 (0.0%)
    • Not Supported: 33974/69215 (49.1%)
    • Warnings: 0/69215 (0.0%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants