clang
7.0.0
|
#include "CGCXXABI.h"
#include "CGCleanup.h"
#include "CGOpenMPRuntime.h"
#include "CGRecordLayout.h"
#include "CodeGenFunction.h"
#include "clang/CodeGen/ConstantInitBuilder.h"
#include "clang/AST/Decl.h"
#include "clang/AST/StmtOpenMP.h"
#include "clang/Basic/BitmaskEnum.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/Bitcode/BitcodeReader.h"
#include "llvm/IR/CallSite.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/GlobalValue.h"
#include "llvm/IR/Value.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
Go to the source code of this file.
Classes | |
class | CleanupTy |
A basic class for pre|post-action for advanced codegen sequence for OpenMP region. More... | |
Functions | |
static const OMPDeclareReductionDecl * | getReductionInit (const Expr *ReductionOp) |
Check if the combiner is a call to UDR combiner and if it is so return the UDR decl used for reduction. More... | |
static void | emitInitWithReductionInitializer (CodeGenFunction &CGF, const OMPDeclareReductionDecl *DRD, const Expr *InitOp, Address Private, Address Original, QualType Ty) |
static void | EmitOMPAggregateInit (CodeGenFunction &CGF, Address DestAddr, QualType Type, bool EmitDeclareReductionInit, const Expr *Init, const OMPDeclareReductionDecl *DRD, Address SrcAddr=Address::invalid()) |
Emit initialization of arrays of complex types. More... | |
static LValue | loadToBegin (CodeGenFunction &CGF, QualType BaseTy, QualType ElTy, LValue BaseLV) |
static Address | castToBase (CodeGenFunction &CGF, QualType BaseTy, QualType ElTy, llvm::Type *BaseLVType, CharUnits BaseLVAlignment, llvm::Value *Addr) |
static const VarDecl * | getBaseDecl (const Expr *Ref, const DeclRefExpr *&DE) |
static FieldDecl * | addFieldToRecordDecl (ASTContext &C, DeclContext *DC, QualType FieldTy) |
static llvm::Function * | emitCombinerOrInitializer (CodeGenModule &CGM, QualType Ty, const Expr *CombinerInitializer, const VarDecl *In, const VarDecl *Out, bool IsCombiner) |
static llvm::Value * | emitParallelOrTeamsOutlinedFunction (CodeGenModule &CGM, const OMPExecutableDirective &D, const CapturedStmt *CS, const VarDecl *ThreadIDVar, OpenMPDirectiveKind InnermostKind, const StringRef OutlinedHelperName, const RegionCodeGenTy &CodeGen) |
static void | buildStructValue (ConstantStructBuilder &Fields, CodeGenModule &CGM, const RecordDecl *RD, const CGRecordLayout &RL, ArrayRef< llvm::Constant *> Data) |
template<class... As> | |
static llvm::GlobalVariable * | createConstantGlobalStruct (CodeGenModule &CGM, QualType Ty, ArrayRef< llvm::Constant *> Data, const Twine &Name, As &&... Args) |
template<typename T > | |
static void | createConstantGlobalStructAndAddToParent (CodeGenModule &CGM, QualType Ty, ArrayRef< llvm::Constant *> Data, T &Parent) |
static void | getTargetEntryUniqueInfo (ASTContext &C, SourceLocation Loc, unsigned &DeviceID, unsigned &FileID, unsigned &LineNum) |
Obtain information that uniquely identifies a target entry. More... | |
static Address | emitAddrOfVarFromArray (CodeGenFunction &CGF, Address Array, unsigned Index, const VarDecl *Var) |
Given an array of pointers to variables, project the address of a given variable. More... | |
static llvm::Value * | emitCopyprivateCopyFunction (CodeGenModule &CGM, llvm::Type *ArgsType, ArrayRef< const Expr *> CopyprivateVars, ArrayRef< const Expr *> DestExprs, ArrayRef< const Expr *> SrcExprs, ArrayRef< const Expr *> AssignmentOps, SourceLocation Loc) |
static OpenMPSchedType | getRuntimeSchedule (OpenMPScheduleClauseKind ScheduleKind, bool Chunked, bool Ordered) |
Map the OpenMP loop schedule to the runtime enumeration. More... | |
static OpenMPSchedType | getRuntimeSchedule (OpenMPDistScheduleClauseKind ScheduleKind, bool Chunked) |
Map the OpenMP distribute schedule to the runtime enumeration. More... | |
static int | addMonoNonMonoModifier (OpenMPSchedType Schedule, OpenMPScheduleClauseModifier M1, OpenMPScheduleClauseModifier M2) |
static void | emitForStaticInitCall (CodeGenFunction &CGF, llvm::Value *UpdateLocation, llvm::Value *ThreadId, llvm::Constant *ForStaticInitFunction, OpenMPSchedType Schedule, OpenMPScheduleClauseModifier M1, OpenMPScheduleClauseModifier M2, const CGOpenMPRuntime::StaticRTInput &Values) |
static RecordDecl * | createPrivatesRecordDecl (CodeGenModule &CGM, ArrayRef< PrivateDataTy > Privates) |
static RecordDecl * | createKmpTaskTRecordDecl (CodeGenModule &CGM, OpenMPDirectiveKind Kind, QualType KmpInt32Ty, QualType KmpRoutineEntryPointerQTy) |
static RecordDecl * | createKmpTaskTWithPrivatesRecordDecl (CodeGenModule &CGM, QualType KmpTaskTQTy, ArrayRef< PrivateDataTy > Privates) |
static llvm::Value * | emitProxyTaskFunction (CodeGenModule &CGM, SourceLocation Loc, OpenMPDirectiveKind Kind, QualType KmpInt32Ty, QualType KmpTaskTWithPrivatesPtrQTy, QualType KmpTaskTWithPrivatesQTy, QualType KmpTaskTQTy, QualType SharedsPtrTy, llvm::Value *TaskFunction, llvm::Value *TaskPrivatesMap) |
Emit a proxy function which accepts kmp_task_t as the second argument. More... | |
static llvm::Value * | emitDestructorsFunction (CodeGenModule &CGM, SourceLocation Loc, QualType KmpInt32Ty, QualType KmpTaskTWithPrivatesPtrQTy, QualType KmpTaskTWithPrivatesQTy) |
static llvm::Value * | emitTaskPrivateMappingFunction (CodeGenModule &CGM, SourceLocation Loc, ArrayRef< const Expr *> PrivateVars, ArrayRef< const Expr *> FirstprivateVars, ArrayRef< const Expr *> LastprivateVars, QualType PrivatesQTy, ArrayRef< PrivateDataTy > Privates) |
Emit a privates mapping function for correct handling of private and firstprivate variables. More... | |
static bool | stable_sort_comparator (const PrivateDataTy P1, const PrivateDataTy P2) |
static void | emitPrivatesInit (CodeGenFunction &CGF, const OMPExecutableDirective &D, Address KmpTaskSharedsPtr, LValue TDBase, const RecordDecl *KmpTaskTWithPrivatesQTyRD, QualType SharedsTy, QualType SharedsPtrTy, const OMPTaskDataTy &Data, ArrayRef< PrivateDataTy > Privates, bool ForDup) |
Emit initialization for private variables in task-based directives. More... | |
static bool | checkInitIsRequired (CodeGenFunction &CGF, ArrayRef< PrivateDataTy > Privates) |
Check if duplication function is required for taskloops. More... | |
static llvm::Value * | emitTaskDupFunction (CodeGenModule &CGM, SourceLocation Loc, const OMPExecutableDirective &D, QualType KmpTaskTWithPrivatesPtrQTy, const RecordDecl *KmpTaskTWithPrivatesQTyRD, const RecordDecl *KmpTaskTQTyRD, QualType SharedsTy, QualType SharedsPtrTy, const OMPTaskDataTy &Data, ArrayRef< PrivateDataTy > Privates, bool WithLastIter) |
Emit task_dup function (for initialization of private/firstprivate/lastprivate vars and last_iter flag) More... | |
static bool | checkDestructorsRequired (const RecordDecl *KmpTaskTWithPrivatesQTyRD) |
Checks if destructor function is required to be generated. More... | |
static void | EmitOMPAggregateReduction (CodeGenFunction &CGF, QualType Type, const VarDecl *LHSVar, const VarDecl *RHSVar, const llvm::function_ref< void(CodeGenFunction &CGF, const Expr *, const Expr *, const Expr *)> &RedOpGen, const Expr *XExpr=nullptr, const Expr *EExpr=nullptr, const Expr *UpExpr=nullptr) |
Emit reduction operation for each element of array (required for array sections) LHS op = RHS. More... | |
static void | emitReductionCombiner (CodeGenFunction &CGF, const Expr *ReductionOp) |
Emit reduction combiner. More... | |
static std::string | generateUniqueName (CodeGenModule &CGM, StringRef Prefix, const Expr *Ref) |
Generates unique name for artificial threadprivate variables. More... | |
static llvm::Value * | emitReduceInitFunction (CodeGenModule &CGM, SourceLocation Loc, ReductionCodeGen &RCG, unsigned N) |
Emits reduction initializer function: More... | |
static llvm::Value * | emitReduceCombFunction (CodeGenModule &CGM, SourceLocation Loc, ReductionCodeGen &RCG, unsigned N, const Expr *ReductionOp, const Expr *LHS, const Expr *RHS, const Expr *PrivateRef) |
Emits reduction combiner function: More... | |
static llvm::Value * | emitReduceFiniFunction (CodeGenModule &CGM, SourceLocation Loc, ReductionCodeGen &RCG, unsigned N) |
Emits reduction finalizer function: More... | |
static RTCancelKind | getCancellationKind (OpenMPDirectiveKind CancelRegion) |
static const Stmt * | ignoreCompoundStmts (const Stmt *Body) |
discard all CompoundStmts intervening between two constructs More... | |
static llvm::Value * | emitNumTeamsForTargetDirective (CGOpenMPRuntime &OMPRuntime, CodeGenFunction &CGF, const OMPExecutableDirective &D) |
Emit the number of teams for a target directive. More... | |
static llvm::Value * | emitNumThreadsForTargetDirective (CGOpenMPRuntime &OMPRuntime, CodeGenFunction &CGF, const OMPExecutableDirective &D) |
Emit the number of threads for a target directive. More... | |
static void | emitOffloadingArrays (CodeGenFunction &CGF, MappableExprsHandler::MapBaseValuesArrayTy &BasePointers, MappableExprsHandler::MapValuesArrayTy &Pointers, MappableExprsHandler::MapValuesArrayTy &Sizes, MappableExprsHandler::MapFlagsArrayTy &MapTypes, CGOpenMPRuntime::TargetDataInfo &Info) |
Emit the arrays used to pass the captures and map information to the offloading runtime library. More... | |
static void | emitOffloadingArraysArgument (CodeGenFunction &CGF, llvm::Value *&BasePointersArrayArg, llvm::Value *&PointersArrayArg, llvm::Value *&SizesArrayArg, llvm::Value *&MapTypesArrayArg, CGOpenMPRuntime::TargetDataInfo &Info) |
Emit the arguments to be passed to the runtime library based on the arrays of pointers, sizes and map types. More... | |
static unsigned | evaluateCDTSize (const FunctionDecl *FD, ArrayRef< ParamAttrTy > ParamAttrs) |
static void | emitX86DeclareSimdFunction (const FunctionDecl *FD, llvm::Function *Fn, const llvm::APSInt &VLENVal, ArrayRef< ParamAttrTy > ParamAttrs, OMPDeclareSimdDeclAttr::BranchStateTy State) |
Variables | |
ident_t | |
enum IdentFieldIndex |
Definition at line 488 of file CGOpenMPRuntime.cpp.
enum KmpTaskTFields |
Indexes of fields for type kmp_task_t.
Definition at line 3545 of file CGOpenMPRuntime.cpp.
enum OpenMPLocationFlags : unsigned |
Values for bit flags used in the ident_t to describe the fields.
All enumeric elements are named and described in accordance with the code from http://llvm.org/svn/llvm-project/openmp/trunk/runtime/src/kmp.h
Definition at line 436 of file CGOpenMPRuntime.cpp.
Definition at line 7485 of file CGOpenMPRuntime.cpp.
enum OpenMPRTLFunction |
Definition at line 535 of file CGOpenMPRuntime.cpp.
enum OpenMPSchedType |
Schedule types for 'omp for' loops (these enumerators are taken from the enum sched_type in kmp.h).
Definition at line 505 of file CGOpenMPRuntime.cpp.
enum ParamKindTy |
Kind of parameter in a function with 'declare simd' directive.
Definition at line 8513 of file CGOpenMPRuntime.cpp.
enum RTCancelKind |
Definition at line 6132 of file CGOpenMPRuntime.cpp.
|
static |
Definition at line 1187 of file CGOpenMPRuntime.cpp.
References clang::DeclContext::addDecl(), clang::AS_public, clang::FieldDecl::Create(), clang::ASTContext::getTrivialTypeSourceInfo(), and clang::ICIS_NoInit.
Referenced by clang::CodeGen::CGOpenMPRuntime::CGOpenMPRuntime(), createKmpTaskTRecordDecl(), createKmpTaskTWithPrivatesRecordDecl(), createPrivatesRecordDecl(), emitReduceFiniFunction(), clang::CodeGen::getTgtBinaryDescriptorQTy(), clang::CodeGen::getTgtDeviceImageQTy(), and clang::CodeGen::getTgtOffloadEntryQTy().
|
static |
Definition at line 3279 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::DispatchRTInput::Chunk, clang::CodeGen::createDispatchInitFunction(), clang::CodeGen::emitForDispatchInit(), clang::CodeGen::CodeGenFunction::EmitRuntimeCall(), clang::CodeGen::CGOpenMPRuntime::emitUpdateLocation(), getRuntimeSchedule(), clang::CodeGen::CGOpenMPRuntime::getThreadID(), clang::CodeGen::CodeGenFunction::HaveInsertPoint(), clang::CodeGen::DispatchRTInput::LB, clang::OpenMPScheduleTy::M1, clang::OpenMPScheduleTy::M2, Modifier, OMP_ord_static, OMP_ord_static_chunked, OMP_sch_modifier_monotonic, OMP_sch_modifier_nonmonotonic, OMP_sch_static, OMP_sch_static_balanced_chunked, OMP_sch_static_chunked, clang::OMPC_SCHEDULE_MODIFIER_last, clang::OMPC_SCHEDULE_MODIFIER_unknown, clang::OpenMPScheduleTy::Schedule, and clang::CodeGen::DispatchRTInput::UB.
Referenced by emitForStaticInitCall().
|
static |
Definition at line 1420 of file CGOpenMPRuntime.cpp.
References clang::RecordDecl::fields(), clang::CodeGen::CGRecordLayout::getLLVMFieldNo(), and clang::CodeGen::CGRecordLayout::getLLVMType().
Referenced by createConstantGlobalStructAndAddToParent().
|
static |
Definition at line 1081 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CreateMemTemp(), clang::CodeGen::CGBuilderTy::CreatePointerBitCastOrAddrSpaceCast(), clang::CodeGen::CGBuilderTy::CreateStore(), clang::CodeGen::CodeGenFunction::getContext(), clang::CodeGen::Address::getElementType(), clang::QualType::getNonReferenceType(), clang::Type::getPointeeType(), clang::CodeGen::Address::getPointer(), clang::ASTContext::hasSameType(), clang::CodeGen::Address::invalid(), clang::Type::isPointerType(), clang::Type::isReferenceType(), clang::CodeGen::Address::isValid(), and clang::CodeGen::Type.
Referenced by clang::CodeGen::ReductionCodeGen::adjustPrivateAddress().
|
static |
Checks if destructor function is required to be generated.
Definition at line 4738 of file CGOpenMPRuntime.cpp.
References clang::RecordDecl::field_begin().
|
static |
Check if duplication function is required for taskloops.
Definition at line 4641 of file CGOpenMPRuntime.cpp.
References clang::VarDecl::getAnyInitializer(), and clang::CodeGen::CodeGenFunction::isTrivialInitializer().
|
static |
Definition at line 1440 of file CGOpenMPRuntime.cpp.
Referenced by createConstantGlobalStructAndAddToParent(), and clang::CodeGen::CGOpenMPRuntime::createOffloadEntry().
|
static |
Definition at line 1455 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::ConstantAggregateBuilderTemplateBase< Impl, Traits >::beginStruct(), buildStructValue(), clang::CodeGen::CGOpenMPRuntime::CGM, createConstantGlobalStruct(), clang::CodeGen::ConstantAggregateBuilderTemplateBase< Impl, Traits >::finishAndAddTo(), clang::CodeGen::CodeGenModule::GetAddrOfConstantCString(), clang::Type::getAsTagDecl(), clang::CodeGen::CodeGenTypes::getCGRecordLayout(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::ConstantAddress::getPointer(), clang::ASTContext::getTypeAlignInChars(), clang::CodeGen::CodeGenModule::getTypes(), clang::CodeGen::CodeGenTypeCache::Int32Ty, and clang::CodeGen::CodeGenTypeCache::Int8PtrTy.
Referenced by clang::CodeGen::createOffloadingBinaryDescriptorRegistration().
|
static |
Definition at line 4207 of file CGOpenMPRuntime.cpp.
References addFieldToRecordDecl(), clang::ASTContext::buildImplicitRecord(), clang::RecordDecl::completeDefinition(), clang::CodeGen::CodeGenModule::getContext(), clang::ASTContext::getIntTypeForBitwidth(), clang::ASTContext::getRecordType(), clang::isOpenMPTaskLoopDirective(), clang::TagDecl::startDefinition(), clang::TTK_Union, and clang::ASTContext::VoidPtrTy.
|
static |
Definition at line 4253 of file CGOpenMPRuntime.cpp.
References addFieldToRecordDecl(), clang::ASTContext::buildImplicitRecord(), clang::RecordDecl::completeDefinition(), createPrivatesRecordDecl(), clang::CodeGen::CodeGenModule::getContext(), clang::ASTContext::getRecordType(), and clang::TagDecl::startDefinition().
|
static |
Definition at line 4181 of file CGOpenMPRuntime.cpp.
References addFieldToRecordDecl(), clang::ASTContext::buildImplicitRecord(), clang::CodeGen::CodeGenModule::getContext(), clang::QualType::getNonReferenceType(), clang::ValueDecl::getType(), clang::Decl::hasAttrs(), and clang::TagDecl::startDefinition().
Referenced by createKmpTaskTWithPrivatesRecordDecl().
|
static |
Given an array of pointers to variables, project the address of a given variable.
Definition at line 3011 of file CGOpenMPRuntime.cpp.
|
static |
Definition at line 1240 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::Decl::getLocation(), clang::ASTContext::getPointerType(), clang::CodeGen::CodeGenModule::getTypes(), clang::ImplicitParamDecl::Other, clang::ASTContext::VoidTy, and clang::QualType::withRestrict().
Referenced by clang::CodeGen::emitUserDefinedReduction().
|
static |
Definition at line 3024 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), clang::Create(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::CodeGen::CodeGenModule::getTypes(), clang::InternalLinkage, clang::ImplicitParamDecl::Other, clang::ASTContext::VoidPtrTy, and clang::ASTContext::VoidTy.
|
static |
Definition at line 4384 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), clang::Type::castAs(), clang::Create(), clang::CodeGen::CodeGenFunction::EmitLoadOfPointerLValue(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CodeGen::CodeGenFunction::FinishFunction(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::CodeGenFunction::GetAddrOfLocalVar(), clang::Type::getAsTagDecl(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::CodeGen::CodeGenModule::getTypes(), clang::InternalLinkage, clang::ImplicitParamDecl::Other, clang::CodeGen::CodeGenFunction::pushDestroy(), clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), clang::CodeGen::CodeGenFunction::StartFunction(), and clang::QualType::withRestrict().
|
static |
Definition at line 3348 of file CGOpenMPRuntime.cpp.
References addMonoNonMonoModifier(), clang::ASTContext::BoolTy, clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CGOpenMPRuntime::CGM, clang::CodeGen::StaticRTInput::Chunk, clang::CodeGen::createDispatchFiniFunction(), clang::CodeGen::createDispatchNextFunction(), clang::CodeGen::createForStaticInitFunction(), clang::CodeGen::createRuntimeFunction(), clang::CodeGen::emitDistributeStaticInit(), clang::CodeGen::emitFlush(), clang::CodeGen::emitForNext(), clang::CodeGen::emitForOrderedIterationEnd(), clang::CodeGen::emitForStaticFinish(), clang::CodeGen::emitForStaticInit(), clang::CodeGen::emitNumThreadsClause(), clang::CodeGen::emitProcBindClause(), clang::CodeGen::CodeGenFunction::EmitRuntimeCall(), clang::CodeGen::CodeGenFunction::EmitScalarConversion(), clang::CodeGen::CGOpenMPRuntime::emitUpdateLocation(), clang::CodeGen::CodeGenFunction::getContext(), clang::ASTContext::getIntTypeForBitwidth(), clang::CodeGen::Address::getPointer(), getRuntimeSchedule(), clang::CodeGen::CGOpenMPRuntime::getThreadID(), clang::CodeGen::CodeGenFunction::HaveInsertPoint(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::CodeGenTypeCache::IntTy, clang::isOpenMPDistributeDirective(), clang::isOpenMPLoopDirective(), clang::isOpenMPWorksharingDirective(), clang::CodeGen::StaticRTInput::IVSigned, clang::CodeGen::StaticRTInput::IVSize, clang::OpenMPScheduleTy::M1, clang::OpenMPScheduleTy::M2, OMP_dist_sch_static, OMP_dist_sch_static_chunked, OMP_ord_static, OMP_ord_static_chunked, OMP_sch_static, OMP_sch_static_balanced_chunked, OMP_sch_static_chunked, clang::OMPC_PROC_BIND_unknown, clang::OMPC_SCHEDULE_MODIFIER_unknown, OMPRTL__kmpc_flush, OMPRTL__kmpc_for_static_fini, OMPRTL__kmpc_push_num_threads, OMPRTL__kmpc_push_proc_bind, clang::CodeGen::StaticRTInput::Ordered, and clang::OpenMPScheduleTy::Schedule.
|
static |
Definition at line 759 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(), clang::CodeGen::CodeGenModule::EmitNullConstant(), clang::CodeGen::RValue::get(), clang::OMPDeclareReductionDecl::getInitializer(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), and clang::Expr::IgnoreParenImpCasts().
Referenced by clang::CodeGen::ReductionCodeGen::emitInitialization(), and EmitOMPAggregateInit().
|
static |
Emit the number of teams for a target directive.
Inspect the num_teams clause associated with a teams construct combined or closely nested with the target directive.
Emit a team of size one for directives such as 'target parallel' that have no associated teams construct.
Otherwise, return nullptr.
Definition at line 6326 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::OMPExecutableDirective::getCapturedStmt(), clang::CapturedStmt::getCapturedStmt(), clang::OMPExecutableDirective::getDirectiveKind(), clang::CodeGen::CodeGenFunction::getLangOpts(), clang::OMPExecutableDirective::getSingleClause(), ignoreCompoundStmts(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::isOpenMPParallelDirective(), and clang::isOpenMPTeamsDirective().
Referenced by emitOffloadingArraysArgument().
|
static |
Emit the number of threads for a target directive.
Inspect the thread_limit clause associated with a teams construct combined or closely nested with the target directive.
Emit the num_threads clause for directives such as 'target parallel' that have no associated teams construct.
Otherwise, return nullptr.
Definition at line 6394 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::OMPExecutableDirective::getCapturedStmt(), clang::CapturedStmt::getCapturedStmt(), clang::OMPExecutableDirective::getDirectiveKind(), clang::CodeGen::CodeGenFunction::getLangOpts(), clang::OMPExecutableDirective::getSingleClause(), ignoreCompoundStmts(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::Address::invalid(), clang::isOpenMPParallelDirective(), clang::isOpenMPTeamsDirective(), clang::LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE(), and operator*().
Referenced by emitOffloadingArraysArgument().
|
static |
Emit the arrays used to pass the captures and map information to the offloading runtime library.
If there is no map or capture information, return nullptr by reference.
Definition at line 7496 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::CGM, and clang::CodeGen::CodeGenFunction::getContext().
Referenced by emitOffloadingArraysArgument(), and clang::CodeGen::markAsGlobalTarget().
|
static |
Emit the arguments to be passed to the runtime library based on the arrays of pointers, sizes and map types.
Definition at line 7610 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::TargetDataInfo::BasePointersArray, clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CGBuilderTy::CreateConstInBoundsGEP2_32(), clang::CodeGen::createRuntimeFunction(), clang::CodeGen::emitInlinedDirective(), emitNumTeamsForTargetDirective(), emitNumThreadsForTargetDirective(), emitOffloadingArrays(), clang::CodeGen::CGOpenMPRuntime::emitOMPIfClause(), clang::CodeGen::emitOutlinedFunctionCall(), clang::CodeGen::emitTargetCall(), clang::OMPExecutableDirective::getCapturedStmt(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), clang::OMPExecutableDirective::hasClausesOfKind(), clang::CodeGen::CodeGenFunction::HaveInsertPoint(), clang::CodeGen::CodeGenTypeCache::Int64Ty, clang::CodeGen::TargetDataInfo::MapTypesArray, clang::CodeGen::TargetDataInfo::NumberOfPtrs, clang::OMPD_unknown, OMPRTL__tgt_target, OMPRTL__tgt_target_nowait, OMPRTL__tgt_target_teams, OMPRTL__tgt_target_teams_nowait, clang::CodeGen::TargetDataInfo::PointersArray, clang::CodeGen::TargetDataInfo::SizesArray, clang::CodeGen::CodeGenTypeCache::SizeTy, clang::CodeGen::CodeGenTypeCache::VoidPtrPtrTy, and clang::CodeGen::CodeGenTypeCache::VoidPtrTy.
Referenced by clang::CodeGen::markAsGlobalTarget().
|
static |
Emit initialization of arrays of complex types.
DestAddr | Address of the array. |
Type | Type of array. |
Init | Initial expression of array. |
SrcAddr | Address of the original array. |
Definition at line 816 of file CGOpenMPRuntime.cpp.
References clang::CharUnits::alignmentOfArrayElement(), clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::createBasicBlock(), clang::CodeGen::CGBuilderTy::CreateElementBitCast(), clang::CodeGen::CodeGenFunction::EmitAnyExprToMem(), clang::CodeGen::CodeGenFunction::emitArrayLength(), clang::CodeGen::CodeGenFunction::EmitBlock(), emitInitWithReductionInitializer(), clang::CodeGen::Address::getAlignment(), clang::Type::getAsArrayTypeUnsafe(), clang::CodeGen::CodeGenFunction::getContext(), clang::CodeGen::Address::getElementType(), clang::CodeGen::Address::getPointer(), clang::QualType::getQualifiers(), clang::ASTContext::getTypeSizeInChars(), and clang::CodeGen::Address::invalid().
|
static |
Emit reduction operation for each element of array (required for array sections) LHS op = RHS.
Type | Type of array. |
LHSVar | Variable on the left side of the reduction operation (references element of array in original variable). |
RHSVar | Variable on the right side of the reduction operation (references element of array in original variable). |
RedOpGen | Generator of reduction operation with use of LHSVar and RHSVar. |
Definition at line 5235 of file CGOpenMPRuntime.cpp.
References clang::CharUnits::alignmentOfArrayElement(), clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::createBasicBlock(), clang::CodeGen::CodeGenFunction::emitArrayLength(), clang::CodeGen::CodeGenFunction::EmitBlock(), clang::CodeGen::CodeGenFunction::GetAddrOfLocalVar(), clang::CodeGen::Address::getAlignment(), clang::Type::getAsArrayTypeUnsafe(), clang::CodeGen::CodeGenFunction::getContext(), clang::CodeGen::Address::getPointer(), and clang::ASTContext::getTypeSizeInChars().
Referenced by clang::CodeGen::emitSingleReductionCombiner().
|
static |
Definition at line 1337 of file CGOpenMPRuntime.cpp.
References clang::Type::castAs(), clang::CodeGen::CGOpenMPRuntime::CGM, clang::CodeGen::createRuntimeFunction(), clang::CodeGen::emitParallelOutlinedFunction(), clang::CodeGen::emitTaskOutlinedFunction(), clang::CodeGen::emitTeamsOutlinedFunction(), clang::CodeGen::CGOpenMPRuntime::emitUpdateLocation(), clang::OMPExecutableDirective::getCapturedStmt(), clang::OMPExecutableDirective::getDirectiveKind(), clang::OMPExecutableDirective::getLocStart(), clang::CodeGen::CGOpenMPRuntime::getOutlinedHelperName(), clang::CodeGen::CGOpenMPRuntime::getThreadID(), clang::ValueDecl::getType(), clang::isOpenMPTaskLoopDirective(), clang::Type::isPointerType(), OMPRTL__kmpc_omp_task, and clang::CodeGen::RegionCodeGenTy::setAction().
|
static |
Emit initialization for private variables in task-based directives.
Definition at line 4536 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::OMPPrivateScope::addPrivate(), clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::ConvertTypeForMem(), clang::CodeGen::CGBuilderTy::CreatePointerBitCastOrAddrSpaceCast(), clang::CodeGen::Decl, clang::CodeGen::CodeGenFunction::EmitAggregateAssign(), clang::CodeGen::CodeGenFunction::EmitExprAsInit(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CodeGen::CodeGenFunction::EmitOMPAggregateAssign(), clang::RecordDecl::field_begin(), clang::CodeGen::OMPTaskDataTy::FirstprivateVars, clang::CodeGen::LValue::getAddress(), clang::CodeGen::CodeGenFunction::GetAddrOfLocalVar(), clang::VarDecl::getAnyInitializer(), clang::OMPExecutableDirective::getCapturedStmt(), clang::CodeGen::CodeGenFunction::getContext(), clang::ASTContext::getDeclAlign(), clang::Decl::getDeclContext(), clang::OMPExecutableDirective::getDirectiveKind(), clang::CodeGen::LValue::getPointer(), clang::CodeGen::LValue::getTBAAInfo(), clang::CodeGen::LValue::getType(), clang::ValueDecl::getType(), clang::Type::isArrayType(), clang::isOpenMPTargetDataManagementDirective(), clang::isOpenMPTargetExecutionDirective(), clang::isOpenMPTaskLoopDirective(), clang::CodeGen::CodeGenFunction::isTrivialInitializer(), clang::CodeGen::Address::isValid(), clang::CodeGen::CodeGenFunction::CGCapturedStmtInfo::lookup(), clang::CodeGen::CodeGenFunction::MakeAddrLValue(), clang::CodeGen::CodeGenFunction::OMPPrivateScope::Privatize(), and clang::CodeGen::Type.
Referenced by emitTaskDupFunction().
|
static |
Emit a proxy function which accepts kmp_task_t as the second argument.
Definition at line 4281 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), clang::CodeGen::CodeGenFunction::Builder, clang::Type::castAs(), clang::CodeGen::CodeGenFunction::ConvertTypeForMem(), clang::Create(), clang::CodeGen::CGBuilderTy::CreatePointerBitCastOrAddrSpaceCast(), clang::CodeGen::CodeGenFunction::EmitLoadOfPointerLValue(), clang::CodeGen::CodeGenFunction::EmitLoadOfScalar(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CodeGen::CodeGenFunction::EmitStoreThroughLValue(), clang::CodeGen::CodeGenFunction::FinishFunction(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::CodeGenFunction::GetAddrOfLocalVar(), clang::Type::getAsTagDecl(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::CodeGen::LValue::getPointer(), clang::CodeGen::CodeGenModule::getTypes(), clang::InternalLinkage, clang::isOpenMPTaskLoopDirective(), clang::CodeGen::CodeGenFunction::MakeAddrLValue(), clang::ImplicitParamDecl::Other, clang::CodeGen::CodeGenFunction::ReturnValue, clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), clang::CodeGen::CodeGenFunction::StartFunction(), clang::CodeGen::CodeGenTypeCache::VoidPtrTy, and clang::QualType::withRestrict().
|
static |
Emits reduction combiner function:
Definition at line 5841 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::OMPPrivateScope::addPrivate(), clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::ConvertTypeForMem(), clang::Create(), clang::CodeGen::CGBuilderTy::CreateElementBitCast(), clang::CodeGen::ReductionCodeGen::emitAggregateType(), clang::CodeGen::CodeGenFunction::EmitLoadOfPointer(), clang::CodeGen::CodeGenFunction::EmitLoadOfScalar(), clang::CodeGen::CodeGenFunction::FinishFunction(), generateUniqueName(), clang::CodeGen::CodeGenFunction::GetAddrOfLocalVar(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::ASTContext::getPointerType(), clang::CodeGen::ReductionCodeGen::getRefExpr(), clang::CodeGen::ReductionCodeGen::getSizes(), clang::ASTContext::getSizeType(), clang::CodeGen::CodeGenModule::getTypes(), clang::InternalLinkage, clang::ImplicitParamDecl::Other, clang::CodeGen::CodeGenFunction::OMPPrivateScope::Privatize(), clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), clang::CodeGen::CodeGenFunction::StartFunction(), clang::ASTContext::VoidPtrTy, and clang::ASTContext::VoidTy.
Referenced by emitReduceFiniFunction().
|
static |
Emits reduction finalizer function:
Definition at line 5917 of file CGOpenMPRuntime.cpp.
References addFieldToRecordDecl(), clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), clang::CodeGen::CodeGenFunction::Builder, clang::ASTContext::buildImplicitRecord(), clang::CodeGen::CodeGenFunction::CapturedStmtInfo, clang::RecordDecl::completeDefinition(), clang::Create(), clang::CodeGen::CodeGenFunction::CreateMemTemp(), clang::CodeGen::CGBuilderTy::CreatePointerBitCastOrAddrSpaceCast(), clang::CodeGen::createRuntimeFunction(), clang::CodeGen::CGBuilderTy::CreateStore(), clang::CodeGen::ReductionCodeGen::emitAggregateType(), clang::CodeGen::CodeGenFunction::EmitCastToVoidPtr(), clang::CodeGen::CodeGenFunction::EmitCheckedInBoundsGEP(), clang::CodeGen::ReductionCodeGen::emitCleanups(), clang::CodeGen::CodeGenFunction::EmitLoadOfPointer(), clang::CodeGen::CodeGenFunction::EmitLoadOfScalar(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CodeGen::CodeGenFunction::EmitNullInitialization(), emitReduceCombFunction(), emitReduceInitFunction(), clang::CodeGen::CodeGenFunction::EmitRuntimeCall(), clang::CodeGen::CodeGenFunction::EmitStoreOfScalar(), clang::CodeGen::emitTaskReductionFixups(), clang::CodeGen::emitTaskReductionInit(), clang::CodeGen::emitTaskwaitCall(), clang::CodeGen::CGOpenMPRuntime::emitUpdateLocation(), clang::CodeGen::CodeGenFunction::FinishFunction(), generateUniqueName(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::getAddrOfArtificialThreadPrivate(), clang::CodeGen::CodeGenFunction::GetAddrOfLocalVar(), clang::CodeGen::LValue::getAlignment(), clang::ASTContext::getConstantArrayType(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::ASTContext::getIntTypeForBitwidth(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::CodeGen::Address::getPointer(), clang::CodeGen::LValue::getPointer(), clang::ASTContext::getPointerType(), clang::ASTContext::getRecordType(), clang::CodeGen::ReductionCodeGen::getRefExpr(), clang::CodeGen::ReductionCodeGen::getSharedLValue(), clang::CodeGen::ReductionCodeGen::getSizes(), clang::ASTContext::getSizeType(), clang::CodeGen::getTaskReductionItem(), clang::CodeGen::CGOpenMPRuntime::getThreadID(), clang::CodeGen::LValue::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::CodeGen::CodeGenFunction::HaveInsertPoint(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::InternalLinkage, clang::CodeGen::CodeGenTypeCache::IntTy, clang::CodeGen::CodeGenFunction::MakeNaturalAlignAddrLValue(), clang::CodeGen::ReductionCodeGen::needCleanups(), clang::ArrayType::Normal, OMPRTL__kmpc_omp_taskwait, OMPRTL__kmpc_task_reduction_get_th_data, OMPRTL__kmpc_task_reduction_init, clang::ImplicitParamDecl::Other, clang::CodeGen::OMPTaskDataTy::ReductionCopies, clang::CodeGen::OMPTaskDataTy::ReductionOps, clang::CodeGen::OMPTaskDataTy::ReductionVars, clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), clang::CodeGen::CodeGenTypeCache::SizeTy, clang::TagDecl::startDefinition(), clang::CodeGen::CodeGenFunction::StartFunction(), clang::CodeGen::ReductionCodeGen::usesReductionInitializer(), clang::CodeGen::CodeGenTypeCache::VoidPtrTy, clang::ASTContext::VoidPtrTy, and clang::ASTContext::VoidTy.
|
static |
Emits reduction initializer function:
Definition at line 5772 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), clang::CanQual< T >::castAs(), clang::Create(), clang::CodeGen::ReductionCodeGen::emitAggregateType(), clang::CodeGen::ReductionCodeGen::emitInitialization(), clang::CodeGen::CodeGenFunction::EmitLoadOfPointer(), clang::CodeGen::CodeGenFunction::EmitLoadOfScalar(), clang::CodeGen::CodeGenFunction::FinishFunction(), generateUniqueName(), clang::CodeGen::CodeGenFunction::GetAddrOfLocalVar(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::ASTContext::getPointerType(), clang::CodeGen::ReductionCodeGen::getRefExpr(), clang::CodeGen::ReductionCodeGen::getSizes(), clang::ASTContext::getSizeType(), clang::CodeGen::CodeGenModule::getTypes(), clang::InternalLinkage, clang::CodeGen::CodeGenFunction::MakeAddrLValue(), clang::CodeGen::CodeGenFunction::MakeNaturalAlignAddrLValue(), clang::ImplicitParamDecl::Other, clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), clang::CodeGen::CodeGenFunction::StartFunction(), clang::CodeGen::ReductionCodeGen::usesReductionInitializer(), clang::CodeGen::CodeGenTypeCache::VoidPtrTy, clang::ASTContext::VoidPtrTy, and clang::ASTContext::VoidTy.
Referenced by emitReduceFiniFunction().
|
static |
Emit reduction combiner.
If the combiner is a simple expression emit it as is, otherwise consider it as combiner of UDR decl and emit it as a call of UDR combiner function.
Definition at line 5309 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), clang::CodeGen::CGOpenMPRuntime::CGM, clang::CodeGen::CodeGenFunction::CGM, clang::Create(), clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(), clang::CodeGen::emitReductionFunction(), clang::CodeGen::RValue::get(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::getName(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::CodeGen::CodeGenModule::getTypes(), clang::InternalLinkage, clang::ImplicitParamDecl::Other, Privates, clang::CodeGen::Type, clang::ASTContext::VoidPtrTy, and clang::ASTContext::VoidTy.
Referenced by clang::CodeGen::emitSingleReductionCombiner().
|
static |
Emit task_dup function (for initialization of private/firstprivate/lastprivate vars and last_iter flag)
Definition at line 4667 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), clang::Type::castAs(), clang::Create(), clang::CodeGen::CodeGenFunction::EmitLoadOfPointerLValue(), clang::CodeGen::CodeGenFunction::EmitLoadOfScalar(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), emitPrivatesInit(), clang::CodeGen::CodeGenFunction::EmitStoreOfScalar(), clang::RecordDecl::field_begin(), clang::CodeGen::CodeGenFunction::FinishFunction(), clang::CodeGen::OMPTaskDataTy::FirstprivateVars, clang::CodeGen::CodeGenFunction::GetAddrOfLocalVar(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::CodeGenFunction::getNaturalTypeAlignment(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::CodeGen::CodeGenModule::getTypes(), clang::InternalLinkage, clang::ASTContext::IntTy, clang::CodeGen::Address::invalid(), clang::ImplicitParamDecl::Other, clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), clang::CodeGen::CodeGenFunction::StartFunction(), and clang::ASTContext::VoidTy.
|
static |
Emit a privates mapping function for correct handling of private and firstprivate variables.
Definition at line 4444 of file CGOpenMPRuntime.cpp.
References clang::ImplicitParamDecl::Create(), clang::CodeGen::CodeGenModule::getContext(), clang::ASTContext::getPointerType(), clang::Expr::getType(), clang::ImplicitParamDecl::Other, clang::QualType::withConst(), and clang::QualType::withRestrict().
|
static |
Definition at line 8575 of file CGOpenMPRuntime.cpp.
|
static |
Definition at line 8522 of file CGOpenMPRuntime.cpp.
References clang::Decl::getASTContext(), clang::ASTContext::getPointerType(), clang::ASTContext::getRecordType(), clang::FunctionDecl::getReturnType(), clang::QualType::isNull(), and clang::Type::isVoidType().
|
static |
Generates unique name for artificial threadprivate variables.
Format is: <Prefix> "." <Decl_mangled_name> "_" "<Decl_start_loc_raw_enc>"
Definition at line 5748 of file CGOpenMPRuntime.cpp.
Referenced by emitReduceCombFunction(), emitReduceFiniFunction(), and emitReduceInitFunction().
|
static |
Definition at line 1109 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::Base, clang::DeclRefExpr::getDecl(), and clang::Expr::IgnoreParenImpCasts().
Referenced by clang::CodeGen::ReductionCodeGen::adjustPrivateAddress().
|
static |
Definition at line 6141 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CapturedStmtInfo, clang::CodeGen::CodeGenFunction::createBasicBlock(), clang::CodeGen::createRuntimeFunction(), clang::CodeGen::emitCancellationPointCall(), clang::CodeGen::CodeGenFunction::EmitRuntimeCall(), clang::CodeGen::CGOpenMPRuntime::emitUpdateLocation(), clang::CodeGen::CGOpenMPRuntime::getThreadID(), clang::CodeGen::CodeGenFunction::HaveInsertPoint(), and OMPRTL__kmpc_cancellationpoint.
|
static |
Check if the combiner is a call to UDR combiner and if it is so return the UDR decl used for reduction.
Definition at line 749 of file CGOpenMPRuntime.cpp.
Referenced by clang::CodeGen::ReductionCodeGen::emitInitialization(), and clang::CodeGen::ReductionCodeGen::usesReductionInitializer().
|
static |
Map the OpenMP loop schedule to the runtime enumeration.
Definition at line 3230 of file CGOpenMPRuntime.cpp.
References OMP_ord_auto, OMP_ord_dynamic_chunked, OMP_ord_guided_chunked, OMP_ord_runtime, OMP_ord_static, OMP_ord_static_chunked, OMP_sch_auto, OMP_sch_dynamic_chunked, OMP_sch_guided_chunked, OMP_sch_runtime, OMP_sch_static, OMP_sch_static_chunked, and clang::OMPC_SCHEDULE_unknown.
Referenced by addMonoNonMonoModifier(), emitForStaticInitCall(), clang::CodeGen::isDynamic(), and clang::CodeGen::isStaticNonchunked().
|
static |
Map the OpenMP distribute schedule to the runtime enumeration.
Definition at line 3253 of file CGOpenMPRuntime.cpp.
References OMP_dist_sch_static, and OMP_dist_sch_static_chunked.
|
static |
Obtain information that uniquely identifies a target entry.
This consists of the file and device IDs as well as line number associated with the relevant entry source location.
Definition at line 2596 of file CGOpenMPRuntime.cpp.
References clang::SourceManager::getDiagnostics(), clang::SourceManager::getPresumedLoc(), clang::ASTContext::getSourceManager(), clang::SourceLocation::isValid(), clang::DiagnosticsEngine::Report(), and SM.
Referenced by clang::CodeGen::emitDeclareTargetVarDefinition(), and clang::CodeGen::CGOpenMPRuntime::emitTargetOutlinedFunctionHelper().
discard all CompoundStmts intervening between two constructs
Definition at line 6310 of file CGOpenMPRuntime.cpp.
Referenced by emitNumTeamsForTargetDirective(), and emitNumThreadsForTargetDirective().
|
static |
Definition at line 1061 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::ConvertTypeForMem(), clang::CodeGen::CGBuilderTy::CreateElementBitCast(), clang::CodeGen::CodeGenFunction::EmitLoadOfPointerLValue(), clang::CodeGen::CodeGenFunction::EmitLoadOfReferenceLValue(), clang::CodeGen::LValue::getAddress(), clang::Type::getAs(), clang::CodeGen::LValue::getBaseInfo(), clang::CodeGen::CodeGenFunction::getContext(), clang::QualType::getNonReferenceType(), clang::Type::getPointeeType(), clang::CodeGen::CodeGenModule::getTBAAInfoForSubobject(), clang::CodeGen::LValue::getType(), clang::ASTContext::hasSameType(), clang::Type::isPointerType(), clang::Type::isReferenceType(), and clang::CodeGen::CodeGenFunction::MakeAddrLValue().
Referenced by clang::CodeGen::ReductionCodeGen::adjustPrivateAddress().
|
static |
Definition at line 4530 of file CGOpenMPRuntime.cpp.
ident_t |
Definition at line 487 of file CGOpenMPRuntime.cpp.