Skip to content

Commit 6daae1b

Browse files
committed
OmpSs-2: Remove stuff borrowed from OpenMP
Closes llvm#12 Closes llvm#7 because now we do not have unhandled clauses
1 parent 343ed7f commit 6daae1b

File tree

9 files changed

+185
-7761
lines changed

9 files changed

+185
-7761
lines changed

clang/include/clang/AST/OmpSsClause.h

+178-4,443
Large diffs are not rendered by default.

clang/include/clang/Basic/OmpSsKinds.def

-844
Large diffs are not rendered by default.

clang/include/clang/Basic/OmpSsKinds.h

-164
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ enum OmpSsClauseKind {
3434
#define OMPSS_CLAUSE(Name, Class) \
3535
OSSC_##Name,
3636
#include "clang/Basic/OmpSsKinds.def"
37-
OSSC_threadprivate,
38-
OSSC_uniform,
3937
OSSC_unknown
4038
};
4139

@@ -47,31 +45,6 @@ enum OmpSsDefaultClauseKind {
4745
OSSC_DEFAULT_unknown
4846
};
4947

50-
/// OmpSs attributes for 'proc_bind' clause.
51-
enum OmpSsProcBindClauseKind {
52-
#define OMPSS_PROC_BIND_KIND(Name) \
53-
OSSC_PROC_BIND_##Name,
54-
#include "clang/Basic/OmpSsKinds.def"
55-
OSSC_PROC_BIND_unknown
56-
};
57-
58-
/// OmpSs attributes for 'schedule' clause.
59-
enum OmpSsScheduleClauseKind {
60-
#define OMPSS_SCHEDULE_KIND(Name) \
61-
OSSC_SCHEDULE_##Name,
62-
#include "clang/Basic/OmpSsKinds.def"
63-
OSSC_SCHEDULE_unknown
64-
};
65-
66-
/// OmpSs modifiers for 'schedule' clause.
67-
enum OmpSsScheduleClauseModifier {
68-
OSSC_SCHEDULE_MODIFIER_unknown = OSSC_SCHEDULE_unknown,
69-
#define OMPSS_SCHEDULE_MODIFIER(Name) \
70-
OSSC_SCHEDULE_MODIFIER_##Name,
71-
#include "clang/Basic/OmpSsKinds.def"
72-
OSSC_SCHEDULE_MODIFIER_last
73-
};
74-
7548
/// OmpSs attributes for 'depend' clause.
7649
enum OmpSsDependClauseKind {
7750
#define OMPSS_DEPEND_KIND(Name) \
@@ -80,53 +53,6 @@ enum OmpSsDependClauseKind {
8053
OSSC_DEPEND_unknown
8154
};
8255

83-
/// OmpSs attributes for 'linear' clause.
84-
enum OmpSsLinearClauseKind {
85-
#define OMPSS_LINEAR_KIND(Name) \
86-
OSSC_LINEAR_##Name,
87-
#include "clang/Basic/OmpSsKinds.def"
88-
OSSC_LINEAR_unknown
89-
};
90-
91-
/// OmpSs mapping kind for 'map' clause.
92-
enum OmpSsMapClauseKind {
93-
#define OMPSS_MAP_KIND(Name) \
94-
OSSC_MAP_##Name,
95-
#include "clang/Basic/OmpSsKinds.def"
96-
OSSC_MAP_unknown
97-
};
98-
99-
/// OmpSs attributes for 'dist_schedule' clause.
100-
enum OmpSsDistScheduleClauseKind {
101-
#define OMPSS_DIST_SCHEDULE_KIND(Name) OSSC_DIST_SCHEDULE_##Name,
102-
#include "clang/Basic/OmpSsKinds.def"
103-
OSSC_DIST_SCHEDULE_unknown
104-
};
105-
106-
/// OmpSs attributes for 'defaultmap' clause.
107-
enum OmpSsDefaultmapClauseKind {
108-
#define OMPSS_DEFAULTMAP_KIND(Name) \
109-
OSSC_DEFAULTMAP_##Name,
110-
#include "clang/Basic/OmpSsKinds.def"
111-
OSSC_DEFAULTMAP_unknown
112-
};
113-
114-
/// OmpSs modifiers for 'defaultmap' clause.
115-
enum OmpSsDefaultmapClauseModifier {
116-
OSSC_DEFAULTMAP_MODIFIER_unknown = OSSC_DEFAULTMAP_unknown,
117-
#define OMPSS_DEFAULTMAP_MODIFIER(Name) \
118-
OSSC_DEFAULTMAP_MODIFIER_##Name,
119-
#include "clang/Basic/OmpSsKinds.def"
120-
OSSC_DEFAULTMAP_MODIFIER_last
121-
};
122-
123-
/// Scheduling data for loop-based OmpSs directives.
124-
struct OmpSsScheduleTy final {
125-
OmpSsScheduleClauseKind Schedule = OSSC_SCHEDULE_unknown;
126-
OmpSsScheduleClauseModifier M1 = OSSC_SCHEDULE_MODIFIER_unknown;
127-
OmpSsScheduleClauseModifier M2 = OSSC_SCHEDULE_MODIFIER_unknown;
128-
};
129-
13056
OmpSsDirectiveKind getOmpSsDirectiveKind(llvm::StringRef Str);
13157
const char *getOmpSsDirectiveName(OmpSsDirectiveKind Kind);
13258

@@ -139,106 +65,16 @@ const char *getOmpSsSimpleClauseTypeName(OmpSsClauseKind Kind, unsigned Type);
13965
bool isAllowedClauseForDirective(OmpSsDirectiveKind DKind,
14066
OmpSsClauseKind CKind);
14167

142-
/// Checks if the specified directive is a directive with an associated
143-
/// loop construct.
144-
/// \param DKind Specified directive.
145-
/// \return true - the directive is a loop-associated directive like 'omp simd'
146-
/// or 'omp for' directive, otherwise - false.
147-
bool isOmpSsLoopDirective(OmpSsDirectiveKind DKind);
148-
149-
/// Checks if the specified directive is a worksharing directive.
150-
/// \param DKind Specified directive.
151-
/// \return true - the directive is a worksharing directive like 'omp for',
152-
/// otherwise - false.
153-
bool isOmpSsWorksharingDirective(OmpSsDirectiveKind DKind);
154-
155-
/// Checks if the specified directive is a taskloop directive.
156-
/// \param DKind Specified directive.
157-
/// \return true - the directive is a worksharing directive like 'omp taskloop',
158-
/// otherwise - false.
159-
bool isOmpSsTaskLoopDirective(OmpSsDirectiveKind DKind);
160-
161-
/// Checks if the specified directive is a parallel-kind directive.
162-
/// \param DKind Specified directive.
163-
/// \return true - the directive is a parallel-like directive like 'omp
164-
/// parallel', otherwise - false.
165-
bool isOmpSsParallelDirective(OmpSsDirectiveKind DKind);
166-
167-
/// Checks if the specified directive is a target code offload directive.
168-
/// \param DKind Specified directive.
169-
/// \return true - the directive is a target code offload directive like
170-
/// 'omp target', 'omp target parallel', 'omp target xxx'
171-
/// otherwise - false.
172-
bool isOmpSsTargetExecutionDirective(OmpSsDirectiveKind DKind);
173-
174-
/// Checks if the specified directive is a target data offload directive.
175-
/// \param DKind Specified directive.
176-
/// \return true - the directive is a target data offload directive like
177-
/// 'omp target data', 'omp target update', 'omp target enter data',
178-
/// 'omp target exit data'
179-
/// otherwise - false.
180-
bool isOmpSsTargetDataManagementDirective(OmpSsDirectiveKind DKind);
181-
182-
/// Checks if the specified composite/combined directive constitutes a teams
183-
/// directive in the outermost nest. For example
184-
/// 'omp teams distribute' or 'omp teams distribute parallel for'.
185-
/// \param DKind Specified directive.
186-
/// \return true - the directive has teams on the outermost nest, otherwise -
187-
/// false.
188-
bool isOmpSsNestingTeamsDirective(OmpSsDirectiveKind DKind);
189-
190-
/// Checks if the specified directive is a teams-kind directive. For example,
191-
/// 'omp teams distribute' or 'omp target teams'.
192-
/// \param DKind Specified directive.
193-
/// \return true - the directive is a teams-like directive, otherwise - false.
194-
bool isOmpSsTeamsDirective(OmpSsDirectiveKind DKind);
195-
196-
/// Checks if the specified directive is a simd directive.
197-
/// \param DKind Specified directive.
198-
/// \return true - the directive is a simd directive like 'omp simd',
199-
/// otherwise - false.
200-
bool isOmpSsSimdDirective(OmpSsDirectiveKind DKind);
201-
202-
/// Checks if the specified directive is a distribute directive.
203-
/// \param DKind Specified directive.
204-
/// \return true - the directive is a distribute-directive like 'omp
205-
/// distribute',
206-
/// otherwise - false.
207-
bool isOmpSsDistributeDirective(OmpSsDirectiveKind DKind);
208-
209-
/// Checks if the specified composite/combined directive constitutes a
210-
/// distribute directive in the outermost nest. For example,
211-
/// 'omp distribute parallel for' or 'omp distribute'.
212-
/// \param DKind Specified directive.
213-
/// \return true - the directive has distribute on the outermost nest.
214-
/// otherwise - false.
215-
bool isOmpSsNestingDistributeDirective(OmpSsDirectiveKind DKind);
216-
21768
/// Checks if the specified clause is one of private clauses like
21869
/// 'private', 'firstprivate', 'reduction' etc..
21970
/// \param Kind Clause kind.
22071
/// \return true - the clause is a private clause, otherwise - false.
22172
bool isOmpSsPrivate(OmpSsClauseKind Kind);
22273

223-
/// Checks if the specified clause is one of threadprivate clauses like
224-
/// 'threadprivate', 'copyin' or 'copyprivate'.
225-
/// \param Kind Clause kind.
226-
/// \return true - the clause is a threadprivate clause, otherwise - false.
227-
bool isOmpSsThreadPrivate(OmpSsClauseKind Kind);
228-
22974
/// Checks if the specified directive kind is one of tasking directives - task,
23075
/// taskloop or taksloop simd.
23176
bool isOmpSsTaskingDirective(OmpSsDirectiveKind Kind);
23277

233-
/// Checks if the specified directive kind is one of the composite or combined
234-
/// directives that need loop bound sharing across loops outlined in nested
235-
/// functions
236-
bool isOmpSsLoopBoundSharingDirective(OmpSsDirectiveKind Kind);
237-
238-
/// Return the captured regions of an OmpSs directive.
239-
void getOmpSsCaptureRegions(
240-
llvm::SmallVectorImpl<OmpSsDirectiveKind> &CaptureRegions,
241-
OmpSsDirectiveKind DKind);
24278
}
24379

24480
#endif

0 commit comments

Comments
 (0)