[PATCH] D125909: [AMDGPU] emit macro __GFX9__ etc

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 18 10:52:13 PDT 2022


yaxunl marked an inline comment as done.
yaxunl added inline comments.


================
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("__"));
----------------
tra wrote:
> 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.`
will do when committing


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125909/new/

https://reviews.llvm.org/D125909



More information about the cfe-commits mailing list