[PATCH] D150998: [OpenMP] Fix using the target ID when using the new driver

Saiyedul Islam via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 22 07:29:56 PDT 2023


saiislam added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:8465-8470
+    if (TC->getTriple().isAMDGPU()) {
+      for (StringRef Feature : llvm::split(Arch.split(':').second, ':')) {
+        FeatureArgs.emplace_back(
+            Args.MakeArgString(Feature.take_back() + Feature.drop_back()));
+      }
+    }
----------------
May be use `parseTargetIDWithFormatCheckingOnly()`?


================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:8475
         "triple=" + TC->getTripleString(),
-        "arch=" + Arch.str(),
+        "arch=" + getProcessorFromTargetID(TC->getTriple(), Arch).str(),
         "kind=" + Kind.str(),
----------------
Shouldn't Arch (targetID here) should be passed along instead of just the processor?

For example, `gfx90a:xnack+` and `gfx90a:xnack-` should be treated differently.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150998



More information about the cfe-commits mailing list