This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] emit macro __GFX9__ etc
ClosedPublic

Authored by yaxunl on May 18 2022, 10:16 AM.

Details

Summary

Emit predefined macros for GPU family. e.g.
for GPU gfx9xx emit __GFX9__, etc.

Diff Detail

Event Timeline

yaxunl created this revision.May 18 2022, 10:16 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 18 2022, 10:16 AM
yaxunl requested review of this revision.May 18 2022, 10:16 AM
tra accepted this revision.May 18 2022, 10:46 AM
tra added inline comments.
clang/lib/Basic/Targets/AMDGPU.cpp
414

Without an example of the input we're dealing with here it was not obvious that the idea here is to convert gfx<XYY> -> __GFX<X>__. I'd change the comment a bit : e.g gfx901 ->__GFX9__, gfx1033 -> __GFX10__, etc.

This revision is now accepted and ready to land.May 18 2022, 10:46 AM
yaxunl marked an inline comment as done.May 18 2022, 10:52 AM
yaxunl added inline comments.
clang/lib/Basic/Targets/AMDGPU.cpp
414

will do when committing

This revision was automatically updated to reflect the committed changes.
yaxunl marked an inline comment as done.
Herald added a project: Restricted Project. · View Herald TranscriptMay 19 2022, 9:18 AM