Skip to content

Commit 2e2e48f

Browse files
authored
[OpenMP][CIR] Add basic infrastructure for CIR lowering (#171902)
This patch adds the basic infrastructure for lowering an OpenMP directive, which should enable someone to take over the OpenMP lowering in the future. It adds the lowering entry points to CIR in the same way as OpenACC. Note that this does nothing with any of the directives, which will happen in a followup patch. No infrastructure for clauses is added either, but that will come in a followup patch as well.
1 parent f5a198b commit 2e2e48f

File tree

11 files changed

+923
-22
lines changed

11 files changed

+923
-22
lines changed

clang/lib/CIR/CodeGen/CIRGenDecl.cpp

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -744,11 +744,6 @@ void CIRGenFunction::emitDecl(const Decl &d, bool evaluateConditionDecl) {
744744
case Decl::Import:
745745
case Decl::MSGuid: // __declspec(uuid("..."))
746746
case Decl::TemplateParamObject:
747-
case Decl::OMPThreadPrivate:
748-
case Decl::OMPGroupPrivate:
749-
case Decl::OMPAllocate:
750-
case Decl::OMPCapturedExpr:
751-
case Decl::OMPRequires:
752747
case Decl::Empty:
753748
case Decl::Concept:
754749
case Decl::LifetimeExtendedTemporary:
@@ -782,6 +777,27 @@ void CIRGenFunction::emitDecl(const Decl &d, bool evaluateConditionDecl) {
782777
case Decl::OpenACCRoutine:
783778
emitOpenACCRoutine(cast<OpenACCRoutineDecl>(d));
784779
return;
780+
case Decl::OMPThreadPrivate:
781+
emitOMPThreadPrivateDecl(cast<OMPThreadPrivateDecl>(d));
782+
return;
783+
case Decl::OMPGroupPrivate:
784+
emitOMPGroupPrivateDecl(cast<OMPGroupPrivateDecl>(d));
785+
return;
786+
case Decl::OMPAllocate:
787+
emitOMPAllocateDecl(cast<OMPAllocateDecl>(d));
788+
return;
789+
case Decl::OMPCapturedExpr:
790+
emitOMPCapturedExpr(cast<OMPCapturedExprDecl>(d));
791+
return;
792+
case Decl::OMPRequires:
793+
emitOMPRequiresDecl(cast<OMPRequiresDecl>(d));
794+
return;
795+
case Decl::OMPDeclareMapper:
796+
emitOMPDeclareMapper(cast<OMPDeclareMapperDecl>(d));
797+
return;
798+
case Decl::OMPDeclareReduction:
799+
emitOMPDeclareReduction(cast<OMPDeclareReductionDecl>(d));
800+
return;
785801
case Decl::Typedef: // typedef int X;
786802
case Decl::TypeAlias: { // using X = int; [C++0x]
787803
QualType ty = cast<TypedefNameDecl>(d).getUnderlyingType();
@@ -793,8 +809,6 @@ void CIRGenFunction::emitDecl(const Decl &d, bool evaluateConditionDecl) {
793809
case Decl::ImplicitConceptSpecialization:
794810
case Decl::TopLevelStmt:
795811
case Decl::UsingPack:
796-
case Decl::OMPDeclareMapper:
797-
case Decl::OMPDeclareReduction:
798812
cgm.errorNYI(d.getSourceRange(),
799813
std::string("emitDecl: unhandled decl type: ") +
800814
d.getDeclKindName());
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
//===----------------------------------------------------------------------===//
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+
//
9+
// This contains code to emit Decl nodes as CIR code.
10+
//
11+
//===----------------------------------------------------------------------===//
12+
13+
#include "CIRGenFunction.h"
14+
#include "clang/AST/DeclOpenMP.h"
15+
16+
using namespace clang;
17+
using namespace clang::CIRGen;
18+
19+
void CIRGenModule::emitOMPThreadPrivateDecl(const OMPThreadPrivateDecl *d) {
20+
// TODO(OpenMP): We don't properly differentiate between 'emitDecl' and
21+
// 'emitGlobal' and 'emitTopLevelDecl' in CIRGenDecl.cpp/CIRGenModule.cpp, so
22+
// if this decl requires we differentiate those, we probably need to split
23+
// this function into multiples.
24+
errorNYI(d->getSourceRange(), "OpenMP OMPThreadPrivateDecl");
25+
}
26+
27+
void CIRGenFunction::emitOMPThreadPrivateDecl(const OMPThreadPrivateDecl &d) {
28+
// TODO(OpenMP): We don't properly differentiate between 'emitDecl' and
29+
// 'emitGlobal' and 'emitTopLevelDecl' in CIRGenDecl.cpp/CIRGenModule.cpp, so
30+
// if this decl requires we differentiate those, we probably need to split
31+
// this function into multiples.
32+
getCIRGenModule().errorNYI(d.getSourceRange(), "OpenMP OMPThreadPrivateDecl");
33+
}
34+
35+
void CIRGenModule::emitOMPGroupPrivateDecl(const OMPGroupPrivateDecl *d) {
36+
// TODO(OpenMP): We don't properly differentiate between 'emitDecl' and
37+
// 'emitGlobal' and 'emitTopLevelDecl' in CIRGenDecl.cpp/CIRGenModule.cpp, so
38+
// if this decl requires we differentiate those, we probably need to split
39+
// this function into multiples.
40+
errorNYI(d->getSourceRange(), "OpenMP OMPGroupPrivateDecl");
41+
}
42+
43+
void CIRGenFunction::emitOMPGroupPrivateDecl(const OMPGroupPrivateDecl &d) {
44+
// TODO(OpenMP): We don't properly differentiate between 'emitDecl' and
45+
// 'emitGlobal' and 'emitTopLevelDecl' in CIRGenDecl.cpp/CIRGenModule.cpp, so
46+
// if this decl requires we differentiate those, we probably need to split
47+
// this function into multiples.
48+
getCIRGenModule().errorNYI(d.getSourceRange(), "OpenMP OMPGroupPrivateDecl");
49+
}
50+
51+
void CIRGenModule::emitOMPCapturedExpr(const OMPCapturedExprDecl *d) {
52+
// TODO(OpenMP): We don't properly differentiate between 'emitDecl' and
53+
// 'emitGlobal' and 'emitTopLevelDecl' in CIRGenDecl.cpp/CIRGenModule.cpp, so
54+
// if this decl requires we differentiate those, we probably need to split
55+
// this function into multiples.
56+
errorNYI(d->getSourceRange(), "OpenMP OMPCapturedExpr");
57+
}
58+
59+
void CIRGenFunction::emitOMPCapturedExpr(const OMPCapturedExprDecl &d) {
60+
// TODO(OpenMP): We don't properly differentiate between 'emitDecl' and
61+
// 'emitGlobal' and 'emitTopLevelDecl' in CIRGenDecl.cpp/CIRGenModule.cpp, so
62+
// if this decl requires we differentiate those, we probably need to split
63+
// this function into multiples.
64+
getCIRGenModule().errorNYI(d.getSourceRange(), "OpenMP OMPCapturedExpr");
65+
}
66+
67+
void CIRGenModule::emitOMPAllocateDecl(const OMPAllocateDecl *d) {
68+
// TODO(OpenMP): We don't properly differentiate between 'emitDecl' and
69+
// 'emitGlobal' and 'emitTopLevelDecl' in CIRGenDecl.cpp/CIRGenModule.cpp, so
70+
// if this decl requires we differentiate those, we probably need to split
71+
// this function into multiples.
72+
errorNYI(d->getSourceRange(), "OpenMP OMPAllocateDecl");
73+
}
74+
75+
void CIRGenFunction::emitOMPAllocateDecl(const OMPAllocateDecl &d) {
76+
// TODO(OpenMP): We don't properly differentiate between 'emitDecl' and
77+
// 'emitGlobal' and 'emitTopLevelDecl' in CIRGenDecl.cpp/CIRGenModule.cpp, so
78+
// if this decl requires we differentiate those, we probably need to split
79+
// this function into multiples.
80+
getCIRGenModule().errorNYI(d.getSourceRange(), "OpenMP OMPAllocateDecl");
81+
}
82+
83+
void CIRGenModule::emitOMPDeclareReduction(const OMPDeclareReductionDecl *d) {
84+
// TODO(OpenMP): We don't properly differentiate between 'emitDecl' and
85+
// 'emitGlobal' and 'emitTopLevelDecl' in CIRGenDecl.cpp/CIRGenModule.cpp, so
86+
// if this decl requires we differentiate those, we probably need to split
87+
// this function into multiples.
88+
errorNYI(d->getSourceRange(), "OpenMP OMPDeclareReduction");
89+
}
90+
91+
void CIRGenFunction::emitOMPDeclareReduction(const OMPDeclareReductionDecl &d) {
92+
// TODO(OpenMP): We don't properly differentiate between 'emitDecl' and
93+
// 'emitGlobal' and 'emitTopLevelDecl' in CIRGenDecl.cpp/CIRGenModule.cpp, so
94+
// if this decl requires we differentiate those, we probably need to split
95+
// this function into multiples.
96+
getCIRGenModule().errorNYI(d.getSourceRange(), "OpenMP OMPDeclareReduction");
97+
}
98+
99+
void CIRGenModule::emitOMPDeclareMapper(const OMPDeclareMapperDecl *d) {
100+
// TODO(OpenMP): We don't properly differentiate between 'emitDecl' and
101+
// 'emitGlobal' and 'emitTopLevelDecl' in CIRGenDecl.cpp/CIRGenModule.cpp, so
102+
// if this decl requires we differentiate those, we probably need to split
103+
// this function into multiples.
104+
errorNYI(d->getSourceRange(), "OpenMP OMPDeclareMapper");
105+
}
106+
107+
void CIRGenFunction::emitOMPDeclareMapper(const OMPDeclareMapperDecl &d) {
108+
// TODO(OpenMP): We don't properly differentiate between 'emitDecl' and
109+
// 'emitGlobal' and 'emitTopLevelDecl' in CIRGenDecl.cpp/CIRGenModule.cpp, so
110+
// if this decl requires we differentiate those, we probably need to split
111+
// this function into multiples.
112+
getCIRGenModule().errorNYI(d.getSourceRange(), "OpenMP OMPDeclareMapper");
113+
}
114+
115+
void CIRGenModule::emitOMPRequiresDecl(const OMPRequiresDecl *d) {
116+
// TODO(OpenMP): We don't properly differentiate between 'emitDecl' and
117+
// 'emitGlobal' and 'emitTopLevelDecl' in CIRGenDecl.cpp/CIRGenModule.cpp, so
118+
// if this decl requires we differentiate those, we probably need to split
119+
// this function into multiples.
120+
errorNYI(d->getSourceRange(), "OpenMP OMPRequiresDecl");
121+
}
122+
123+
void CIRGenFunction::emitOMPRequiresDecl(const OMPRequiresDecl &d) {
124+
// TODO(OpenMP): We don't properly differentiate between 'emitDecl' and
125+
// 'emitGlobal' and 'emitTopLevelDecl' in CIRGenDecl.cpp/CIRGenModule.cpp, so
126+
// if this decl requires we differentiate those, we probably need to split
127+
// this function into multiples.
128+
getCIRGenModule().errorNYI(d.getSourceRange(), "OpenMP OMPRequiresDecl");
129+
}

clang/lib/CIR/CodeGen/CIRGenFunction.h

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2022,6 +2022,139 @@ class CIRGenFunction : public CIRGenTypeCache {
20222022
const Twine &name = "tmp", Address *alloca = nullptr,
20232023
mlir::OpBuilder::InsertPoint ip = {});
20242024

2025+
//===--------------------------------------------------------------------===//
2026+
// OpenMP Emission
2027+
//===--------------------------------------------------------------------===//
2028+
public:
2029+
mlir::LogicalResult emitOMPScopeDirective(const OMPScopeDirective &s);
2030+
mlir::LogicalResult emitOMPErrorDirective(const OMPErrorDirective &s);
2031+
mlir::LogicalResult emitOMPParallelDirective(const OMPParallelDirective &s);
2032+
mlir::LogicalResult emitOMPTaskwaitDirective(const OMPTaskwaitDirective &s);
2033+
mlir::LogicalResult emitOMPTaskyieldDirective(const OMPTaskyieldDirective &s);
2034+
mlir::LogicalResult emitOMPBarrierDirective(const OMPBarrierDirective &s);
2035+
mlir::LogicalResult emitOMPMetaDirective(const OMPMetaDirective &s);
2036+
mlir::LogicalResult emitOMPCanonicalLoop(const OMPCanonicalLoop &s);
2037+
mlir::LogicalResult emitOMPSimdDirective(const OMPSimdDirective &s);
2038+
mlir::LogicalResult emitOMPTileDirective(const OMPTileDirective &s);
2039+
mlir::LogicalResult emitOMPUnrollDirective(const OMPUnrollDirective &s);
2040+
mlir::LogicalResult emitOMPFuseDirective(const OMPFuseDirective &s);
2041+
mlir::LogicalResult emitOMPForDirective(const OMPForDirective &s);
2042+
mlir::LogicalResult emitOMPForSimdDirective(const OMPForSimdDirective &s);
2043+
mlir::LogicalResult emitOMPSectionsDirective(const OMPSectionsDirective &s);
2044+
mlir::LogicalResult emitOMPSectionDirective(const OMPSectionDirective &s);
2045+
mlir::LogicalResult emitOMPSingleDirective(const OMPSingleDirective &s);
2046+
mlir::LogicalResult emitOMPMasterDirective(const OMPMasterDirective &s);
2047+
mlir::LogicalResult emitOMPCriticalDirective(const OMPCriticalDirective &s);
2048+
mlir::LogicalResult
2049+
emitOMPParallelForDirective(const OMPParallelForDirective &s);
2050+
mlir::LogicalResult
2051+
emitOMPParallelForSimdDirective(const OMPParallelForSimdDirective &s);
2052+
mlir::LogicalResult
2053+
emitOMPParallelMasterDirective(const OMPParallelMasterDirective &s);
2054+
mlir::LogicalResult
2055+
emitOMPParallelSectionsDirective(const OMPParallelSectionsDirective &s);
2056+
mlir::LogicalResult emitOMPTaskDirective(const OMPTaskDirective &s);
2057+
mlir::LogicalResult emitOMPTaskgroupDirective(const OMPTaskgroupDirective &s);
2058+
mlir::LogicalResult emitOMPFlushDirective(const OMPFlushDirective &s);
2059+
mlir::LogicalResult emitOMPDepobjDirective(const OMPDepobjDirective &s);
2060+
mlir::LogicalResult emitOMPScanDirective(const OMPScanDirective &s);
2061+
mlir::LogicalResult emitOMPOrderedDirective(const OMPOrderedDirective &s);
2062+
mlir::LogicalResult emitOMPAtomicDirective(const OMPAtomicDirective &s);
2063+
mlir::LogicalResult emitOMPTargetDirective(const OMPTargetDirective &s);
2064+
mlir::LogicalResult emitOMPTeamsDirective(const OMPTeamsDirective &s);
2065+
mlir::LogicalResult
2066+
emitOMPCancellationPointDirective(const OMPCancellationPointDirective &s);
2067+
mlir::LogicalResult emitOMPCancelDirective(const OMPCancelDirective &s);
2068+
mlir::LogicalResult
2069+
emitOMPTargetDataDirective(const OMPTargetDataDirective &s);
2070+
mlir::LogicalResult
2071+
emitOMPTargetEnterDataDirective(const OMPTargetEnterDataDirective &s);
2072+
mlir::LogicalResult
2073+
emitOMPTargetExitDataDirective(const OMPTargetExitDataDirective &s);
2074+
mlir::LogicalResult
2075+
emitOMPTargetParallelDirective(const OMPTargetParallelDirective &s);
2076+
mlir::LogicalResult
2077+
emitOMPTargetParallelForDirective(const OMPTargetParallelForDirective &s);
2078+
mlir::LogicalResult emitOMPTaskLoopDirective(const OMPTaskLoopDirective &s);
2079+
mlir::LogicalResult
2080+
emitOMPTaskLoopSimdDirective(const OMPTaskLoopSimdDirective &s);
2081+
mlir::LogicalResult
2082+
emitOMPMaskedTaskLoopDirective(const OMPMaskedTaskLoopDirective &s);
2083+
mlir::LogicalResult
2084+
emitOMPMaskedTaskLoopSimdDirective(const OMPMaskedTaskLoopSimdDirective &s);
2085+
mlir::LogicalResult
2086+
emitOMPMasterTaskLoopDirective(const OMPMasterTaskLoopDirective &s);
2087+
mlir::LogicalResult
2088+
emitOMPMasterTaskLoopSimdDirective(const OMPMasterTaskLoopSimdDirective &s);
2089+
mlir::LogicalResult
2090+
emitOMPParallelGenericLoopDirective(const OMPParallelGenericLoopDirective &s);
2091+
mlir::LogicalResult
2092+
emitOMPParallelMaskedDirective(const OMPParallelMaskedDirective &s);
2093+
mlir::LogicalResult emitOMPParallelMaskedTaskLoopDirective(
2094+
const OMPParallelMaskedTaskLoopDirective &s);
2095+
mlir::LogicalResult emitOMPParallelMaskedTaskLoopSimdDirective(
2096+
const OMPParallelMaskedTaskLoopSimdDirective &s);
2097+
mlir::LogicalResult emitOMPParallelMasterTaskLoopDirective(
2098+
const OMPParallelMasterTaskLoopDirective &s);
2099+
mlir::LogicalResult emitOMPParallelMasterTaskLoopSimdDirective(
2100+
const OMPParallelMasterTaskLoopSimdDirective &s);
2101+
mlir::LogicalResult
2102+
emitOMPDistributeDirective(const OMPDistributeDirective &s);
2103+
mlir::LogicalResult emitOMPDistributeParallelForDirective(
2104+
const OMPDistributeParallelForDirective &s);
2105+
mlir::LogicalResult emitOMPDistributeParallelForSimdDirective(
2106+
const OMPDistributeParallelForSimdDirective &s);
2107+
mlir::LogicalResult
2108+
emitOMPDistributeSimdDirective(const OMPDistributeSimdDirective &s);
2109+
mlir::LogicalResult emitOMPTargetParallelGenericLoopDirective(
2110+
const OMPTargetParallelGenericLoopDirective &s);
2111+
mlir::LogicalResult emitOMPTargetParallelForSimdDirective(
2112+
const OMPTargetParallelForSimdDirective &s);
2113+
mlir::LogicalResult
2114+
emitOMPTargetSimdDirective(const OMPTargetSimdDirective &s);
2115+
mlir::LogicalResult emitOMPTargetTeamsGenericLoopDirective(
2116+
const OMPTargetTeamsGenericLoopDirective &s);
2117+
mlir::LogicalResult
2118+
emitOMPTargetUpdateDirective(const OMPTargetUpdateDirective &s);
2119+
mlir::LogicalResult
2120+
emitOMPTeamsDistributeDirective(const OMPTeamsDistributeDirective &s);
2121+
mlir::LogicalResult
2122+
emitOMPTeamsDistributeSimdDirective(const OMPTeamsDistributeSimdDirective &s);
2123+
mlir::LogicalResult emitOMPTeamsDistributeParallelForSimdDirective(
2124+
const OMPTeamsDistributeParallelForSimdDirective &s);
2125+
mlir::LogicalResult emitOMPTeamsDistributeParallelForDirective(
2126+
const OMPTeamsDistributeParallelForDirective &s);
2127+
mlir::LogicalResult
2128+
emitOMPTeamsGenericLoopDirective(const OMPTeamsGenericLoopDirective &s);
2129+
mlir::LogicalResult
2130+
emitOMPTargetTeamsDirective(const OMPTargetTeamsDirective &s);
2131+
mlir::LogicalResult emitOMPTargetTeamsDistributeDirective(
2132+
const OMPTargetTeamsDistributeDirective &s);
2133+
mlir::LogicalResult emitOMPTargetTeamsDistributeParallelForDirective(
2134+
const OMPTargetTeamsDistributeParallelForDirective &s);
2135+
mlir::LogicalResult emitOMPTargetTeamsDistributeParallelForSimdDirective(
2136+
const OMPTargetTeamsDistributeParallelForSimdDirective &s);
2137+
mlir::LogicalResult emitOMPTargetTeamsDistributeSimdDirective(
2138+
const OMPTargetTeamsDistributeSimdDirective &s);
2139+
mlir::LogicalResult emitOMPInteropDirective(const OMPInteropDirective &s);
2140+
mlir::LogicalResult emitOMPDispatchDirective(const OMPDispatchDirective &s);
2141+
mlir::LogicalResult
2142+
emitOMPGenericLoopDirective(const OMPGenericLoopDirective &s);
2143+
mlir::LogicalResult emitOMPReverseDirective(const OMPReverseDirective &s);
2144+
mlir::LogicalResult
2145+
emitOMPInterchangeDirective(const OMPInterchangeDirective &s);
2146+
mlir::LogicalResult emitOMPAssumeDirective(const OMPAssumeDirective &s);
2147+
mlir::LogicalResult emitOMPMaskedDirective(const OMPMaskedDirective &s);
2148+
mlir::LogicalResult emitOMPStripeDirective(const OMPStripeDirective &s);
2149+
2150+
void emitOMPThreadPrivateDecl(const OMPThreadPrivateDecl &d);
2151+
void emitOMPGroupPrivateDecl(const OMPGroupPrivateDecl &d);
2152+
void emitOMPCapturedExpr(const OMPCapturedExprDecl &d);
2153+
void emitOMPAllocateDecl(const OMPAllocateDecl &d);
2154+
void emitOMPDeclareReduction(const OMPDeclareReductionDecl &d);
2155+
void emitOMPDeclareMapper(const OMPDeclareMapperDecl &d);
2156+
void emitOMPRequiresDecl(const OMPRequiresDecl &d);
2157+
20252158
//===--------------------------------------------------------------------===//
20262159
// OpenACC Emission
20272160
//===--------------------------------------------------------------------===//

clang/lib/CIR/CodeGen/CIRGenModule.cpp

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,12 @@ void CIRGenModule::emitGlobal(clang::GlobalDecl gd) {
364364
return;
365365
}
366366

367+
// TODO(OMP): The logic in this function for the 'rest' of the OpenMP
368+
// declarative declarations is complicated and needs to be done on a per-kind
369+
// basis, so all of that needs to be added when we implement the individual
370+
// global-allowed declarations. See uses of `cir::MissingFeatures::openMP
371+
// throughout this function.
372+
367373
const auto *global = cast<ValueDecl>(gd.getDecl());
368374

369375
if (const auto *fd = dyn_cast<FunctionDecl>(global)) {
@@ -1578,6 +1584,27 @@ void CIRGenModule::emitTopLevelDecl(Decl *decl) {
15781584
case Decl::OpenACCDeclare:
15791585
emitGlobalOpenACCDeclareDecl(cast<OpenACCDeclareDecl>(decl));
15801586
break;
1587+
case Decl::OMPThreadPrivate:
1588+
emitOMPThreadPrivateDecl(cast<OMPThreadPrivateDecl>(decl));
1589+
break;
1590+
case Decl::OMPGroupPrivate:
1591+
emitOMPGroupPrivateDecl(cast<OMPGroupPrivateDecl>(decl));
1592+
break;
1593+
case Decl::OMPAllocate:
1594+
emitOMPAllocateDecl(cast<OMPAllocateDecl>(decl));
1595+
break;
1596+
case Decl::OMPCapturedExpr:
1597+
emitOMPCapturedExpr(cast<OMPCapturedExprDecl>(decl));
1598+
break;
1599+
case Decl::OMPDeclareReduction:
1600+
emitOMPDeclareReduction(cast<OMPDeclareReductionDecl>(decl));
1601+
break;
1602+
case Decl::OMPDeclareMapper:
1603+
emitOMPDeclareMapper(cast<OMPDeclareMapperDecl>(decl));
1604+
break;
1605+
case Decl::OMPRequires:
1606+
emitOMPRequiresDecl(cast<OMPRequiresDecl>(decl));
1607+
break;
15811608
case Decl::Enum:
15821609
case Decl::Using: // using X; [C++]
15831610
case Decl::UsingDirective: // using namespace X; [C++]

clang/lib/CIR/CodeGen/CIRGenModule.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,14 @@ class CIRGenModule : public CIRGenTypeCache {
491491
cir::FuncOp func, SourceLocation pragmaLoc,
492492
ArrayRef<const OpenACCClause *> clauses);
493493

494+
void emitOMPThreadPrivateDecl(const OMPThreadPrivateDecl *d);
495+
void emitOMPGroupPrivateDecl(const OMPGroupPrivateDecl *d);
496+
void emitOMPCapturedExpr(const OMPCapturedExprDecl *d);
497+
void emitOMPAllocateDecl(const OMPAllocateDecl *d);
498+
void emitOMPDeclareReduction(const OMPDeclareReductionDecl *d);
499+
void emitOMPDeclareMapper(const OMPDeclareMapperDecl *d);
500+
void emitOMPRequiresDecl(const OMPRequiresDecl *d);
501+
494502
// C++ related functions.
495503
void emitDeclContext(const DeclContext *dc);
496504

0 commit comments

Comments
 (0)