[Openmp-commits] [PATCH] D83281: [OpenMP] Allow traits for the OpenMP context selector `isa`

Johannes Doerfert via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Jul 6 23:14:39 PDT 2020


jdoerfert created this revision.
jdoerfert added reviewers: jhuber6, fghanim, JonChesterfield, grokos, ggeorgakoudis, ABataev.
Herald added subscribers: llvm-commits, sstefan1, guansong, bollu, hiraditya, yaxunl.
Herald added projects: clang, LLVM.

NOTE: The changes are fairly mechanical overall but this patch currently lacks
proper testing. An updated version with more test coverage will be
provided.

It was unclear what `isa` was supposed to mean so we did not provide any
traits for this context selector. With this patch we will allow *any*
string or identifier. We use the target attribute and target info to
determine if the trait matches. In other words, we will check if the
provided value is a target feature that is available (at the call site).

Fixes PR46338


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D83281

Files:
  clang/include/clang/AST/OpenMPClause.h
  clang/lib/AST/OpenMPClause.cpp
  clang/lib/Parse/ParseOpenMP.cpp
  clang/lib/Sema/SemaOpenMP.cpp
  clang/test/OpenMP/declare_variant_device_isa_codegen_1.c
  llvm/include/llvm/Frontend/OpenMP/OMPContext.h
  llvm/include/llvm/Frontend/OpenMP/OMPKinds.def
  llvm/lib/Frontend/OpenMP/OMPContext.cpp
  llvm/unittests/Frontend/OpenMPContextTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83281.275912.patch
Type: text/x-patch
Size: 21680 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20200707/b79abf21/attachment-0001.bin>


More information about the Openmp-commits mailing list