LLVM 20.0.0git
OMPAssume.h
Go to the documentation of this file.
1//===- OpenMP/OMPAssume.h --- OpenMP assumption helper functions - C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8/// \file
9///
10/// This file provides helper functions and classes to deal with OpenMP
11/// assumptions, e.g., as used by `[begin/end] assumes` and `assume`.
12///
13//===----------------------------------------------------------------------===//
14
15#ifndef LLVM_FRONTEND_OPENMP_OMPASSUME_H
16#define LLVM_FRONTEND_OPENMP_OMPASSUME_H
17
18#include "llvm/ADT/StringRef.h"
19
20namespace llvm {
21
22namespace omp {
23
24/// Helper to describe assume clauses.
26 /// The identifier describing the (beginning of the) clause.
28 /// Flag to determine if the identifier is a full name or the start of a name.
30 /// Flag to determine if a directive lists follows.
32 /// Flag to determine if an expression follows.
34};
35
36/// All known assume clauses.
38#define OMP_ASSUME_CLAUSE(Identifier, StartsWith, HasDirectiveList, \
39 HasExpression) \
40 {Identifier, StartsWith, HasDirectiveList, HasExpression},
41#include "llvm/Frontend/OpenMP/OMPKinds.def"
42};
43
44inline std::string getAllAssumeClauseOptions() {
45 std::string S;
47 S += (S.empty() ? "'" : "', '") + ACMI.Identifier.str();
48 return S + "'";
49}
50
51} // namespace omp
52
53} // namespace llvm
54
55#endif // LLVM_FRONTEND_OPENMP_OMPASSUME_H
A wrapper around a string literal that serves as a proxy for constructing global tables of StringRefs...
Definition: StringRef.h:853
static constexpr AssumptionClauseMappingInfo AssumptionClauseMappings[]
All known assume clauses.
Definition: OMPAssume.h:37
std::string getAllAssumeClauseOptions()
Definition: OMPAssume.h:44
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
Helper to describe assume clauses.
Definition: OMPAssume.h:25
bool HasDirectiveList
Flag to determine if a directive lists follows.
Definition: OMPAssume.h:31
bool StartsWith
Flag to determine if the identifier is a full name or the start of a name.
Definition: OMPAssume.h:29
llvm::StringLiteral Identifier
The identifier describing the (beginning of the) clause.
Definition: OMPAssume.h:27
bool HasExpression
Flag to determine if an expression follows.
Definition: OMPAssume.h:33