[PATCH] D116549: [OpenMP][Clang] Allow passing target features in ISA trait for metadirective clause

Saiyedul Islam via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 6 08:39:21 PST 2022


saiislam added a comment.

In D116549#3218281 <https://reviews.llvm.org/D116549#3218281>, @jdoerfert wrote:

> Can you make the test check for the diagnose message? Also, do we have a test to verify an isa trait is properly handled?

I don't see a point in adding a diagnostic message when a feature is not found valid for a certain target. Because if it satisfies one of the host or device compilation, then it will definitely fail in the other.
I have added new tests to check that isa trait is handled properly in the next revision.



================
Comment at: clang/lib/Parse/ParseOpenMP.cpp:2533
+    std::function<void(StringRef)> DiagUnknownTrait = [this, Loc](
+                                                        StringRef ISATrait) {};
+    TargetOMPContext OMPCtx(ASTContext, std::move(DiagUnknownTrait),
----------------
jdoerfert wrote:
> Why doesn't this diagnose nothing?
Because an isa-feature will fail at least once, for either host compilation or device compilation. So, no point in always giving a warning.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116549



More information about the cfe-commits mailing list