LLVM  15.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 
20 namespace llvm {
21 
22 namespace 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.
29  bool StartsWith;
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 
44 inline 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
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:17
StringRef.h
llvm::omp::AssumptionClauseMappingInfo
Helper to describe assume clauses.
Definition: OMPAssume.h:25
llvm::omp::getAllAssumeClauseOptions
std::string getAllAssumeClauseOptions()
Definition: OMPAssume.h:44
llvm::StringLiteral
A wrapper around a string literal that serves as a proxy for constructing global tables of StringRefs...
Definition: StringRef.h:910
llvm::omp::AssumptionClauseMappingInfo::HasExpression
bool HasExpression
Flag to determine if an expression follows.
Definition: OMPAssume.h:33
llvm::omp::AssumptionClauseMappings
static constexpr AssumptionClauseMappingInfo AssumptionClauseMappings[]
All known assume clauses.
Definition: OMPAssume.h:37
llvm::omp::AssumptionClauseMappingInfo::StartsWith
bool StartsWith
Flag to determine if the identifier is a full name or the start of a name.
Definition: OMPAssume.h:29
S
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
Definition: README.txt:210
llvm::omp::AssumptionClauseMappingInfo::Identifier
llvm::StringLiteral Identifier
The identifier describing the (beginning of the) clause.
Definition: OMPAssume.h:27
llvm::omp::AssumptionClauseMappingInfo::HasDirectiveList
bool HasDirectiveList
Flag to determine if a directive lists follows.
Definition: OMPAssume.h:31