|
clang
5.0.0
|
#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"Go to the source code of this file.
|
static |
Definition at line 206 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::CreateMemTemp(), clang::CodeGen::CodeGenFunction::EmitScalarConversion(), clang::CodeGen::CodeGenFunction::EmitStoreThroughLValue(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::CodeGenFunction::getContext(), clang::ASTContext::getLValueReferenceType(), clang::CodeGen::Address::getPointer(), clang::ASTContext::getPointerType(), clang::ASTContext::getUIntPtrType(), clang::CodeGen::CodeGenFunction::MakeAddrLValue(), and clang::CodeGen::CodeGenFunction::MakeNaturalAlignAddrLValue().
Referenced by emitOutlinedFunctionPrologue().
|
static |
Definition at line 3098 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().
|
static |
Definition at line 3084 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().
|
static |
Definition at line 3344 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().
|
static |
Definition at line 2351 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::CreateMemTemp(), clang::CodeGen::CodeGenFunction::EmitStoreThroughLValue(), and clang::CodeGen::CodeGenFunction::MakeAddrLValue().
|
static |
Definition at line 1283 of file CGStmtOpenMP.cpp.
References E, 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::EmitOMPSimdDirective(), and clang::CodeGen::CodeGenFunction::EmitOMPWorksharingLoop().
|
static |
Definition at line 1071 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedVars(), clang::CapturedStmt::getCapturedDecl(), clang::OMPExecutableDirective::getCapturedStmt(), clang::OMPExecutableDirective::getClausesOfKind(), clang::OMPExecutableDirective::getLocStart(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::OMPExecutableDirective::getSingleClause(), clang::OMPD_unknown, and clang::CapturedDecl::param_begin().
Referenced by emitInnerParallelForWhenCombined(), clang::CodeGen::CodeGenFunction::EmitOMPParallelDirective(), clang::CodeGen::CodeGenFunction::EmitOMPParallelForDirective(), clang::CodeGen::CodeGenFunction::EmitOMPParallelForSimdDirective(), clang::CodeGen::CodeGenFunction::EmitOMPParallelSectionsDirective(), and emitTargetParallelRegion().
|
static |
Definition at line 3547 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::ConstantFoldsToSimpleInteger(), clang::Ctor_Complete, clang::CodeGen::CodeGenFunction::CurFuncDecl, clang::Dtor_Complete, clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedVars(), clang::OMPExecutableDirective::getAssociatedStmt(), clang::OMPExecutableDirective::getClausesOfKind(), clang::OMPExecutableDirective::getDirectiveKind(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::CodeGen::CodeGenModule::getMangledName(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::OMPExecutableDirective::getSingleClause(), clang::isOpenMPTargetExecutionDirective(), clang::OMPD_unknown, and clang::LangOptions::OMPTargetTriples.
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPTargetDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTargetParallelDirective(), and clang::CodeGen::CodeGenFunction::EmitOMPTargetTeamsDirective().
|
static |
Definition at line 3639 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedVars(), clang::CapturedStmt::getCapturedDecl(), clang::OMPExecutableDirective::getCapturedStmt(), clang::OMPExecutableDirective::getLocStart(), OMPNumTeamsClause::getNumTeams(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::OMPExecutableDirective::getSingleClause(), and clang::CapturedDecl::param_begin().
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPTeamsDirective(), and emitTargetTeamsRegion().
|
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 2301 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::CodeGenFunction::getContext(), clang::OMPLoopDirective::getIterationVariable(), clang::OMPLoopDirective::getLastIteration(), clang::ASTContext::getTypeSize(), and S.
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPForDirective(), clang::CodeGen::CodeGenFunction::EmitOMPForSimdDirective(), clang::CodeGen::CodeGenFunction::EmitOMPParallelForDirective(), and clang::CodeGen::CodeGenFunction::EmitOMPParallelForSimdDirective().
|
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 1889 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::EmitLoadOfScalar(), clang::OMPLoopDirective::getIterationVariable(), and S.
Referenced by emitInnerParallelForWhenCombined().
|
static |
Definition at line 1906 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CodeGenFunction::EmitLValue(), clang::CodeGen::LValue::getAddress(), S, and clang::CodeGen::CodeGenTypeCache::SizeTy.
Referenced by emitInnerParallelForWhenCombined().
|
static |
Definition at line 1850 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::EmitLoadOfScalar(), clang::CodeGen::CodeGenFunction::EmitLValue(), EmitOMPHelperVar(), clang::CodeGen::CodeGenFunction::EmitScalarConversion(), clang::CodeGen::CodeGenFunction::EmitStoreOfScalar(), clang::OMPLoopDirective::getIterationVariable(), clang::OMPLoopDirective::getLowerBoundVariable(), clang::OMPLoopDirective::getPrevLowerBoundVariable(), clang::OMPLoopDirective::getPrevUpperBoundVariable(), clang::Expr::getType(), clang::OMPLoopDirective::getUpperBoundVariable(), and S.
Referenced by emitInnerParallelForWhenCombined().
|
static |
Definition at line 1111 of file CGStmtOpenMP.cpp.
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPParallelDirective(), clang::CodeGen::CodeGenFunction::EmitOMPParallelForDirective(), clang::CodeGen::CodeGenFunction::EmitOMPParallelForSimdDirective(), clang::CodeGen::CodeGenFunction::EmitOMPParallelSectionsDirective(), and emitTargetParallelRegion().
|
static |
Definition at line 1778 of file CGStmtOpenMP.cpp.
|
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 2287 of file CGStmtOpenMP.cpp.
References EmitOMPHelperVar(), clang::OMPLoopDirective::getLowerBoundVariable(), clang::OMPLoopDirective::getUpperBoundVariable(), and S.
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPForDirective(), clang::CodeGen::CodeGenFunction::EmitOMPForSimdDirective(), clang::CodeGen::CodeGenFunction::EmitOMPParallelForDirective(), and clang::CodeGen::CodeGenFunction::EmitOMPParallelForSimdDirective().
|
static |
Definition at line 1924 of file CGStmtOpenMP.cpp.
References emitCommonOMPParallelDirective(), emitDistributeParallelForDispatchBounds(), emitDistributeParallelForDistributeInnerBoundParams(), emitDistributeParallelForInnerBounds(), clang::CodeGen::CodeGenFunction::EmitOMPWorksharingLoop(), clang::OMPLoopDirective::getPrevEnsureUpperBound(), and S.
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPDistributeParallelForDirective().
|
static |
Definition at line 3361 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().
|
static |
Definition at line 3442 of file CGStmtOpenMP.cpp.
References EmitOMPAtomicCaptureExpr(), EmitOMPAtomicReadExpr(), EmitOMPAtomicUpdateExpr(), EmitOMPAtomicWriteExpr(), clang::OMPC_threadprivate, clang::OMPC_uniform, and clang::OMPC_unknown.
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPAtomicDirective().
|
static |
Definition at line 3152 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().
|
static |
Definition at line 3190 of file CGStmtOpenMP.cpp.
References clang::prec::And, clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, Context, clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::LValue::getAlignment(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::Address::getElementType(), clang::CodeGen::LValue::getPointer(), clang::CodeGen::RValue::getScalarVal(), clang::ASTContext::getTargetInfo(), clang::CodeGen::LValue::getType(), clang::ASTContext::getTypeSize(), clang::TargetInfo::hasBuiltinAtomic(), clang::Type::hasSignedIntegerRepresentation(), clang::CodeGen::RValue::isScalar(), clang::CodeGen::LValue::isSimple(), and clang::ASTContext::toBits().
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPAtomicSimpleUpdateExpr().
|
static |
Definition at line 3306 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().
|
static |
Definition at line 3176 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().
|
static |
Emit a helper variable and return corresponding lvalue.
Definition at line 1842 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::EmitLValue(), clang::CodeGen::CodeGenFunction::EmitVarDecl(), and clang::DeclRefExpr::getDecl().
Referenced by emitDistributeParallelForInnerBounds(), emitForLoopBounds(), and clang::CodeGen::CodeGenFunction::EmitOMPWorksharingLoop().
|
static |
Definition at line 1481 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::EmitOMPLoopBody(), and clang::CodeGen::CodeGenFunction::EmitStopPoint().
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPDistributeDirective().
|
static |
Definition at line 264 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), clang::Type::castAs(), castValueFromUintptr(), clang::CodeGen::CodeGenFunction::CGM, clang::ImplicitParamDecl::Create(), clang::Create(), clang::CodeGen::CodeGenFunction::CreateMemTemp(), clang::CodeGen::Decl, clang::CodeGen::CodeGenFunction::EmitLoadOfLValue(), clang::CodeGen::CodeGenFunction::EmitLoadOfPointer(), clang::CodeGen::CodeGenFunction::EmitLoadOfReference(), clang::CodeGen::CodeGenFunction::EmitStoreOfScalar(), clang::RecordDecl::fields(), clang::IdentifierTable::get(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::CodeGenFunction::GetAddrOfLocalVar(), clang::CapturedDecl::getBody(), getCanonicalParamType(), clang::CodeGen::CodeGenModule::getContext(), clang::CapturedDecl::getContextParamPosition(), clang::ASTContext::getDeclAlign(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::NamedDecl::getIdentifier(), clang::Decl::getLocation(), clang::Stmt::getLocStart(), clang::CodeGen::CodeGenModule::getModule(), clang::QualType::getNonReferenceType(), clang::CodeGen::Address::getPointer(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), clang::CodeGen::RValue::getScalarVal(), clang::CodeGen::Address::getType(), clang::CodeGen::LValue::getType(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::ASTContext::getUIntPtrType(), clang::Decl::hasBody(), I, clang::ASTContext::Idents, clang::InternalLinkage, clang::Type::isAnyPointerType(), clang::Type::isLValueReferenceType(), clang::CapturedDecl::isNothrow(), clang::Type::isPointerType(), clang::Type::isReferenceType(), clang::Type::isVariablyModifiedType(), clang::CodeGen::CodeGenFunction::MakeAddrLValue(), clang::ImplicitParamDecl::Other, clang::CapturedDecl::param_begin(), clang::CapturedDecl::param_end(), clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), clang::CodeGen::CodeGenFunction::StartFunction(), and clang::ASTContext::VoidTy.
Referenced by clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedStmtFunction().
|
static |
Definition at line 3049 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::CapturedStmtInfo, and clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedStmtFunction().
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPOrderedDirective().
|
static |
Definition at line 1036 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().
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPParallelDirective(), clang::CodeGen::CodeGenFunction::EmitOMPSimdDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTeamsDirective(), clang::CodeGen::CodeGenFunction::EmitOMPWorksharingLoop(), and emitTargetParallelRegion().
|
static |
Definition at line 1348 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::EmitBranchOnBoolExpr(), clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(), clang::CodeGen::CodeGenFunction::EmitOMPPrivateLoopCounters(), clang::CodeGen::CodeGenFunction::HaveInsertPoint(), I, clang::OMPLoopDirective::inits(), and clang::CodeGen::CodeGenFunction::OMPPrivateScope::Privatize().
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPSimdDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTaskLoopBasedDirective(), and clang::CodeGen::CodeGenFunction::EmitOMPWorksharingLoop().
|
static |
Definition at line 1400 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::EmitAnyExpr(), clang::CodeGen::RValue::getScalarVal(), clang::OMPExecutableDirective::getSingleClause(), clang::CodeGen::CodeGenFunction::HaveInsertPoint(), clang::CodeGen::CodeGenFunction::LoopStack, clang::CodeGen::LoopInfoStack::setParallel(), and clang::CodeGen::LoopInfoStack::setVectorizeWidth().
|
static |
Definition at line 3122 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().
|
static |
Definition at line 3936 of file CGStmtOpenMP.cpp.
References emitCommonOMPParallelDirective(), emitEmptyBoundParameters(), emitPostUpdateForReductionClause(), clang::CodeGen::PrePostActionTy::Enter(), clang::OMPExecutableDirective::getCapturedStmt(), clang::CodeGen::CodeGenFunction::OMPPrivateScope::Privatize(), and S.
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPTargetParallelDeviceFunction(), and clang::CodeGen::CodeGenFunction::EmitOMPTargetParallelDirective().
|
static |
Definition at line 3607 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::EmitOMPFirstprivateClause(), clang::CodeGen::CodeGenFunction::EmitOMPPrivateClause(), clang::CodeGen::CodeGenFunction::EmitStmt(), clang::CodeGen::PrePostActionTy::Enter(), clang::OMPExecutableDirective::getAssociatedStmt(), and clang::CodeGen::CodeGenFunction::OMPPrivateScope::Privatize().
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPTargetDeviceFunction(), and clang::CodeGen::CodeGenFunction::EmitOMPTargetDirective().
|
static |
Definition at line 3680 of file CGStmtOpenMP.cpp.
References emitCommonOMPTeamsDirective(), clang::CodeGen::CodeGenFunction::EmitStmt(), clang::CodeGen::PrePostActionTy::Enter(), and clang::OMPExecutableDirective::getCapturedStmt().
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPTargetTeamsDeviceFunction(), and clang::CodeGen::CodeGenFunction::EmitOMPTargetTeamsDirective().
|
static |
Definition at line 231 of file CGStmtOpenMP.cpp.
References clang::ASTContext::getCanonicalParamType(), clang::ASTContext::getLValueReferenceType(), clang::QualType::getNonReferenceType(), clang::Type::getPointeeType(), clang::ASTContext::getPointerType(), clang::Type::isLValueReferenceType(), and clang::Type::isPointerType().
Referenced by emitOutlinedFunctionPrologue().
|
static |
Emit a helper variable and return corresponding lvalue.
Definition at line 3986 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::OMPPrivateScope::addPrivate(), clang::CodeGen::CodeGenFunction::GetAddrOfLocalVar(), and clang::DeclRefExpr::getDecl().
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPTaskLoopBasedDirective().
1.8.6