Skip to content

[TargetParser][AMDGPU] Fix getArchEntry(). #69222

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

Merged
merged 1 commit into from
Oct 17, 2023
Merged

Conversation

kosarev
Copy link
Collaborator

@kosarev kosarev commented Oct 16, 2023

It's supposed to return null when an unknown target id is passed.

Copy link
Contributor

@jayfoad jayfoad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Is there any easy way to test it?

@kosarev
Copy link
Collaborator Author

kosarev commented Oct 16, 2023

Is there any easy way to test it?

I don't see an easy way to cover that. It seems in LLVM we only call it from clang, but then the numeric id is something translated from a string id and therefore is always a known target. This was caught using amdgpu-dis, which relies on getArchEntry() via getArchNameFromElfMach().

It's supposed to return null when an unknown target id is passed.
@kosarev kosarev merged commit 096eba1 into llvm:main Oct 17, 2023
@kosarev kosarev deleted the fix_getarchentry branch October 17, 2023 13:54
Guzhu-AMD pushed a commit to GPUOpen-Drivers/llvm-project that referenced this pull request Oct 20, 2023
Local branch amd-gfx 402b76f Merged main:4434253f0fa6 into amd-gfx:7f370063677b
Remote branch main 096eba1 [TargetParser][AMDGPU] Fix getArchEntry(). (llvm#69222)
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.

2 participants