[PATCH] D91979: [Clang][Attr] Introduce the `assume` function attribute

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 15 08:35:33 PST 2020


jdoerfert added inline comments.


================
Comment at: clang/lib/Sema/SemaDeclAttr.cpp:1689
+
+llvm::StringSet<> Sema::KnownAssumptionStrings({
+    "omp_no_openmp",          // OpenMP 5.1
----------------
aaron.ballman wrote:
> The current approach is reasonable, but I wonder if there's a way we can force this list to be filled out by the backend pass authors such that the frontend can query the backend for the supported list?
We do, kinda. A backend that wants to query an assumption from the `llvm.assume` function attribute needs to provide a `KnownAssumptionStr` which has a comment people might read.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91979



More information about the llvm-commits mailing list