Lines Matching defs:CodeGenFunction
15 #include "CodeGenFunction.h"
53 class OMPLexicalScope : public CodeGenFunction::LexicalScope {
54 void emitPreInitStmt(CodeGenFunction &CGF, const OMPExecutableDirective &S) {
63 CodeGenFunction::AutoVarEmission Emission =
72 CodeGenFunction::OMPPrivateScope InlinedShareds;
74 static bool isCapturedVar(CodeGenFunction &CGF, const VarDecl *VD) {
83 CodeGenFunction &CGF, const OMPExecutableDirective &S,
86 : CodeGenFunction::LexicalScope(CGF, S.getSourceRange()),
123 OMPParallelScope(CodeGenFunction &CGF, const OMPExecutableDirective &S)
138 OMPTeamsScope(CodeGenFunction &CGF, const OMPExecutableDirective &S)
145 class OMPLoopScope : public CodeGenFunction::RunCleanupsScope {
146 void emitPreInitStmt(CodeGenFunction &CGF, const OMPLoopBasedDirective &S) {
148 CodeGenFunction::OMPMapVars PreCondVars;
225 OMPLoopScope(CodeGenFunction &CGF, const OMPLoopBasedDirective &S)
226 : CodeGenFunction::RunCleanupsScope(CGF) {
231 class OMPSimdLexicalScope : public CodeGenFunction::LexicalScope {
232 CodeGenFunction::OMPPrivateScope InlinedShareds;
234 static bool isCapturedVar(CodeGenFunction &CGF, const VarDecl *VD) {
242 OMPSimdLexicalScope(CodeGenFunction &CGF, const OMPExecutableDirective &S)
243 : CodeGenFunction::LexicalScope(CGF, S.getSourceRange()),
253 CodeGenFunction::AutoVarEmission Emission =
338 static void emitCommonOMPTargetDirective(CodeGenFunction &CGF,
342 LValue CodeGenFunction::EmitOMPSharedLValue(const Expr *E) {
358 llvm::Value *CodeGenFunction::getTypeSize(QualType Ty) {
378 void CodeGenFunction::GenerateOpenMPCapturedVars(
425 static Address castValueFromUintptr(CodeGenFunction &CGF, SourceLocation Loc,
480 CodeGenFunction &CGF, FunctionArgList &Args,
664 CodeGenFunction::GenerateOpenMPCapturedStmtFunction(const CapturedStmt &S,
682 CodeGenFunction WrapperCGF(CGM, /*suppressNewContext=*/true);
700 CodeGenFunction::OMPPrivateScope LocalScope(*this);
756 void CodeGenFunction::EmitOMPAggregateAssign(
821 void CodeGenFunction::EmitOMPCopy(QualType OriginalType, Address DestAddr,
840 CodeGenFunction::OMPPrivateScope Remap(*this);
849 CodeGenFunction::OMPPrivateScope Remap(*this);
858 bool CodeGenFunction::EmitOMPFirstprivateClause(const OMPExecutableDirective &D,
1002 void CodeGenFunction::EmitOMPPrivateClause(
1004 CodeGenFunction::OMPPrivateScope &PrivateScope) {
1027 bool CodeGenFunction::EmitOMPCopyinClause(const OMPExecutableDirective &D) {
1099 bool CodeGenFunction::EmitOMPLastprivateClauseInit(
1162 void CodeGenFunction::EmitOMPLastprivateClauseFinal(
1253 void CodeGenFunction::EmitOMPReductionClauseInit(
1255 CodeGenFunction::OMPPrivateScope &PrivateScope, bool ForInscan) {
1297 [&Emission](CodeGenFunction &CGF) {
1463 void CodeGenFunction::EmitOMPReductionClauseFinal(
1507 CodeGenFunction &CGF, const OMPExecutableDirective &D,
1508 const llvm::function_ref<llvm::Value *(CodeGenFunction &)> CondGen) {
1535 typedef llvm::function_ref<void(CodeGenFunction &,
1542 checkForLastprivateConditionalUpdate(CodeGenFunction &CGF,
1599 CodeGenFunction &CGF, const OMPExecutableDirective &S,
1609 CodeGenFunction::RunCleanupsScope NumThreadsScope(CGF);
1616 CodeGenFunction::RunCleanupsScope ProcBindScope(CGF);
1652 static void emitEmptyBoundParameters(CodeGenFunction &,
1656 static void emitOMPCopyinClause(CodeGenFunction &CGF,
1669 Address CodeGenFunction::OMPBuilderCBHelpers::getAddressOfLocalVariable(
1670 CodeGenFunction &CGF, const VarDecl *VD) {
1719 Address CodeGenFunction::OMPBuilderCBHelpers::getAddrOfThreadPrivate(
1720 CodeGenFunction &CGF, const VarDecl *VD, Address VDAddr,
1742 std::string CodeGenFunction::OMPBuilderCBHelpers::getNameWithSeparators(
1754 void CodeGenFunction::OMPBuilderCBHelpers::EmitOMPInlinedRegionBody(
1755 CodeGenFunction &CGF, const Stmt *RegionBodyStmt, InsertPointTy AllocaIP,
1771 void CodeGenFunction::OMPBuilderCBHelpers::EmitOMPOutlinedRegionBody(
1772 CodeGenFunction &CGF, const Stmt *RegionBodyStmt, InsertPointTy AllocaIP,
1788 void CodeGenFunction::EmitOMPParallelDirective(const OMPParallelDirective &S) {
1839 CodeGenFunction::CGCapturedStmtRAII CapInfoRAII(*this, &CGSI);
1850 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &Action) {
1867 [](CodeGenFunction &) { return nullptr; });
1873 void CodeGenFunction::EmitOMPMetaDirective(const OMPMetaDirective &S) {
1881 CodeGenFunction::CGCapturedStmtInfo *CGSI = nullptr;
1882 CodeGenFunction::CGCapturedStmtRAII *CapInfoRAII = nullptr;
1890 OMPTransformDirectiveScopeRAII(CodeGenFunction &CGF, const Stmt *S) {
1893 CGSI = new CodeGenFunction::CGCapturedStmtInfo(CR_OpenMP);
1894 CapInfoRAII = new CodeGenFunction::CGCapturedStmtRAII(CGF, CGSI);
1907 static void emitBody(CodeGenFunction &CGF, const Stmt *S, const Stmt *NextLoop,
1917 CodeGenFunction::LexicalScope Scope(CGF, S->getSourceRange());
1946 void CodeGenFunction::EmitOMPLoopBody(const OMPLoopDirective &D,
2019 static EmittedClosureTy emitCapturedStmtFunc(CodeGenFunction &ParentCGF,
2022 CodeGenFunction CGF(ParentCGF.CGM, /*suppressNewContext=*/true);
2023 std::unique_ptr<CodeGenFunction::CGCapturedStmtInfo> CSI =
2024 std::make_unique<CodeGenFunction::CGCapturedStmtInfo>(*S);
2025 CodeGenFunction::CGCapturedStmtRAII CapInfoRAII(CGF, CSI.get());
2033 emitCapturedStmtCall(CodeGenFunction &ParentCGF, EmittedClosureTy Cap,
2045 CodeGenFunction::EmitOMPCollapsedCanonicalLoopNest(const Stmt *S, int Depth) {
2071 void CodeGenFunction::EmitOMPCanonicalLoop(const OMPCanonicalLoop *S) {
2148 void CodeGenFunction::EmitOMPInnerLoop(
2151 const llvm::function_ref<void(CodeGenFunction &)> BodyGen,
2152 const llvm::function_ref<void(CodeGenFunction &)> PostIncGen) {
2209 bool CodeGenFunction::EmitOMPLinearClauseInit(const OMPLoopDirective &D) {
2247 void CodeGenFunction::EmitOMPLinearClauseFinal(
2249 const llvm::function_ref<llvm::Value *(CodeGenFunction &)> CondGen) {
2272 CodeGenFunction::OMPPrivateScope VarScope(*this);
2285 static void emitAlignedClause(CodeGenFunction &CGF,
2320 void CodeGenFunction::EmitOMPPrivateLoopCounters(
2321 const OMPLoopDirective &S, CodeGenFunction::OMPPrivateScope &LoopScope) {
2362 static void emitPreCond(CodeGenFunction &CGF, const OMPLoopDirective &S,
2368 CodeGenFunction::OMPPrivateScope PreCondScope(CGF);
2378 CodeGenFunction::OMPMapVars PreCondVars;
2400 void CodeGenFunction::EmitOMPLinearClause(
2401 const OMPLoopDirective &D, CodeGenFunction::OMPPrivateScope &PrivateScope) {
2435 static void emitSimdlenSafelenClause(CodeGenFunction &CGF,
2460 void CodeGenFunction::EmitOMPSimdInit(const OMPLoopDirective &D) {
2479 void CodeGenFunction::EmitOMPSimdFinal(
2481 const llvm::function_ref<llvm::Value *(CodeGenFunction &)> CondGen) {
2524 static void emitOMPLoopBodyWithStopPoint(CodeGenFunction &CGF,
2526 CodeGenFunction::JumpDest LoopExit) {
2532 static LValue EmitOMPHelperVar(CodeGenFunction &CGF,
2539 static void emitCommonSimdLoop(CodeGenFunction &CGF, const OMPLoopDirective &S,
2542 auto &&ThenGen = [&S, &SimdInitGen, &BodyCodeGen](CodeGenFunction &CGF,
2545 CodeGenFunction::OMPLocalDeclMapRAII Scope(CGF);
2550 auto &&ElseGen = [&BodyCodeGen](CodeGenFunction &CGF, PrePostActionTy &) {
2551 CodeGenFunction::OMPLocalDeclMapRAII Scope(CGF);
2576 static void emitOMPSimdRegion(CodeGenFunction &CGF, const OMPLoopDirective &S,
2632 CodeGenFunction::OMPPrivateScope LoopScope(CGF);
2646 [&S](CodeGenFunction &CGF, PrePostActionTy &) {
2649 [&S, &LoopScope](CodeGenFunction &CGF, PrePostActionTy &) {
2652 [&S](CodeGenFunction &CGF) {
2654 CodeGenFunction::JumpDest());
2656 [](CodeGenFunction &) {});
2658 CGF.EmitOMPSimdFinal(S, [](CodeGenFunction &) { return nullptr; });
2664 [](CodeGenFunction &) { return nullptr; });
2666 CGF.EmitOMPLinearClauseFinal(S, [](CodeGenFunction &) { return nullptr; });
2710 GetAlignedMapping(const OMPLoopDirective &S, CodeGenFunction &CGF) {
2743 CodeGenFunction &CGF, CodeGenModule &CGM) {
2747 auto &&CodeGenIRBuilder = [&S, &CGM, UseOMPIRBuilder](CodeGenFunction &CGF,
2798 CodeGenFunction::ParentLoopDirectiveForScanRegion ScanRegion(CGF, S);
2800 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &Action) {
2813 void CodeGenFunction::EmitOMPSimdDirective(const OMPSimdDirective &S) {
2817 void CodeGenFunction::EmitOMPTileDirective(const OMPTileDirective &S) {
2823 void CodeGenFunction::EmitOMPReverseDirective(const OMPReverseDirective &S) {
2829 void CodeGenFunction::EmitOMPInterchangeDirective(
2836 void CodeGenFunction::EmitOMPUnrollDirective(const OMPUnrollDirective &S) {
2898 void CodeGenFunction::EmitOMPOuterLoop(
2900 CodeGenFunction::OMPPrivateScope &LoopScope,
2901 const CodeGenFunction::OMPLoopArguments &LoopArgs,
2902 const CodeGenFunction::CodeGenLoopTy &CodeGenLoop,
2903 const CodeGenFunction::CodeGenOrderedTy &CodeGenOrdered) {
2962 [&S, IsMonotonic, EKind](CodeGenFunction &CGF, PrePostActionTy &) {
2975 &LoopScope](CodeGenFunction &CGF, PrePostActionTy &) {
2984 [&S, LoopExit, &CodeGenLoop](CodeGenFunction &CGF) {
2987 [IVSize, IVSigned, Loc, &CodeGenOrdered](CodeGenFunction &CGF) {
3007 auto &&CodeGen = [DynamicOrOrdered, &S, &LoopArgs](CodeGenFunction &CGF) {
3015 void CodeGenFunction::EmitOMPForOuterLoop(
3103 auto &&CodeGenOrdered = [Ordered](CodeGenFunction &CGF, SourceLocation Loc,
3127 static void emitEmptyOrdered(CodeGenFunction &, SourceLocation Loc,
3130 void CodeGenFunction::EmitOMPDistributeOuterLoop(
3193 emitDistributeParallelForInnerBounds(CodeGenFunction &CGF,
3236 emitDistributeParallelForDispatchBounds(CodeGenFunction &CGF,
3254 CodeGenFunction &CGF, const OMPExecutableDirective &S,
3271 emitInnerParallelForWhenCombined(CodeGenFunction &CGF,
3273 CodeGenFunction::JumpDest LoopExit) {
3275 auto &&CGInlinedWorksharingLoop = [&S, EKind](CodeGenFunction &CGF,
3288 CodeGenFunction::OMPCancelStackRAII CancelRegion(CGF, EKind, HasCancel);
3300 void CodeGenFunction::EmitOMPDistributeParallelForDirective(
3302 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &) {
3310 void CodeGenFunction::EmitOMPDistributeParallelForSimdDirective(
3312 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &) {
3320 void CodeGenFunction::EmitOMPDistributeSimdDirective(
3322 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &) {
3329 void CodeGenFunction::EmitOMPTargetSimdDeviceFunction(
3332 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &Action) {
3343 void CodeGenFunction::EmitOMPTargetSimdDirective(
3345 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &Action) {
3363 bool CodeGenFunction::EmitOMPWorksharingLoop(
3500 [&S, EKind](CodeGenFunction &CGF, PrePostActionTy &) {
3510 &LoopScope](CodeGenFunction &CGF, PrePostActionTy &) {
3545 [&S, LoopExit](CodeGenFunction &CGF) {
3548 [](CodeGenFunction &) {});
3552 auto &&CodeGen = [&S](CodeGenFunction &CGF) {
3568 EmitOMPSimdFinal(S, [IL, &S](CodeGenFunction &CGF) {
3579 *this, S, [IL, &S](CodeGenFunction &CGF) {
3589 EmitOMPLinearClauseFinal(S, [IL, &S](CodeGenFunction &CGF) {
3608 emitForLoopBounds(CodeGenFunction &CGF, const OMPExecutableDirective &S) {
3622 emitDispatchForLoopBounds(CodeGenFunction &CGF, const OMPExecutableDirective &S,
3640 CodeGenFunction &CGF, const OMPLoopDirective &S,
3641 llvm::function_ref<llvm::Value *(CodeGenFunction &)> NumIteratorsGen) {
3672 CodeGenFunction::OpaqueValueMapping DimMapping(
3692 CodeGenFunction &CGF, const OMPLoopDirective &S,
3693 llvm::function_ref<llvm::Value *(CodeGenFunction &)> NumIteratorsGen) {
3722 CodeGenFunction::OpaqueValueMapping IdxMapping(
3756 CodeGenFunction &CGF, const OMPLoopDirective &S,
3757 llvm::function_ref<llvm::Value *(CodeGenFunction &)> NumIteratorsGen,
3758 llvm::function_ref<void(CodeGenFunction &)> FirstGen,
3759 llvm::function_ref<void(CodeGenFunction &)> SecondGen) {
3777 CodeGenFunction::ParentLoopDirectiveForScanRegion ScanRegion(CGF, S);
3786 CodeGenFunction::OMPLocalDeclMapRAII Scope(CGF);
3792 &Privates](CodeGenFunction &CGF, PrePostActionTy &Action) {
3829 CodeGenFunction::OMPPrivateScope PrivScope(CGF);
3837 CodeGenFunction::OpaqueValueMapping IdxMapping(
3848 CodeGenFunction::OpaqueValueMapping IdxMapping(
3897 static bool emitWorksharingDirective(CodeGenFunction &CGF,
3906 const auto &&NumIteratorsGen = [&S](CodeGenFunction &CGF) {
3907 CodeGenFunction::OMPLocalDeclMapRAII Scope(CGF);
3911 const auto &&FirstGen = [&S, HasCancel, EKind](CodeGenFunction &CGF) {
3912 CodeGenFunction::OMPCancelStackRAII CancelRegion(CGF, EKind, HasCancel);
3921 &HasLastprivates](CodeGenFunction &CGF) {
3922 CodeGenFunction::OMPCancelStackRAII CancelRegion(CGF, EKind, HasCancel);
3933 CodeGenFunction::OMPCancelStackRAII CancelRegion(CGF, EKind, HasCancel);
3995 static void emitOMPForDirective(const OMPLoopDirective &S, CodeGenFunction &CGF,
4001 UseOMPIRBuilder](CodeGenFunction &CGF, PrePostActionTy &) {
4051 void CodeGenFunction::EmitOMPForDirective(const OMPForDirective &S) {
4055 void CodeGenFunction::EmitOMPForSimdDirective(const OMPForSimdDirective &S) {
4057 auto &&CodeGen = [&S, &HasLastprivates](CodeGenFunction &CGF,
4075 static LValue createSectionLVal(CodeGenFunction &CGF, QualType Ty,
4084 void CodeGenFunction::EmitSections(const OMPExecutableDirective &S) {
4090 &HasLastprivates](CodeGenFunction &CGF, PrePostActionTy &) {
4109 CodeGenFunction::OpaqueValueMapping OpaqueIV(CGF, &IVRefExpr, IV);
4111 CodeGenFunction::OpaqueValueMapping OpaqueUB(CGF, &UBRefExpr, UB);
4120 auto &&BodyGen = [CapturedStmt, CS, &S, &IV](CodeGenFunction &CGF) {
4156 CodeGenFunction::OMPPrivateScope LoopScope(CGF);
4190 [](CodeGenFunction &) {});
4192 auto &&CodeGen = [&S](CodeGenFunction &CGF) {
4199 emitPostUpdateForReductionClause(CGF, S, [IL, &S](CodeGenFunction &CGF) {
4231 void CodeGenFunction::EmitOMPScopeDirective(const OMPScopeDirective &S) {
4234 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &Action) {
4257 void CodeGenFunction::EmitOMPSectionsDirective(const OMPSectionsDirective &S) {
4306 CodeGenFunction::CGCapturedStmtRAII CapInfoRAII(*this, &CGSI);
4331 void CodeGenFunction::EmitOMPSectionDirective(const OMPSectionDirective &S) {
4362 void CodeGenFunction::EmitOMPSingleDirective(const OMPSingleDirective &S) {
4380 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &Action) {
4407 static void emitMaster(CodeGenFunction &CGF, const OMPExecutableDirective &S) {
4408 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &Action) {
4415 void CodeGenFunction::EmitOMPMasterDirective(const OMPMasterDirective &S) {
4447 static void emitMasked(CodeGenFunction &CGF, const OMPExecutableDirective &S) {
4448 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &Action) {
4459 void CodeGenFunction::EmitOMPMaskedDirective(const OMPMaskedDirective &S) {
4497 void CodeGenFunction::EmitOMPCriticalDirective(const OMPCriticalDirective &S) {
4538 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &Action) {
4552 void CodeGenFunction::EmitOMPParallelForDirective(
4556 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &Action) {
4562 const auto &&NumIteratorsGen = [&S](CodeGenFunction &CGF) {
4563 CodeGenFunction::OMPLocalDeclMapRAII Scope(CGF);
4565 CodeGenFunction::CGCapturedStmtRAII CapInfoRAII(CGF, &CGSI);
4586 void CodeGenFunction::EmitOMPParallelForSimdDirective(
4590 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &Action) {
4596 const auto &&NumIteratorsGen = [&S](CodeGenFunction &CGF) {
4597 CodeGenFunction::OMPLocalDeclMapRAII Scope(CGF);
4599 CodeGenFunction::CGCapturedStmtRAII CapInfoRAII(CGF, &CGSI);
4620 void CodeGenFunction::EmitOMPParallelMasterDirective(
4624 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &Action) {
4641 [](CodeGenFunction &) { return nullptr; });
4647 void CodeGenFunction::EmitOMPParallelMaskedDirective(
4651 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &Action) {
4668 [](CodeGenFunction &) { return nullptr; });
4674 void CodeGenFunction::EmitOMPParallelSectionsDirective(
4678 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &Action) {
4763 void CodeGenFunction::EmitOMPTaskBasedDirective(
4867 CapturedRegion](CodeGenFunction &CGF,
5180 void CodeGenFunction::EmitOMPTargetTaskBasedDirective(
5254 &InputInfo](CodeGenFunction &CGF, PrePostActionTy &Action) {
5328 void CodeGenFunction::processInReduction(const OMPExecutableDirective &S,
5330 CodeGenFunction &CGF,
5416 void CodeGenFunction::EmitOMPTaskDirective(const OMPTaskDirective &S) {
5433 auto &&BodyGen = [CS](CodeGenFunction &CGF, PrePostActionTy &) {
5437 IfCond](CodeGenFunction &CGF, llvm::Function *OutlinedFn,
5448 void CodeGenFunction::EmitOMPTaskyieldDirective(
5453 void CodeGenFunction::EmitOMPErrorDirective(const OMPErrorDirective &S) {
5463 void CodeGenFunction::EmitOMPBarrierDirective(const OMPBarrierDirective &S) {
5467 void CodeGenFunction::EmitOMPTaskwaitDirective(const OMPTaskwaitDirective &S) {
5479 void CodeGenFunction::EmitOMPTaskgroupDirective(
5494 CodeGenFunction::CGCapturedStmtInfo CapStmtInfo;
5502 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &Action) {
5530 void CodeGenFunction::EmitOMPFlushDirective(const OMPFlushDirective &S) {
5545 void CodeGenFunction::EmitOMPDepobjDirective(const OMPDepobjDirective &S) {
5570 void CodeGenFunction::EmitOMPScanDirective(const OMPScanDirective &S) {
5770 void CodeGenFunction::EmitOMPDistributeLoop(const OMPLoopDirective &S,
5934 [&S](CodeGenFunction &CGF, PrePostActionTy &) {
5939 StaticChunked](CodeGenFunction &CGF, PrePostActionTy &) {
5942 [&S, LoopExit, &CodeGenLoop](CodeGenFunction &CGF) {
5945 [&S, StaticChunked](CodeGenFunction &CGF) {
5967 EmitOMPSimdFinal(S, [IL, &S](CodeGenFunction &CGF) {
5978 *this, S, [IL, &S](CodeGenFunction &CGF) {
6002 CodeGenFunction &CGF,
6004 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &) {
6011 void CodeGenFunction::EmitOMPDistributeDirective(
6019 CodeGenFunction CGF(CGM, /*suppressNewContext=*/true);
6020 CodeGenFunction::CGCapturedStmtInfo CapStmtInfo;
6028 static void emitRestoreIP(CodeGenFunction &CGF, const T *C,
6051 void CodeGenFunction::EmitOMPOrderedDirective(const OMPOrderedDirective &S) {
6124 auto &&CodeGen = [&S, C, this](CodeGenFunction &CGF,
6143 static llvm::Value *convertToScalarValue(CodeGenFunction &CGF, RValue Val,
6155 static CodeGenFunction::ComplexPairTy
6156 convertToComplexValue(CodeGenFunction &CGF, RValue Val, QualType SrcType,
6160 CodeGenFunction::ComplexPairTy ComplexVal;
6167 ComplexVal = CodeGenFunction::ComplexPairTy(
6182 static void emitSimpleAtomicStore(CodeGenFunction &CGF, llvm::AtomicOrdering AO,
6190 static RValue emitSimpleAtomicLoad(CodeGenFunction &CGF,
6200 void CodeGenFunction::emitOMPSimpleStore(LValue LVal, RValue RVal,
6218 static void emitOMPAtomicReadExpr(CodeGenFunction &CGF, llvm::AtomicOrdering AO,
6249 static void emitOMPAtomicWriteExpr(CodeGenFunction &CGF,
6276 static std::pair<bool, RValue> emitOMPAtomicRMW(CodeGenFunction &CGF, LValue X,
6394 std::pair<bool, RValue> CodeGenFunction::EmitOMPAtomicSimpleUpdateExpr(
6418 static void emitOMPAtomicUpdateExpr(CodeGenFunction &CGF,
6439 CodeGenFunction::OpaqueValueMapping MapExpr(CGF, ERValExpr, ExprRValue);
6440 CodeGenFunction::OpaqueValueMapping MapX(CGF, XRValExpr, XRValue);
6466 static RValue convertToType(CodeGenFunction &CGF, RValue Value,
6483 static void emitOMPAtomicCaptureExpr(CodeGenFunction &CGF,
6514 CodeGenFunction::OpaqueValueMapping MapExpr(CGF, ERValExpr, ExprRValue);
6515 CodeGenFunction::OpaqueValueMapping MapX(CGF, XRValExpr, XRValue);
6531 CodeGenFunction::OpaqueValueMapping MapExpr(CGF, ERValExpr, ExprRValue);
6532 CodeGenFunction::OpaqueValueMapping MapX(CGF, XRValExpr, Res.second);
6591 CodeGenFunction &CGF, llvm::AtomicOrdering AO, llvm::AtomicOrdering FailAO,
6671 static void emitOMPAtomicExpr(CodeGenFunction &CGF, OpenMPClauseKind Kind,
6703 void CodeGenFunction::EmitOMPAtomicDirective(const OMPAtomicDirective &S) {
6786 static void emitCommonOMPTargetDirective(CodeGenFunction &CGF,
6796 CGF, OMPD_target, [&S](CodeGenFunction &CGF, PrePostActionTy &) {
6858 [IsOffloadEntry](CodeGenFunction &CGF,
6874 static void emitTargetRegion(CodeGenFunction &CGF, const OMPTargetDirective &S,
6877 CodeGenFunction::OMPPrivateScope PrivateScope(CGF);
6888 void CodeGenFunction::EmitOMPTargetDeviceFunction(CodeGenModule &CGM,
6891 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &Action) {
6902 void CodeGenFunction::EmitOMPTargetDirective(const OMPTargetDirective &S) {
6903 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &Action) {
6909 static void emitCommonOMPTeamsDirective(CodeGenFunction &CGF,
6936 void CodeGenFunction::EmitOMPTeamsDirective(const OMPTeamsDirective &S) {
6938 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &Action) {
6950 [](CodeGenFunction &) { return nullptr; });
6953 static void emitTargetTeamsRegion(CodeGenFunction &CGF, PrePostActionTy &Action,
6958 auto &&CodeGen = [&S, CS](CodeGenFunction &CGF, PrePostActionTy &Action) {
6960 CodeGenFunction::OMPPrivateScope PrivateScope(CGF);
6972 [](CodeGenFunction &) { return nullptr; });
6975 void CodeGenFunction::EmitOMPTargetTeamsDeviceFunction(
6978 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &Action) {
6989 void CodeGenFunction::EmitOMPTargetTeamsDirective(
6991 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &Action) {
6998 emitTargetTeamsDistributeRegion(CodeGenFunction &CGF, PrePostActionTy &Action,
7001 auto &&CodeGenDistribute = [&S](CodeGenFunction &CGF, PrePostActionTy &) {
7006 auto &&CodeGen = [&S, &CodeGenDistribute](CodeGenFunction &CGF,
7009 CodeGenFunction::OMPPrivateScope PrivateScope(CGF);
7018 [](CodeGenFunction &) { return nullptr; });
7021 void CodeGenFunction::EmitOMPTargetTeamsDistributeDeviceFunction(
7024 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &Action) {
7035 void CodeGenFunction::EmitOMPTargetTeamsDistributeDirective(
7037 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &Action) {
7044 CodeGenFunction &CGF, PrePostActionTy &Action,
7047 auto &&CodeGenDistribute = [&S](CodeGenFunction &CGF, PrePostActionTy &) {
7052 auto &&CodeGen = [&S, &CodeGenDistribute](CodeGenFunction &CGF,
7055 CodeGenFunction::OMPPrivateScope PrivateScope(CGF);
7064 [](CodeGenFunction &) { return nullptr; });
7067 void CodeGenFunction::EmitOMPTargetTeamsDistributeSimdDeviceFunction(
7070 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &Action) {
7081 void CodeGenFunction::EmitOMPTargetTeamsDistributeSimdDirective(
7083 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &Action) {
7089 void CodeGenFunction::EmitOMPTeamsDistributeDirective(
7092 auto &&CodeGenDistribute = [&S](CodeGenFunction &CGF, PrePostActionTy &) {
7097 auto &&CodeGen = [&S, &CodeGenDistribute](CodeGenFunction &CGF,
7109 [](CodeGenFunction &) { return nullptr; });
7112 void CodeGenFunction::EmitOMPTeamsDistributeSimdDirective(
7114 auto &&CodeGenDistribute = [&S](CodeGenFunction &CGF, PrePostActionTy &) {
7119 auto &&CodeGen = [&S, &CodeGenDistribute](CodeGenFunction &CGF,
7131 [](CodeGenFunction &) { return nullptr; });
7134 void CodeGenFunction::EmitOMPTeamsDistributeParallelForDirective(
7136 auto &&CodeGenDistribute = [&S](CodeGenFunction &CGF, PrePostActionTy &) {
7142 auto &&CodeGen = [&S, &CodeGenDistribute](CodeGenFunction &CGF,
7154 [](CodeGenFunction &) { return nullptr; });
7157 void CodeGenFunction::EmitOMPTeamsDistributeParallelForSimdDirective(
7159 auto &&CodeGenDistribute = [&S](CodeGenFunction &CGF, PrePostActionTy &) {
7165 auto &&CodeGen = [&S, &CodeGenDistribute](CodeGenFunction &CGF,
7178 [](CodeGenFunction &) { return nullptr; });
7181 void CodeGenFunction::EmitOMPInteropDirective(const OMPInteropDirective &S) {
7252 CodeGenFunction &CGF, const OMPTargetTeamsDistributeParallelForDirective &S,
7255 auto &&CodeGenDistribute = [&S](CodeGenFunction &CGF, PrePostActionTy &) {
7261 auto &&CodeGenTeams = [&S, &CodeGenDistribute](CodeGenFunction &CGF,
7264 CodeGenFunction::OMPPrivateScope PrivateScope(CGF);
7275 [](CodeGenFunction &) { return nullptr; });
7278 void CodeGenFunction::EmitOMPTargetTeamsDistributeParallelForDeviceFunction(
7283 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &Action) {
7294 void CodeGenFunction::EmitOMPTargetTeamsDistributeParallelForDirective(
7296 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &Action) {
7303 CodeGenFunction &CGF,
7307 auto &&CodeGenDistribute = [&S](CodeGenFunction &CGF, PrePostActionTy &) {
7313 auto &&CodeGenTeams = [&S, &CodeGenDistribute](CodeGenFunction &CGF,
7316 CodeGenFunction::OMPPrivateScope PrivateScope(CGF);
7327 [](CodeGenFunction &) { return nullptr; });
7330 void CodeGenFunction::EmitOMPTargetTeamsDistributeParallelForSimdDeviceFunction(
7335 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &Action) {
7346 void CodeGenFunction::EmitOMPTargetTeamsDistributeParallelForSimdDirective(
7348 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &Action) {
7354 void CodeGenFunction::EmitOMPCancellationPointDirective(
7360 void CodeGenFunction::EmitOMPCancelDirective(const OMPCancelDirective &S) {
7390 CodeGenFunction::JumpDest
7391 CodeGenFunction::getOMPCancelDestination(OpenMPDirectiveKind Kind) {
7405 void CodeGenFunction::EmitOMPUseDevicePtrClause(
7456 void CodeGenFunction::EmitOMPUseDeviceAddrClause(
7505 void CodeGenFunction::EmitOMPTargetDataDirective(
7520 void Enter(CodeGenFunction &CGF) override {
7526 auto &&CodeGen = [&](CodeGenFunction &CGF, PrePostActionTy &Action) {
7527 auto &&InnermostCodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &) {
7532 auto &&PrivCodeGen = [&](CodeGenFunction &CGF, PrePostActionTy &Action) {
7617 void CodeGenFunction::EmitOMPTargetEnterDataDirective(
7638 void CodeGenFunction::EmitOMPTargetExitDataDirective(
7659 static void emitTargetParallelRegion(CodeGenFunction &CGF,
7665 auto &&CodeGen = [&S, CS](CodeGenFunction &CGF, PrePostActionTy &Action) {
7667 CodeGenFunction::OMPPrivateScope PrivateScope(CGF);
7681 [](CodeGenFunction &) { return nullptr; });
7684 void CodeGenFunction::EmitOMPTargetParallelDeviceFunction(
7687 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &Action) {
7698 void CodeGenFunction::EmitOMPTargetParallelDirective(
7700 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &Action) {
7706 static void emitTargetParallelForRegion(CodeGenFunction &CGF,
7712 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &Action) {
7714 CodeGenFunction::OMPCancelStackRAII CancelRegion(
7723 void CodeGenFunction::EmitOMPTargetParallelForDeviceFunction(
7727 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &Action) {
7738 void CodeGenFunction::EmitOMPTargetParallelForDirective(
7740 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &Action) {
7747 emitTargetParallelForSimdRegion(CodeGenFunction &CGF,
7753 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &Action) {
7762 void CodeGenFunction::EmitOMPTargetParallelForSimdDeviceFunction(
7766 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &Action) {
7777 void CodeGenFunction::EmitOMPTargetParallelForSimdDirective(
7779 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &Action) {
7786 static void mapParam(CodeGenFunction &CGF, const DeclRefExpr *Helper,
7788 CodeGenFunction::OMPPrivateScope &Privates) {
7793 void CodeGenFunction::EmitOMPTaskLoopBasedDirective(const OMPLoopDirective &S) {
7832 auto &&BodyGen = [CS, &S](CodeGenFunction &CGF, PrePostActionTy &) {
7897 [&S](CodeGenFunction &CGF, PrePostActionTy &) {
7901 [&S, &LoopScope](CodeGenFunction &CGF, PrePostActionTy &) {
7904 [&S](CodeGenFunction &CGF) {
7906 CodeGenFunction::JumpDest());
7908 [](CodeGenFunction &) {});
7925 CGF.EmitOMPLinearClauseFinal(S, [LIP, &S](CodeGenFunction &CGF) {
7932 IfCond](CodeGenFunction &CGF, llvm::Function *OutlinedFn,
7935 &Data](CodeGenFunction &CGF, PrePostActionTy &) {
7949 [&S, &BodyGen, &TaskGen, &Data](CodeGenFunction &CGF,
7959 void CodeGenFunction::EmitOMPTaskLoopDirective(const OMPTaskLoopDirective &S) {
7965 void CodeGenFunction::EmitOMPTaskLoopSimdDirective(
7973 void CodeGenFunction::EmitOMPMasterTaskLoopDirective(
7975 auto &&CodeGen = [this, &S](CodeGenFunction &CGF, PrePostActionTy &Action) {
7985 void CodeGenFunction::EmitOMPMaskedTaskLoopDirective(
7987 auto &&CodeGen = [this, &S](CodeGenFunction &CGF, PrePostActionTy &Action) {
7997 void CodeGenFunction::EmitOMPMasterTaskLoopSimdDirective(
7999 auto &&CodeGen = [this, &S](CodeGenFunction &CGF, PrePostActionTy &Action) {
8009 void CodeGenFunction::EmitOMPMaskedTaskLoopSimdDirective(
8011 auto &&CodeGen = [this, &S](CodeGenFunction &CGF, PrePostActionTy &Action) {
8021 void CodeGenFunction::EmitOMPParallelMasterTaskLoopDirective(
8023 auto &&CodeGen = [this, &S](CodeGenFunction &CGF, PrePostActionTy &Action) {
8024 auto &&TaskLoopCodeGen = [&S](CodeGenFunction &CGF,
8039 void CodeGenFunction::EmitOMPParallelMaskedTaskLoopDirective(
8041 auto &&CodeGen = [this, &S](CodeGenFunction &CGF, PrePostActionTy &Action) {
8042 auto &&TaskLoopCodeGen = [&S](CodeGenFunction &CGF,
8057 void CodeGenFunction::EmitOMPParallelMasterTaskLoopSimdDirective(
8059 auto &&CodeGen = [this, &S](CodeGenFunction &CGF, PrePostActionTy &Action) {
8060 auto &&TaskLoopCodeGen = [&S](CodeGenFunction &CGF,
8075 void CodeGenFunction::EmitOMPParallelMaskedTaskLoopSimdDirective(
8077 auto &&CodeGen = [this, &S](CodeGenFunction &CGF, PrePostActionTy &Action) {
8078 auto &&TaskLoopCodeGen = [&S](CodeGenFunction &CGF,
8094 void CodeGenFunction::EmitOMPTargetUpdateDirective(
8115 void CodeGenFunction::EmitOMPGenericLoopDirective(
8136 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &Action) {
8155 void CodeGenFunction::EmitOMPParallelGenericLoopDirective(
8159 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &Action) {
8174 void CodeGenFunction::EmitOMPTeamsGenericLoopDirective(
8178 auto &&CodeGenDistribute = [&S](CodeGenFunction &CGF, PrePostActionTy &) {
8183 auto &&CodeGen = [&S, &CodeGenDistribute](CodeGenFunction &CGF,
8195 [](CodeGenFunction &) { return nullptr; });
8199 static void emitTargetTeamsLoopCodegenStatus(CodeGenFunction &CGF,
8218 CodeGenFunction &CGF, PrePostActionTy &Action,
8223 auto &&CodeGenDistribute = [&S](CodeGenFunction &CGF, PrePostActionTy &) {
8229 auto &&CodeGenTeams = [&S, &CodeGenDistribute](CodeGenFunction &CGF,
8232 CodeGenFunction::OMPPrivateScope PrivateScope(CGF);
8245 [](CodeGenFunction &) { return nullptr; });
8249 CodeGenFunction &CGF, PrePostActionTy &Action,
8253 auto &&CodeGenDistribute = [&S](CodeGenFunction &CGF, PrePostActionTy &) {
8258 auto &&CodeGen = [&S, &CodeGenDistribute](CodeGenFunction &CGF,
8261 CodeGenFunction::OMPPrivateScope PrivateScope(CGF);
8273 [](CodeGenFunction &) { return nullptr; });
8276 void CodeGenFunction::EmitOMPTargetTeamsGenericLoopDirective(
8278 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &Action) {
8287 void CodeGenFunction::EmitOMPTargetTeamsGenericLoopDeviceFunction(
8291 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &Action) {
8307 CodeGenFunction &CGF, const OMPTargetParallelGenericLoopDirective &S,
8311 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &Action) {
8313 CodeGenFunction::OMPCancelStackRAII CancelRegion(
8322 void CodeGenFunction::EmitOMPTargetParallelGenericLoopDeviceFunction(
8326 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &Action) {
8339 void CodeGenFunction::EmitOMPTargetParallelGenericLoopDirective(
8341 auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &Action) {
8347 void CodeGenFunction::EmitSimpleOMPExecutableDirective(
8355 auto &&CodeGen = [&D](CodeGenFunction &CGF, PrePostActionTy &Action) {
8433 void CodeGenFunction::EmitOMPAssumeDirective(const OMPAssumeDirective &S) {