[PATCH] D70739: [OPENMP50]Add device/isa context selector support.

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 27 08:17:58 PST 2019


ABataev marked 2 inline comments as done.
ABataev added inline comments.


================
Comment at: clang/include/clang/Sema/Sema.h:9320
   using OMPCtxSelectorData =
-      OpenMPCtxSelectorData<SmallVector<OMPCtxStringType, 4>, ExprResult>;
+      OpenMPCtxSelectorData<SmallVector<llvm::Any, 4>, ExprResult>;
 
----------------
jdoerfert wrote:
> I would like to avoid the Any type here and I hope we can if we don't allow "strings". See also my last comment.
The only possible solution I see here is to convert kind/vendor strings into exprs and store all data as `Expr *`


================
Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:11147
+    llvm::Triple CustomTriple(Name);
+    if (CGM.getTarget().getTriple().getArch() != CustomTriple.getArch())
+      return false;
----------------
jdoerfert wrote:
> should we normalize the names here? at least `.lower` might be useful.
Done + added check for possibly used vendor/os/env


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70739





More information about the cfe-commits mailing list