[PATCH] D125909: [AMDGPU] emit macro __GFX9__ etc
Artem Belevich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 18 10:46:38 PDT 2022
tra accepted this revision.
tra added inline comments.
This revision is now accepted and ready to land.
================
Comment at: clang/lib/Basic/Targets/AMDGPU.cpp:414
+ assert(CanonName.startswith("gfx") && "Invalid amdgcn canonical name");
+ Builder.defineMacro(Twine("__") + Twine(CanonName.drop_back(2).upper()) +
+ Twine("__"));
----------------
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.`
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125909/new/
https://reviews.llvm.org/D125909
More information about the cfe-commits
mailing list