clang
10.0.0git
|
#include "CGCleanup.h"
#include "CGOpenMPRuntime.h"
#include "CodeGenFunction.h"
#include "CodeGenModule.h"
#include "TargetInfo.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Attr.h"
#include "clang/AST/DeclOpenMP.h"
#include "clang/AST/Stmt.h"
#include "clang/AST/StmtOpenMP.h"
#include "clang/Basic/PrettyStackTrace.h"
#include "llvm/Frontend/OpenMP/OMPIRBuilder.h"
Go to the source code of this file.
|
static |
Definition at line 337 of file CGStmtOpenMP.cpp.
Referenced by emitOutlinedFunctionPrologue().
|
static |
Definition at line 3895 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 3882 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 4145 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 3367 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().
|
static |
Definition at line 2796 of file CGStmtOpenMP.cpp.
|
static |
Definition at line 1647 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::EmitAlignmentAssumption(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::OMPExecutableDirective::getClausesOfKind(), clang::CodeGen::CodeGenFunction::getContext(), clang::CodeGen::CodeGenFunction::getLLVMContext(), 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().
|
static |
Definition at line 1445 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::EmitStmt(), clang::CodeGen::CodeGenFunction::getContext(), clang::ASTContext::getSourceManager(), clang::Stmt::getSourceRange(), clang::Stmt::IgnoreContainers(), and clang::OMPLoopDirective::tryToFindNextInnerLoop().
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPLoopBody().
|
static |
Definition at line 1291 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(), and clang::CapturedDecl::param_begin().
|
static |
Definition at line 4357 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(), and clang::LangOptions::OMPTargetTriples.
|
static |
Definition at line 4470 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().
|
static |
Definition at line 1902 of file CGStmtOpenMP.cpp.
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPDistributeLoop(), emitOMPSimdRegion(), and clang::CodeGen::CodeGenFunction::EmitOMPWorksharingLoop().
|
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 2748 of file CGStmtOpenMP.cpp.
|
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 2365 of file CGStmtOpenMP.cpp.
|
static |
Definition at line 2382 of file CGStmtOpenMP.cpp.
|
static |
Definition at line 2322 of file CGStmtOpenMP.cpp.
|
static |
Definition at line 1333 of file CGStmtOpenMP.cpp.
|
static |
Definition at line 2258 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().
|
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 2734 of file CGStmtOpenMP.cpp.
|
static |
Definition at line 2402 of file CGStmtOpenMP.cpp.
|
static |
Definition at line 3012 of file CGStmtOpenMP.cpp.
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPMasterDirective().
|
static |
Definition at line 4162 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 4244 of file CGStmtOpenMP.cpp.
References emitOMPAtomicCaptureExpr(), emitOMPAtomicReadExpr(), emitOMPAtomicUpdateExpr(), emitOMPAtomicWriteExpr(), clang::OMPC_device_type, clang::OMPC_match, clang::OMPC_threadprivate, clang::OMPC_uniform, and clang::OMPC_unknown.
|
static |
Definition at line 3951 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 3989 of file CGStmtOpenMP.cpp.
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPAtomicSimpleUpdateExpr().
|
static |
Definition at line 4107 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 3975 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 1895 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().
|
static |
Definition at line 1886 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::EmitOMPLoopBody(), clang::CodeGen::CodeGenFunction::EmitStopPoint(), and clang::CodeGen::CodeGenModule::getOpenMPRuntime().
|
static |
Definition at line 1936 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::ConstantFoldsToSimpleInteger(), clang::CodeGen::CodeGenFunction::createBasicBlock(), emitAlignedClause(), clang::CodeGen::CodeGenFunction::EmitBlock(), emitCommonSimdLoop(), clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(), clang::CodeGen::CodeGenFunction::EmitLValue(), EmitOMPHelperVar(), 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::OMPExecutableDirective::getDirectiveKind(), 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(), and clang::CodeGen::CodeGenFunction::OMPPrivateScope::Privatize().
Referenced by clang::CodeGen::CodeGenFunction::EmitSimpleOMPExecutableDirective().
|
static |
Definition at line 389 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::Decl, clang::CodeGen::CodeGenFunction::EmitLoadOfPointer(), clang::CodeGen::CodeGenFunction::EmitLoadOfReference(), clang::CodeGen::CodeGenFunction::EmitLoadOfScalar(), 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::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::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().
|
static |
Definition at line 3845 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::CapturedStmtInfo, and clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedStmtFunction().
|
static |
Definition at line 1256 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().
|
static |
Definition at line 1732 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::OMPMapVars::apply(), clang::CodeGen::CodeGenFunction::CreateMemTemp(), clang::OMPLoopDirective::dependent_counters(), clang::OMPLoopDirective::dependent_inits(), clang::CodeGen::CodeGenFunction::EmitBranchOnBoolExpr(), clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(), clang::CodeGen::CodeGenFunction::EmitOMPPrivateLoopCounters(), clang::CodeGen::CodeGenFunction::HaveInsertPoint(), clang::OMPLoopDirective::inits(), clang::CodeGen::CodeGenFunction::OMPPrivateScope::Privatize(), clang::CodeGen::CodeGenFunction::OMPMapVars::restore(), and clang::CodeGen::CodeGenFunction::OMPMapVars::setVarAddr().
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPDistributeLoop(), emitOMPSimdRegion(), and clang::CodeGen::CodeGenFunction::EmitOMPWorksharingLoop().
|
static |
Definition at line 1805 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().
|
static |
Definition at line 3921 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 5133 of file CGStmtOpenMP.cpp.
References clang::CodeGen::PrePostActionTy::Enter().
|
static |
Definition at line 5174 of file CGStmtOpenMP.cpp.
References clang::CodeGen::PrePostActionTy::Enter().
|
static |
Definition at line 5086 of file CGStmtOpenMP.cpp.
References clang::CodeGen::PrePostActionTy::Enter(), and clang::OMPExecutableDirective::getCapturedStmt().
|
static |
Definition at line 4436 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().
|
static |
Definition at line 4741 of file CGStmtOpenMP.cpp.
References clang::CodeGen::PrePostActionTy::Enter().
|
static |
Definition at line 4792 of file CGStmtOpenMP.cpp.
References clang::CodeGen::PrePostActionTy::Enter().
|
static |
Definition at line 4558 of file CGStmtOpenMP.cpp.
References clang::CodeGen::PrePostActionTy::Enter().
|
static |
Definition at line 4603 of file CGStmtOpenMP.cpp.
References clang::CodeGen::PrePostActionTy::Enter().
|
static |
Definition at line 4513 of file CGStmtOpenMP.cpp.
References clang::CodeGen::PrePostActionTy::Enter(), and clang::OMPExecutableDirective::getCapturedStmt().
|
static |
Definition at line 351 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().
|
static |
Emit a helper variable and return corresponding lvalue.
Definition at line 5213 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::OMPPrivateScope::addPrivate(), clang::CodeGen::CodeGenFunction::GetAddrOfLocalVar(), and clang::DeclRefExpr::getDecl().