[flang-commits] [clang] [lld] [llvm] [flang] [AMDGPU] Introduce GFX9/10.1/10.3/11 Generic Targets (PR #76955)

Pierre van Houtryve via flang-commits flang-commits at lists.llvm.org
Thu Jan 18 02:14:55 PST 2024


================
@@ -253,6 +274,12 @@ AMDGPU::IsaVersion AMDGPU::getIsaVersion(StringRef GPU) {
   case GK_GFX1151: return {11, 5, 1};
   case GK_GFX1200: return {12, 0, 0};
   case GK_GFX1201: return {12, 0, 1};
+
+  // Generic targets use the earliest ISA version in their group.
----------------
Pierre-vh wrote:

I think it's alright as is, but this API is bad and should probably be refactored IMO. Most users of the API are just interested in checking the version major, sometimes minor (10.1 vs 10.3).

In theory, this API should _never_ be used to check for presence of a feature, that's always done through the feature list check, so it shouldn't really be abusable. I added a comment though to revisit this and make the intent clearer.

https://github.com/llvm/llvm-project/pull/76955


More information about the flang-commits mailing list