clang 8.0.0

Functions
CGStmtOpenMP.cpp File Reference
`#include "CGCleanup.h"`
`#include "CGOpenMPRuntime.h"`
`#include "CodeGenFunction.h"`
`#include "CodeGenModule.h"`
`#include "TargetInfo.h"`
`#include "clang/AST/Stmt.h"`
`#include "clang/AST/StmtOpenMP.h"`
`#include "clang/AST/DeclOpenMP.h"`
`#include "llvm/IR/CallSite.h"`
Include dependency graph for CGStmtOpenMP.cpp:

Go to the source code of this file.

## Functions
static void | emitCommonOMPTargetDirective (CodeGenFunction &CGF, const OMPExecutableDirective &S, const RegionCodeGenTy &CodeGen)
static Address | castValueFromUintptr (CodeGenFunction &CGF, SourceLocation Loc, QualType DstType, StringRef Name, LValue AddrLV, bool isReferenceType=false)
static QualType | getCanonicalParamType (ASTContext &C, QualType T)
static llvm::Function * | emitOutlinedFunctionPrologue (CodeGenFunction &CGF, FunctionArgList &Args, llvm::MapVector< const Decl *, std::pair< const VarDecl *, Address >> &LocalAddrs, llvm::DenseMap< const Decl *, std::pair< const Expr *, llvm::Value *>> &VLASizes, llvm::Value *&CXXThisValue, const FunctionOptions &FO)
static void | emitPostUpdateForReductionClause (CodeGenFunction &CGF, const OMPExecutableDirective &D, const llvm::function_ref< llvm::Value *(CodeGenFunction &)> CondGen)
static void | emitCommonOMPParallelDirective (CodeGenFunction &CGF, const OMPExecutableDirective &S, OpenMPDirectiveKind InnermostKind, const RegionCodeGenTy &CodeGen, const CodeGenBoundParametersTy &CodeGenBoundParameters)
static void | emitEmptyBoundParameters (CodeGenFunction &, const OMPExecutableDirective &, llvm::SmallVectorImpl< llvm::Value *> &)
static void | emitAlignedClause (CodeGenFunction &CGF, const OMPExecutableDirective &D)
static void | emitPreCond (CodeGenFunction &CGF, const OMPLoopDirective &S, const Expr *Cond, llvm::BasicBlock *TrueBlock, llvm::BasicBlock *FalseBlock, uint64_t TrueCount)
static void | emitSimdlenSafelenClause (CodeGenFunction &CGF, const OMPExecutableDirective &D, bool IsMonotonic)
static void | emitOMPLoopBodyWithStopPoint (CodeGenFunction &CGF, const OMPLoopDirective &S, CodeGenFunction::JumpDest LoopExit)
static LValue | EmitOMPHelperVar (CodeGenFunction &CGF, const DeclRefExpr *Helper)
| Emit a helper variable and return corresponding lvalue. More...
static void | emitOMPSimdRegion (CodeGenFunction &CGF, const OMPLoopDirective &S, PrePostActionTy &Action)
static void | emitEmptyOrdered (CodeGenFunction &, SourceLocation Loc, const unsigned IVSize, const bool IVSigned)
static std::pair< LValue, LValue > | emitDistributeParallelForInnerBounds (CodeGenFunction &CGF, const OMPExecutableDirective &S)
static std::pair< llvm::Value *, llvm::Value * > | emitDistributeParallelForDispatchBounds (CodeGenFunction &CGF, const OMPExecutableDirective &S, Address LB, Address UB)
| if the 'for' loop has a dispatch schedule (e.g. More...
static void | emitDistributeParallelForDistributeInnerBoundParams (CodeGenFunction &CGF, const OMPExecutableDirective &S, llvm::SmallVectorImpl< llvm::Value *> &CapturedVars)
static void | emitInnerParallelForWhenCombined (CodeGenFunction &CGF, const OMPLoopDirective &S, CodeGenFunction::JumpDest LoopExit)
static std::pair< LValue, LValue > | emitForLoopBounds (CodeGenFunction &CGF, const OMPExecutableDirective &S)
| The following two functions generate expressions for the loop lower and upper bounds in case of static and dynamic (dispatch) schedule of the associated 'for' or 'distribute' loop. More...
static std::pair< llvm::Value *, llvm::Value * > | emitDispatchForLoopBounds (CodeGenFunction &CGF, const OMPExecutableDirective &S, Address LB, Address UB)
| When dealing with dispatch schedules (e.g. More...
static LValue | createSectionLVal (CodeGenFunction &CGF, QualType Ty, const Twine &Name, llvm::Value *Init=nullptr)
static ImplicitParamDecl * | createImplicitFirstprivateForType (ASTContext &C, OMPTaskDataTy &Data, QualType Ty, CapturedDecl *CD, SourceLocation Loc)
static llvm::Function * | emitOutlinedOrderedFunction (CodeGenModule &CGM, const CapturedStmt *S)
static llvm::Value * | convertToScalarValue (CodeGenFunction &CGF, RValue Val, QualType SrcType, QualType DestType, SourceLocation Loc)
static CodeGenFunction::ComplexPairTy | convertToComplexValue (CodeGenFunction &CGF, RValue Val, QualType SrcType, QualType DestType, SourceLocation Loc)
static void | emitSimpleAtomicStore (CodeGenFunction &CGF, bool IsSeqCst, LValue LVal, RValue RVal)
static void | emitOMPAtomicReadExpr (CodeGenFunction &CGF, bool IsSeqCst, const Expr *X, const Expr *V, SourceLocation Loc)
static void | emitOMPAtomicWriteExpr (CodeGenFunction &CGF, bool IsSeqCst, const Expr *X, const Expr *E, SourceLocation Loc)
static std::pair< bool, RValue > | emitOMPAtomicRMW (CodeGenFunction &CGF, LValue X, RValue Update, BinaryOperatorKind BO, llvm::AtomicOrdering AO, bool IsXLHSInRHSPart)
static void | emitOMPAtomicUpdateExpr (CodeGenFunction &CGF, bool IsSeqCst, const Expr *X, const Expr *E, const Expr *UE, bool IsXLHSInRHSPart, SourceLocation Loc)
static RValue | convertToType (CodeGenFunction &CGF, RValue Value, QualType SourceType, QualType ResType, SourceLocation Loc)
static void | emitOMPAtomicCaptureExpr (CodeGenFunction &CGF, bool IsSeqCst, bool IsPostfixUpdate, const Expr *V, const Expr *X, const Expr *E, const Expr *UE, bool IsXLHSInRHSPart, SourceLocation Loc)
static void | emitOMPAtomicExpr (CodeGenFunction &CGF, OpenMPClauseKind Kind, bool IsSeqCst, bool IsPostfixUpdate, const Expr *X, const Expr *V, const Expr *E, const Expr *UE, bool IsXLHSInRHSPart, SourceLocation Loc)
static void | emitTargetRegion (CodeGenFunction &CGF, const OMPTargetDirective &S, PrePostActionTy &Action)
static void | emitCommonOMPTeamsDirective (CodeGenFunction &CGF, const OMPExecutableDirective &S, OpenMPDirectiveKind InnermostKind, const RegionCodeGenTy &CodeGen)
static void | emitTargetTeamsRegion (CodeGenFunction &CGF, PrePostActionTy &Action, const OMPTargetTeamsDirective &S)
static void | emitTargetTeamsDistributeRegion (CodeGenFunction &CGF, PrePostActionTy &Action, const OMPTargetTeamsDistributeDirective &S)
static void | emitTargetTeamsDistributeSimdRegion (CodeGenFunction &CGF, PrePostActionTy &Action, const OMPTargetTeamsDistributeSimdDirective &S)
static void | emitTargetTeamsDistributeParallelForRegion (CodeGenFunction &CGF, const OMPTargetTeamsDistributeParallelForDirective &S, PrePostActionTy &Action)
static void | emitTargetTeamsDistributeParallelForSimdRegion (CodeGenFunction &CGF, const OMPTargetTeamsDistributeParallelForSimdDirective &S, PrePostActionTy &Action)
static void | emitTargetParallelRegion (CodeGenFunction &CGF, const OMPTargetParallelDirective &S, PrePostActionTy &Action)
static void | emitTargetParallelForRegion (CodeGenFunction &CGF, const OMPTargetParallelForDirective &S, PrePostActionTy &Action)
static void | emitTargetParallelForSimdRegion (CodeGenFunction &CGF, const OMPTargetParallelForSimdDirective &S, PrePostActionTy &Action)
static void | mapParam (CodeGenFunction &CGF, const DeclRefExpr *Helper, const ImplicitParamDecl *PVD, CodeGenFunction::OMPPrivateScope &Privates)
| Emit a helper variable and return corresponding lvalue. More...

## Function Documentation

## ◆ castValueFromUintptr()

static Address castValueFromUintptr | ( | CodeGenFunction & | CGF,
|  | SourceLocation | Loc,
|  | QualType | DstType,
|  | StringRef | Name,
|  | LValue | AddrLV,
|  | bool | isReferenceType = `false`
| ) |  |
| static

Definition at line 299 of file CGStmtOpenMP.cpp.

Referenced by emitOutlinedFunctionPrologue().

## ◆ convertToComplexValue()

static CodeGenFunction::ComplexPairTy convertToComplexValue | ( | CodeGenFunction & | CGF,
|  | RValue | Val,
|  | QualType | SrcType,
|  | QualType | DestType,
|  | SourceLocation | Loc
| ) |  |
| static

Definition at line 3556 of file CGStmtOpenMP.cpp.

References clang::Type::castAs(), clang::CodeGen::CodeGenFunction::EmitScalarConversion(), clang::CodeGen::RValue::getComplexVal(), clang::CodeGen::CodeGenFunction::getEvaluationKind(), clang::CodeGen::RValue::getScalarVal(), clang::CodeGen::RValue::isComplex(), clang::CodeGen::RValue::isScalar(), and clang::CodeGen::TEK_Complex.

Referenced by convertToType(), and clang::CodeGen::CodeGenFunction::emitOMPSimpleStore().

## ◆ convertToScalarValue()

static llvm::Value* convertToScalarValue | ( | CodeGenFunction & | CGF,
|  | RValue | Val,
|  | QualType | SrcType,
|  | QualType | DestType,
|  | SourceLocation | Loc
| ) |  |
| static

Definition at line 3543 of file CGStmtOpenMP.cpp.

References clang::CodeGen::CodeGenFunction::EmitComplexToScalarConversion(), clang::CodeGen::CodeGenFunction::EmitScalarConversion(), clang::CodeGen::RValue::getComplexVal(), clang::CodeGen::RValue::getScalarVal(), clang::CodeGen::CodeGenFunction::hasScalarEvaluationKind(), clang::CodeGen::RValue::isAggregate(), and clang::CodeGen::RValue::isScalar().

Referenced by convertToType(), and clang::CodeGen::CodeGenFunction::emitOMPSimpleStore().

## ◆ convertToType()

static RValue convertToType | ( | CodeGenFunction & | CGF,
|  | RValue | Value,
|  | QualType | SourceType,
|  | QualType | ResType,
|  | SourceLocation | Loc
| ) |  |
| static

Definition at line 3806 of file CGStmtOpenMP.cpp.

References convertToComplexValue(), convertToScalarValue(), clang::CodeGen::RValue::get(), clang::CodeGen::RValue::getComplex(), clang::CodeGen::CodeGenFunction::getEvaluationKind(), clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, and clang::CodeGen::TEK_Scalar.

Referenced by emitOMPAtomicCaptureExpr().

## ◆ createImplicitFirstprivateForType()

static ImplicitParamDecl* createImplicitFirstprivateForType | ( | ASTContext & | C,
|  | OMPTaskDataTy & | Data,
|  | QualType | Ty,
|  | CapturedDecl * | CD,
|  | SourceLocation | Loc
| ) |  |
| static

Definition at line 3039 of file CGStmtOpenMP.cpp.

References clang::VarDecl::CInit, clang::DeclRefExpr::Create(), clang::ImplicitParamDecl::Create(), clang::ImplicitCastExpr::Create(), clang::CodeGen::OMPTaskDataTy::FirstprivateCopies, clang::CodeGen::OMPTaskDataTy::FirstprivateInits, clang::CodeGen::OMPTaskDataTy::FirstprivateVars, clang::ASTContext::getBaseElementType(), clang::ImplicitParamDecl::Other, clang::VK_LValue, and clang::VK_RValue.

Referenced by clang::CodeGen::CodeGenFunction::EmitOMPTargetTaskBasedDirective().

## ◆ createSectionLVal()

static LValue createSectionLVal | ( | CodeGenFunction & | CGF,
|  | QualType | Ty,
|  | const Twine & | Name,
|  | llvm::Value * | Init = `nullptr`
| ) |  |
| static

Definition at line 2507 of file CGStmtOpenMP.cpp.

## ◆ emitAlignedClause()

static void emitAlignedClause | ( | CodeGenFunction & | CGF,
|  | const OMPExecutableDirective & | D
| ) |  |
| static

Definition at line 1448 of file CGStmtOpenMP.cpp.

References clang::CodeGen::CodeGenFunction::EmitAlignmentAssumption(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::OMPExecutableDirective::getClausesOfKind(), clang::CodeGen::CodeGenFunction::getContext(), clang::ASTContext::getOpenMPDefaultSimdAlign(), clang::CharUnits::getQuantity(), clang::CodeGen::CodeGenFunction::HaveInsertPoint(), and clang::ASTContext::toCharUnitsFromBits().

Referenced by clang::CodeGen::CodeGenFunction::EmitOMPDistributeLoop(), emitOMPSimdRegion(), and clang::CodeGen::CodeGenFunction::EmitOMPWorksharingLoop().

## ◆ emitCommonOMPParallelDirective()

static void emitCommonOMPParallelDirective | ( | CodeGenFunction & | CGF,
|  | const OMPExecutableDirective & | S,
|  | OpenMPDirectiveKind | InnermostKind,
|  | const RegionCodeGenTy & | CodeGen,
|  | const CodeGenBoundParametersTy & | CodeGenBoundParameters
| ) |  |
| static

Definition at line 1225 of file CGStmtOpenMP.cpp.

References clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedVars(), clang::OMPExecutableDirective::getBeginLoc(), clang::CapturedStmt::getCapturedDecl(), clang::OMPExecutableDirective::getCapturedStmt(), clang::OMPExecutableDirective::getClausesOfKind(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::OMPExecutableDirective::getSingleClause(), clang::OMPD_unknown, and clang::CapturedDecl::param_begin().

## ◆ emitCommonOMPTargetDirective()

static void emitCommonOMPTargetDirective | ( | CodeGenFunction & | CGF,
|  | const OMPExecutableDirective & | S,
|  | const RegionCodeGenTy & | CodeGen
| ) |  |
| static

Definition at line 4013 of file CGStmtOpenMP.cpp.

References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::ConstantFoldsToSimpleInteger(), clang::Ctor_Complete, clang::CodeGen::CodeGenFunction::CurFuncDecl, clang::Dtor_Complete, clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::CodeGenFunction::EmitStmt(), clang::CapturedStmt::getCapturedStmt(), clang::OMPExecutableDirective::getClausesOfKind(), clang::OMPExecutableDirective::getDirectiveKind(), clang::OMPExecutableDirective::getInnermostCapturedStmt(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::CodeGen::CodeGenModule::getMangledName(), clang::OMPLoopDirective::getNumIterations(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::OMPExecutableDirective::getSingleClause(), clang::CodeGen::CodeGenTypeCache::Int64Ty, clang::isOpenMPTargetExecutionDirective(), clang::OMPD_unknown, and clang::LangOptions::OMPTargetTriples.

## ◆ emitCommonOMPTeamsDirective()

static void emitCommonOMPTeamsDirective | ( | CodeGenFunction & | CGF,
|  | const OMPExecutableDirective & | S,
|  | OpenMPDirectiveKind | InnermostKind,
|  | const RegionCodeGenTy & | CodeGen
| ) |  |
| static

Definition at line 4122 of file CGStmtOpenMP.cpp.

References clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedVars(), clang::OMPExecutableDirective::getBeginLoc(), clang::CapturedStmt::getCapturedDecl(), clang::OMPExecutableDirective::getCapturedStmt(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::OMPExecutableDirective::getSingleClause(), and clang::CapturedDecl::param_begin().

## ◆ emitDispatchForLoopBounds()

static std::pair<llvm::Value *, llvm::Value *> emitDispatchForLoopBounds | ( | CodeGenFunction & | CGF,
|  | const OMPExecutableDirective & | S,
|  | Address | LB,
|  | Address | UB
| ) |  |
| static

When dealing with dispatch schedules (e.g.

dynamic, guided) we do not consider the lower and upper bound expressions generated by the worksharing loop support, but we use 0 and the iteration space size as constants

Definition at line 2459 of file CGStmtOpenMP.cpp.

## ◆ emitDistributeParallelForDispatchBounds()

static std::pair<llvm::Value *, llvm::Value *> emitDistributeParallelForDispatchBounds | ( | CodeGenFunction & | CGF,
|  | const OMPExecutableDirective & | S,
|  | Address | LB,
|  | Address | UB
| ) |  |
| static

if the 'for' loop has a dispatch schedule (e.g.

dynamic, guided) then we need to use the LB and UB expressions generated by the worksharing code generation support, whereas in non combined situations we would just emit 0 and the LastIteration expression This function is necessary due to the difference of the LB and UB types for the RT emission routines for 'for_static_init' and 'for_dispatch_init'

Definition at line 2093 of file CGStmtOpenMP.cpp.

## ◆ emitDistributeParallelForDistributeInnerBoundParams()

static void emitDistributeParallelForDistributeInnerBoundParams | ( | CodeGenFunction & | CGF,
|  | const OMPExecutableDirective & | S,
|  | llvm::SmallVectorImpl< llvm::Value *> & | CapturedVars
| ) |  |
| static

Definition at line 2110 of file CGStmtOpenMP.cpp.

## ◆ emitDistributeParallelForInnerBounds()

static std::pair<LValue, LValue> emitDistributeParallelForInnerBounds | ( | CodeGenFunction & | CGF,
|  | const OMPExecutableDirective & | S
| ) |  |
| static

Definition at line 2050 of file CGStmtOpenMP.cpp.

## ◆ emitEmptyBoundParameters()

static void emitEmptyBoundParameters | ( | CodeGenFunction & | ,
|  | const OMPExecutableDirective & | ,
|  | llvm::SmallVectorImpl< llvm::Value *> & |
| ) |  |
| static

Definition at line 1267 of file CGStmtOpenMP.cpp.

## ◆ emitEmptyOrdered()

static void emitEmptyOrdered | ( | CodeGenFunction & | ,
|  | SourceLocation | Loc,
|  | const unsigned | IVSize,
|  | const bool | IVSigned
| ) |  |
| static

Definition at line 1986 of file CGStmtOpenMP.cpp.

References clang::OMPExecutableDirective::getBeginLoc(), clang::OMPLoopDirective::getCombinedCond(), clang::OMPLoopDirective::getCombinedEnsureUpperBound(), clang::OMPLoopDirective::getCombinedInit(), clang::OMPLoopDirective::getCombinedNextLowerBound(), clang::OMPLoopDirective::getCombinedNextUpperBound(), clang::OMPLoopDirective::getCond(), clang::OMPExecutableDirective::getDirectiveKind(), clang::OMPLoopDirective::getDistInc(), clang::OMPLoopDirective::getEnsureUpperBound(), clang::OMPLoopDirective::getInc(), clang::OMPLoopDirective::getInit(), clang::OMPLoopDirective::getIterationVariable(), clang::OMPLoopDirective::getNextLowerBound(), clang::OMPLoopDirective::getNextUpperBound(), clang::Expr::getType(), clang::Type::hasSignedIntegerRepresentation(), and clang::isOpenMPLoopBoundSharingDirective().

## ◆ emitForLoopBounds()

static std::pair<LValue, LValue> emitForLoopBounds | ( | CodeGenFunction & | CGF,
|  | const OMPExecutableDirective & | S
| ) |  |
| static

The following two functions generate expressions for the loop lower and upper bounds in case of static and dynamic (dispatch) schedule of the associated 'for' or 'distribute' loop.

Definition at line 2445 of file CGStmtOpenMP.cpp.

## ◆ emitInnerParallelForWhenCombined()

static void emitInnerParallelForWhenCombined | ( | CodeGenFunction & | CGF,
|  | const OMPLoopDirective & | S,
|  | CodeGenFunction::JumpDest | LoopExit
| ) |  |
| static

Definition at line 2128 of file CGStmtOpenMP.cpp.

## ◆ emitOMPAtomicCaptureExpr()

static void emitOMPAtomicCaptureExpr | ( | CodeGenFunction & | CGF,
|  | bool | IsSeqCst,
|  | bool | IsPostfixUpdate,
|  | const Expr * | V,
|  | const Expr * | X,
|  | const Expr * | E,
|  | const Expr * | UE,
|  | bool | IsXLHSInRHSPart,
|  | SourceLocation | Loc
| ) |  |
| static

Definition at line 3823 of file CGStmtOpenMP.cpp.

References clang::CodeGen::CodeGenFunction::CGM, convertToType(), clang::CodeGen::CodeGenFunction::EmitAnyExpr(), clang::CodeGen::CodeGenFunction::EmitLValue(), clang::CodeGen::CodeGenFunction::EmitOMPAtomicSimpleUpdateExpr(), clang::CodeGen::CodeGenFunction::emitOMPSimpleStore(), clang::QualType::getNonReferenceType(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::Expr::getType(), clang::Expr::IgnoreImpCasts(), clang::Expr::isLValue(), and clang::None.

Referenced by emitOMPAtomicExpr().

## ◆ emitOMPAtomicExpr()

static void emitOMPAtomicExpr | ( | CodeGenFunction & | CGF,
|  | OpenMPClauseKind | Kind,
|  | bool | IsSeqCst,
|  | bool | IsPostfixUpdate,
|  | const Expr * | X,
|  | const Expr * | V,
|  | const Expr * | E,
|  | const Expr * | UE,
|  | bool | IsXLHSInRHSPart,
|  | SourceLocation | Loc
| ) |  |
| static

Definition at line 3905 of file CGStmtOpenMP.cpp.

References emitOMPAtomicCaptureExpr(), emitOMPAtomicReadExpr(), emitOMPAtomicUpdateExpr(), emitOMPAtomicWriteExpr(), clang::OMPC_threadprivate, clang::OMPC_uniform, and clang::OMPC_unknown.

## ◆ emitOMPAtomicReadExpr()

static void emitOMPAtomicReadExpr | ( | CodeGenFunction & | CGF,
|  | bool | IsSeqCst,
|  | const Expr * | X,
|  | const Expr * | V,
|  | SourceLocation | Loc
| ) |  |
| static

Definition at line 3612 of file CGStmtOpenMP.cpp.

References clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::EmitAtomicLoad(), clang::CodeGen::CodeGenFunction::EmitLoadOfLValue(), clang::CodeGen::CodeGenFunction::EmitLValue(), clang::CodeGen::CodeGenFunction::emitOMPSimpleStore(), clang::QualType::getNonReferenceType(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::Expr::getType(), clang::Expr::isLValue(), and clang::None.

Referenced by emitOMPAtomicExpr().

## ◆ emitOMPAtomicRMW()

static std::pair<bool, RValue> emitOMPAtomicRMW | ( | CodeGenFunction & | CGF,
|  | LValue | X,
|  | RValue | Update,
|  | BinaryOperatorKind | BO,
|  | llvm::AtomicOrdering | AO,
|  | bool | IsXLHSInRHSPart
| ) |  |
| static

Definition at line 3650 of file CGStmtOpenMP.cpp.

Referenced by clang::CodeGen::CodeGenFunction::EmitOMPAtomicSimpleUpdateExpr().

## ◆ emitOMPAtomicUpdateExpr()

static void emitOMPAtomicUpdateExpr | ( | CodeGenFunction & | CGF,
|  | bool | IsSeqCst,
|  | const Expr * | X,
|  | const Expr * | E,
|  | const Expr * | UE,
|  | bool | IsXLHSInRHSPart,
|  | SourceLocation | Loc
| ) |  |
| static

Definition at line 3768 of file CGStmtOpenMP.cpp.

References clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::EmitAnyExpr(), clang::CodeGen::CodeGenFunction::EmitLValue(), clang::CodeGen::CodeGenFunction::EmitOMPAtomicSimpleUpdateExpr(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::Expr::IgnoreImpCasts(), clang::Expr::isLValue(), and clang::None.

Referenced by emitOMPAtomicExpr().

## ◆ emitOMPAtomicWriteExpr()

static void emitOMPAtomicWriteExpr | ( | CodeGenFunction & | CGF,
|  | bool | IsSeqCst,
|  | const Expr * | X,
|  | const Expr * | E,
|  | SourceLocation | Loc
| ) |  |
| static

Definition at line 3636 of file CGStmtOpenMP.cpp.

References clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::EmitAnyExpr(), clang::CodeGen::CodeGenFunction::EmitLValue(), emitSimpleAtomicStore(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::Expr::isLValue(), and clang::None.

Referenced by emitOMPAtomicExpr().

## ◆ EmitOMPHelperVar()

static LValue EmitOMPHelperVar | ( | CodeGenFunction & | CGF,
|  | const DeclRefExpr * | Helper
| ) |  |
| static

Emit a helper variable and return corresponding lvalue.

Definition at line 1672 of file CGStmtOpenMP.cpp.

References clang::CodeGen::CodeGenFunction::EmitLValue(), clang::CodeGen::CodeGenFunction::EmitVarDecl(), and clang::DeclRefExpr::getDecl().

Referenced by clang::CodeGen::CodeGenFunction::EmitOMPDistributeLoop(), emitOMPSimdRegion(), and clang::CodeGen::CodeGenFunction::EmitOMPWorksharingLoop().

## ◆ emitOMPLoopBodyWithStopPoint()

static void emitOMPLoopBodyWithStopPoint | ( | CodeGenFunction & | CGF,
|  | const OMPLoopDirective & | S,
|  | CodeGenFunction::JumpDest | LoopExit
| ) |  |
| static

Definition at line 1664 of file CGStmtOpenMP.cpp.

References clang::CodeGen::CodeGenFunction::EmitOMPLoopBody(), and clang::CodeGen::CodeGenFunction::EmitStopPoint().

## ◆ emitOMPSimdRegion()

static void emitOMPSimdRegion | ( | CodeGenFunction & | CGF,
|  | const OMPLoopDirective & | S,
|  | PrePostActionTy & | Action
| ) |  |
| static

Definition at line 1679 of file CGStmtOpenMP.cpp.

References clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::ConstantFoldsToSimpleInteger(), clang::CodeGen::CodeGenFunction::createBasicBlock(), emitAlignedClause(), clang::CodeGen::CodeGenFunction::EmitBlock(), clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(), EmitOMPHelperVar(), clang::CodeGen::CodeGenFunction::EmitOMPInnerLoop(), clang::CodeGen::CodeGenFunction::EmitOMPLastprivateClauseInit(), clang::CodeGen::CodeGenFunction::EmitOMPLinearClause(), clang::CodeGen::CodeGenFunction::EmitOMPLinearClauseInit(), clang::CodeGen::CodeGenFunction::EmitOMPPrivateClause(), clang::CodeGen::CodeGenFunction::EmitOMPPrivateLoopCounters(), clang::CodeGen::CodeGenFunction::EmitOMPReductionClauseInit(), clang::CodeGen::CodeGenFunction::EmitOMPSimdInit(), emitPreCond(), clang::CodeGen::CodeGenFunction::EmitVarDecl(), clang::CodeGen::PrePostActionTy::Enter(), clang::OMPLoopDirective::getCalcLastIteration(), clang::OMPLoopDirective::getCond(), clang::OMPExecutableDirective::getDirectiveKind(), clang::OMPLoopDirective::getInc(), clang::OMPLoopDirective::getInit(), clang::OMPLoopDirective::getIterationVariable(), clang::OMPLoopDirective::getLastIteration(), clang::OMPLoopDirective::getLowerBoundVariable(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::OMPLoopDirective::getPreCond(), clang::CodeGen::CodeGenFunction::getProfileCount(), clang::OMPLoopDirective::getUpperBoundVariable(), clang::CodeGen::CodeGenFunction::incrementProfileCounter(), clang::isOpenMPDistributeDirective(), clang::isOpenMPSimdDirective(), clang::isOpenMPTargetExecutionDirective(), clang::isOpenMPTaskLoopDirective(), clang::isOpenMPWorksharingDirective(), clang::CodeGen::CodeGenFunction::OMPPrivateScope::Privatize(), and clang::CodeGen::CodeGenFunction::RunCleanupsScope::requiresCleanups().

Referenced by clang::CodeGen::CodeGenFunction::EmitSimpleOMPExecutableDirective().

## ◆ emitOutlinedFunctionPrologue()

static llvm::Function* emitOutlinedFunctionPrologue | ( | CodeGenFunction & | CGF,
|  | FunctionArgList & | Args,
|  | llvm::MapVector< const Decl *, std::pair< const VarDecl *, Address >> & | LocalAddrs,
|  | llvm::DenseMap< const Decl *, std::pair< const Expr *, llvm::Value *>> & | VLASizes,
|  | llvm::Value *& | CXXThisValue,
|  | const FunctionOptions & | FO
| ) |  |
| static

Definition at line 363 of file CGStmtOpenMP.cpp.

References clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), clang::Type::castAs(), castValueFromUintptr(), clang::CodeGen::CodeGenFunction::CGM, clang::ImplicitParamDecl::Create(), clang::ParmVarDecl::Create(), clang::FunctionDecl::Create(), clang::Create(), clang::CodeGen::CodeGenFunction::CreateMemTemp(), clang::CodeGen::Decl, clang::CodeGen::CodeGenFunction::EmitLoadOfPointer(), clang::CodeGen::CodeGenFunction::EmitLoadOfReference(), clang::CodeGen::CodeGenFunction::EmitLoadOfScalar(), clang::CodeGen::CodeGenFunction::EmitStoreOfScalar(), clang::RecordDecl::fields(), clang::IdentifierTable::get(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::CodeGenFunction::GetAddrOfLocalVar(), clang::DeclaratorDecl::getBeginLoc(), clang::Stmt::getBeginLoc(), clang::CapturedDecl::getBody(), getCanonicalParamType(), clang::CodeGen::CodeGenModule::getContext(), clang::CapturedDecl::getContextParamPosition(), clang::ASTContext::getDeclAlign(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::ASTContext::getFunctionType(), clang::NamedDecl::getIdentifier(), clang::Decl::getLocation(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::CodeGen::Address::getPointer(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), clang::VariableArrayType::getSizeExpr(), clang::ASTContext::getTranslationUnitDecl(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::CodeGen::Address::getType(), clang::CodeGen::LValue::getType(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::ASTContext::getUIntPtrType(), clang::Decl::hasBody(), clang::ASTContext::Idents, clang::InternalLinkage, clang::CodeGen::Address::invalid(), clang::Type::isAnyPointerType(), clang::Type::isLValueReferenceType(), clang::CapturedDecl::isNothrow(), clang::Type::isPointerType(), clang::Type::isReferenceType(), clang::Type::isVariablyModifiedType(), clang::CodeGen::CodeGenFunction::MakeAddrLValue(), clang::None, clang::ImplicitParamDecl::Other, clang::CapturedDecl::param_begin(), clang::CapturedDecl::param_end(), clang::SC_None, clang::SC_Static, clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), clang::CodeGen::CodeGenFunction::StartFunction(), and clang::ASTContext::VoidTy.

Referenced by clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedStmtFunction().

## ◆ emitOutlinedOrderedFunction()

static llvm::Function* emitOutlinedOrderedFunction | ( | CodeGenModule & | CGM,
|  | const CapturedStmt * | S
| ) |  |
| static

Definition at line 3506 of file CGStmtOpenMP.cpp.

References clang::CodeGen::CodeGenFunction::CapturedStmtInfo, and clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedStmtFunction().

## ◆ emitPostUpdateForReductionClause()

static void emitPostUpdateForReductionClause | ( | CodeGenFunction & | CGF,
|  | const OMPExecutableDirective & | D,
|  | const llvm::function_ref< llvm::Value *(CodeGenFunction &)> | CondGen
| ) |  |
| static

Definition at line 1190 of file CGStmtOpenMP.cpp.

References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::createBasicBlock(), clang::CodeGen::CodeGenFunction::EmitBlock(), clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(), clang::OMPExecutableDirective::getClausesOfKind(), and clang::CodeGen::CodeGenFunction::HaveInsertPoint().

## ◆ emitPreCond()

static void emitPreCond | ( | CodeGenFunction & | CGF,
|  | const OMPLoopDirective & | S,
|  | const Expr * | Cond,
|  | llvm::BasicBlock * | TrueBlock,
|  | llvm::BasicBlock * | FalseBlock,
|  | uint64_t | TrueCount
| ) |  |
| static

Definition at line 1531 of file CGStmtOpenMP.cpp.

References clang::CodeGen::CodeGenFunction::EmitBranchOnBoolExpr(), clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(), clang::CodeGen::CodeGenFunction::EmitOMPPrivateLoopCounters(), clang::CodeGen::CodeGenFunction::HaveInsertPoint(), clang::OMPLoopDirective::inits(), and clang::CodeGen::CodeGenFunction::OMPPrivateScope::Privatize().

Referenced by clang::CodeGen::CodeGenFunction::EmitOMPDistributeLoop(), emitOMPSimdRegion(), and clang::CodeGen::CodeGenFunction::EmitOMPWorksharingLoop().

## ◆ emitSimdlenSafelenClause()

static void emitSimdlenSafelenClause | ( | CodeGenFunction & | CGF,
|  | const OMPExecutableDirective & | D,
|  | bool | IsMonotonic
| ) |  |
| static

Definition at line 1584 of file CGStmtOpenMP.cpp.

References clang::CodeGen::CodeGenFunction::EmitAnyExpr(), clang::CodeGen::RValue::getScalarVal(), clang::OMPExecutableDirective::getSingleClause(), clang::CodeGen::CodeGenFunction::HaveInsertPoint(), clang::CodeGen::AggValueSlot::ignored(), clang::CodeGen::CodeGenFunction::LoopStack, clang::CodeGen::LoopInfoStack::setParallel(), and clang::CodeGen::LoopInfoStack::setVectorizeWidth().

Referenced by clang::CodeGen::CodeGenFunction::EmitOMPSimdInit().

## ◆ emitSimpleAtomicStore()

static void emitSimpleAtomicStore | ( | CodeGenFunction & | CGF,
|  | bool | IsSeqCst,
|  | LValue | LVal,
|  | RValue | RVal
| ) |  |
| static

Definition at line 3582 of file CGStmtOpenMP.cpp.

References clang::CodeGen::CodeGenFunction::EmitAtomicStore(), clang::CodeGen::CodeGenFunction::EmitStoreThroughGlobalRegLValue(), clang::CodeGen::LValue::isGlobalReg(), and clang::CodeGen::LValue::isVolatile().

Referenced by emitOMPAtomicWriteExpr().

## ◆ emitTargetParallelForRegion()

static void emitTargetParallelForRegion | ( | CodeGenFunction & | CGF,
|  | const OMPTargetParallelForDirective & | S,
|  | PrePostActionTy & | Action
| ) |  |
| static

Definition at line 4771 of file CGStmtOpenMP.cpp.

References clang::CodeGen::PrePostActionTy::Enter().

## ◆ emitTargetParallelForSimdRegion()

static void emitTargetParallelForSimdRegion | ( | CodeGenFunction & | CGF,
|  | const OMPTargetParallelForSimdDirective & | S,
|  | PrePostActionTy & | Action
| ) |  |
| static

Definition at line 4812 of file CGStmtOpenMP.cpp.

References clang::CodeGen::PrePostActionTy::Enter().

## ◆ emitTargetParallelRegion()

static void emitTargetParallelRegion | ( | CodeGenFunction & | CGF,
|  | const OMPTargetParallelDirective & | S,
|  | PrePostActionTy & | Action
| ) |  |
| static

Definition at line 4724 of file CGStmtOpenMP.cpp.

References clang::CodeGen::PrePostActionTy::Enter(), and clang::OMPExecutableDirective::getCapturedStmt().

## ◆ emitTargetRegion()

static void emitTargetRegion | ( | CodeGenFunction & | CGF,
|  | const OMPTargetDirective & | S,
|  | PrePostActionTy & | Action
| ) |  |
| static

Definition at line 4088 of file CGStmtOpenMP.cpp.

References clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::EmitOMPFirstprivateClause(), clang::CodeGen::CodeGenFunction::EmitOMPPrivateClause(), clang::CodeGen::CodeGenFunction::EmitStmt(), clang::CodeGen::PrePostActionTy::Enter(), clang::OMPExecutableDirective::getCapturedStmt(), clang::CapturedStmt::getCapturedStmt(), clang::OMPExecutableDirective::getDirectiveKind(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::isOpenMPTargetExecutionDirective(), and clang::CodeGen::CodeGenFunction::OMPPrivateScope::Privatize().

## ◆ emitTargetTeamsDistributeParallelForRegion()

static void emitTargetTeamsDistributeParallelForRegion | ( | CodeGenFunction & | CGF,
|  | const OMPTargetTeamsDistributeParallelForDirective & | S,
|  | PrePostActionTy & | Action
| ) |  |
| static

Definition at line 4392 of file CGStmtOpenMP.cpp.

References clang::CodeGen::PrePostActionTy::Enter().

## ◆ emitTargetTeamsDistributeParallelForSimdRegion()

static void emitTargetTeamsDistributeParallelForSimdRegion | ( | CodeGenFunction & | CGF,
|  | const OMPTargetTeamsDistributeParallelForSimdDirective & | S,
|  | PrePostActionTy & | Action
| ) |  |
| static

Definition at line 4443 of file CGStmtOpenMP.cpp.

References clang::CodeGen::PrePostActionTy::Enter().

## ◆ emitTargetTeamsDistributeRegion()

static void emitTargetTeamsDistributeRegion | ( | CodeGenFunction & | CGF,
|  | PrePostActionTy & | Action,
|  | const OMPTargetTeamsDistributeDirective & | S
| ) |  |
| static

Definition at line 4210 of file CGStmtOpenMP.cpp.

References clang::CodeGen::PrePostActionTy::Enter().

## ◆ emitTargetTeamsDistributeSimdRegion()

static void emitTargetTeamsDistributeSimdRegion | ( | CodeGenFunction & | CGF,
|  | PrePostActionTy & | Action,
|  | const OMPTargetTeamsDistributeSimdDirective & | S
| ) |  |
| static

Definition at line 4255 of file CGStmtOpenMP.cpp.

References clang::CodeGen::PrePostActionTy::Enter().

## ◆ emitTargetTeamsRegion()

static void emitTargetTeamsRegion | ( | CodeGenFunction & | CGF,
|  | PrePostActionTy & | Action,
|  | const OMPTargetTeamsDirective & | S
| ) |  |
| static

Definition at line 4165 of file CGStmtOpenMP.cpp.

References clang::CodeGen::PrePostActionTy::Enter(), and clang::OMPExecutableDirective::getCapturedStmt().

## ◆ getCanonicalParamType()

static QualType getCanonicalParamType | ( | ASTContext & | C,
|  | QualType | T
| ) |  |
| static

Definition at line 325 of file CGStmtOpenMP.cpp.

References clang::Type::getAsArrayTypeUnsafe(), clang::ASTContext::getCanonicalParamType(), clang::ASTContext::getCanonicalType(), clang::ASTContext::getLValueReferenceType(), clang::QualType::getNonReferenceType(), clang::Type::getPointeeType(), clang::ASTContext::getPointerType(), clang::Type::isLValueReferenceType(), and clang::Type::isPointerType().

Referenced by emitOutlinedFunctionPrologue(), and clang::ASTContext::getCanonicalType().

## ◆ mapParam()

static void mapParam | ( | CodeGenFunction & | CGF,
|  | const DeclRefExpr * | Helper,
|  | const ImplicitParamDecl * | PVD,
|  | CodeGenFunction::OMPPrivateScope & | Privates
| ) |  |
| static

Emit a helper variable and return corresponding lvalue.

Definition at line 4851 of file CGStmtOpenMP.cpp.

References clang::CodeGen::CodeGenFunction::OMPPrivateScope::addPrivate(), clang::CodeGen::CodeGenFunction::GetAddrOfLocalVar(), and clang::DeclRefExpr::getDecl().