clang
6.0.0
|
#include "CGCXXABI.h"
#include "CGCleanup.h"
#include "CGOpenMPRuntime.h"
#include "CodeGenFunction.h"
#include "clang/CodeGen/ConstantInitBuilder.h"
#include "clang/AST/Decl.h"
#include "clang/AST/StmtOpenMP.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/BitmaskEnum.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 llvm::Function * | emitCombinerOrInitializer (CodeGenModule &CGM, QualType Ty, const Expr *CombinerInitializer, const VarDecl *In, const VarDecl *Out, bool IsCombiner) |
static CharUnits | getIdentAlign (CodeGenModule &CGM) |
static CharUnits | getIdentSize (CodeGenModule &CGM) |
static CharUnits | getOffsetOfIdentField (IdentFieldIndex Field) |
static Address | createIdentFieldGEP (CodeGenFunction &CGF, Address Addr, IdentFieldIndex Field, const llvm::Twine &Name="") |
static llvm::Value * | emitParallelOrTeamsOutlinedFunction (CodeGenModule &CGM, const OMPExecutableDirective &D, const CapturedStmt *CS, const VarDecl *ThreadIDVar, OpenMPDirectiveKind InnermostKind, const StringRef OutlinedHelperName, const RegionCodeGenTy &CodeGen) |
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) |
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 llvm::Function * | createOffloadingBinaryDescriptorFunction (CodeGenModule &CGM, StringRef Name, const RegionCodeGenTy &Codegen) |
Create a Ctor/Dtor-like function whose body is emitted through Codegen. More... | |
static FieldDecl * | addFieldToRecordDecl (ASTContext &C, DeclContext *DC, QualType FieldTy) |
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 (StringRef Prefix, SourceLocation Loc, unsigned N) |
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 void | getTargetEntryUniqueInfo (ASTContext &C, SourceLocation Loc, unsigned &DeviceID, unsigned &FileID, unsigned &LineNum) |
Obtain information that uniquely identifies a target entry. More... | |
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 487 of file CGOpenMPRuntime.cpp.
enum KmpTaskTFields |
Indexes of fields for type kmp_task_t.
Definition at line 3293 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 435 of file CGOpenMPRuntime.cpp.
Definition at line 6874 of file CGOpenMPRuntime.cpp.
enum OpenMPRTLFunction |
Definition at line 534 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 504 of file CGOpenMPRuntime.cpp.
enum ParamKindTy |
Kind of parameter in a function with 'declare simd' directive.
Definition at line 7665 of file CGOpenMPRuntime.cpp.
enum RTCancelKind |
Definition at line 5716 of file CGOpenMPRuntime.cpp.
|
static |
Definition at line 3718 of file CGOpenMPRuntime.cpp.
References clang::DeclContext::addDecl(), clang::AS_public, clang::FieldDecl::Create(), clang::ASTContext::getTrivialTypeSourceInfo(), and clang::ICIS_NoInit.
Referenced by createKmpTaskTRecordDecl(), createKmpTaskTWithPrivatesRecordDecl(), createPrivatesRecordDecl(), emitReduceFiniFunction(), clang::CodeGen::getTgtBinaryDescriptorQTy(), clang::CodeGen::getTgtDeviceImageQTy(), and clang::CodeGen::getTgtOffloadEntryQTy().
|
static |
Definition at line 3027 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 1076 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 4367 of file CGOpenMPRuntime.cpp.
References clang::RecordDecl::field_begin().
|
static |
Check if duplication function is required for taskloops.
Definition at line 4273 of file CGOpenMPRuntime.cpp.
References clang::VarDecl::getAnyInitializer(), and clang::CodeGen::CodeGenFunction::isTrivialInitializer().
|
static |
Definition at line 1300 of file CGOpenMPRuntime.cpp.
|
static |
Definition at line 3850 of file CGOpenMPRuntime.cpp.
References addFieldToRecordDecl(), clang::CodeGen::CodeGenModule::getContext(), clang::ASTContext::getIntTypeForBitwidth(), clang::isOpenMPTaskLoopDirective(), and clang::TTK_Union.
|
static |
Definition at line 3896 of file CGOpenMPRuntime.cpp.
References addFieldToRecordDecl(), createPrivatesRecordDecl(), and clang::CodeGen::CodeGenModule::getContext().
|
static |
Create a Ctor/Dtor-like function whose body is emitted through Codegen.
This is used to emit the two functions that register and unregister the descriptor of the current compilation unit.
Definition at line 3394 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), clang::CodeGen::CodeGenModule::CreateGlobalInitOrDestructFunction(), clang::CodeGen::CodeGenFunction::FinishFunction(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CodeGenModule::getTypes(), clang::ImplicitParamDecl::Other, and clang::CodeGen::CodeGenFunction::StartFunction().
Referenced by clang::CodeGen::createOffloadingBinaryDescriptorRegistration().
|
static |
Definition at line 3823 of file CGOpenMPRuntime.cpp.
References addFieldToRecordDecl(), clang::CodeGen::CodeGenModule::getContext(), clang::QualType::getNonReferenceType(), clang::ValueDecl::getType(), and clang::Decl::hasAttrs().
Referenced by createKmpTaskTWithPrivatesRecordDecl().
|
static |
Given an array of pointers to variables, project the address of a given variable.
Definition at line 2770 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::ConvertTypeForMem(), clang::CodeGen::CGBuilderTy::CreateConstArrayGEP(), clang::CodeGen::CGBuilderTy::CreateElementBitCast(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CodeGenFunction::getContext(), clang::ASTContext::getDeclAlign(), clang::CodeGen::CodeGenTypeCache::getPointerSize(), and clang::ValueDecl::getType().
|
static |
Definition at line 1193 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::OMPPrivateScope::addPrivate(), clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), clang::Type::castAs(), clang::Create(), clang::CodeGen::CodeGenFunction::EmitAnyExprToMem(), clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(), clang::CodeGen::CodeGenFunction::EmitLoadOfPointerLValue(), clang::CodeGen::CodeGenFunction::FinishFunction(), clang::CodeGen::CodeGenFunction::OMPPrivateScope::ForceCleanup(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::CodeGenFunction::GetAddrOfLocalVar(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::VarDecl::getInit(), clang::Decl::getLocation(), clang::CodeGen::CodeGenModule::getModule(), clang::QualType::getQualifiers(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::VarDecl::hasInit(), clang::InternalLinkage, clang::CodeGen::CodeGenFunction::isTrivialInitializer(), clang::ImplicitParamDecl::Other, clang::CodeGen::CodeGenFunction::OMPPrivateScope::Privatize(), clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), and clang::CodeGen::CodeGenFunction::StartFunction().
Referenced by clang::CodeGen::emitUserDefinedReduction().
|
static |
Definition at line 2783 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), clang::CodeGen::CodeGenFunction::Builder, clang::Create(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CGBuilderTy::CreatePointerBitCastOrAddrSpaceCast(), clang::CodeGen::CodeGenFunction::GetAddrOfLocalVar(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), clang::CodeGen::CodeGenModule::getTypes(), clang::InternalLinkage, clang::ImplicitParamDecl::Other, clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), and clang::CodeGen::CodeGenFunction::StartFunction().
|
static |
Definition at line 4025 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), clang::Type::castAs(), clang::Create(), clang::CodeGen::CodeGenFunction::disableDebugInfo(), clang::CodeGen::CodeGenFunction::EmitLoadOfPointerLValue(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CodeGen::CodeGenFunction::FinishFunction(), clang::CodeGen::CodeGenFunction::GetAddrOfLocalVar(), clang::Type::getAsTagDecl(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CodeGenModule::getModule(), 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 3096 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 758 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::EmitAnyExprToMem(), clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(), clang::CodeGen::CodeGenFunction::EmitLoadOfComplex(), clang::CodeGen::CodeGenFunction::EmitLoadOfLValue(), clang::CodeGen::CodeGenModule::EmitNullConstant(), clang::CodeGen::RValue::get(), clang::CodeGen::RValue::getAggregate(), clang::CodeGen::RValue::getComplex(), clang::CodeGen::CodeGenFunction::getEvaluationKind(), clang::OMPDeclareReductionDecl::getInitializer(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::QualType::getQualifiers(), clang::Expr::IgnoreParenImpCasts(), clang::CodeGen::CodeGenFunction::MakeNaturalAlignAddrLValue(), clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, clang::CodeGen::TEK_Scalar, and clang::VK_RValue.
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 5935 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::OMPExecutableDirective::getAssociatedStmt(), 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 6004 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::Type::getAs(), clang::OMPExecutableDirective::getAssociatedStmt(), clang::OMPArraySectionExpr::getBaseOriginalType(), clang::QualType::getCanonicalType(), clang::CapturedStmt::getCapturedStmt(), clang::OMPExecutableDirective::getDirectiveKind(), clang::CodeGen::CodeGenFunction::getLangOpts(), clang::Type::getPointeeType(), clang::OMPExecutableDirective::getSingleClause(), clang::Expr::getType(), clang::QualType::getTypePtr(), clang::CodeGen::CodeGenFunction::getTypeSize(), ignoreCompoundStmts(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::isOpenMPParallelDirective(), clang::isOpenMPTeamsDirective(), operator*(), and clang::CodeGen::CodeGenTypeCache::SizeTy.
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 6885 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::CGM, and clang::CodeGen::CodeGenFunction::getContext().
Referenced by emitOffloadingArraysArgument().
|
static |
Emit the arguments to be passed to the runtime library based on the arrays of pointers, sizes and map types.
Definition at line 6994 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::TargetDataInfo::BasePointersArray, clang::CodeGen::CodeGenFunction::Builder, clang::CapturedStmt::capture_begin(), clang::CapturedStmt::capture_end(), clang::CodeGen::CodeGenFunction::CGM, emitNumTeamsForTargetDirective(), emitNumThreadsForTargetDirective(), emitOffloadingArrays(), clang::CodeGen::CGOpenMPRuntime::emitOMPIfClause(), clang::CodeGen::emitOutlinedFunctionCall(), clang::CodeGen::emitTargetCall(), clang::RecordDecl::field_begin(), clang::OMPExecutableDirective::getAssociatedStmt(), clang::CapturedStmt::getCapturedRecordDecl(), clang::CodeGen::CodeGenFunction::getTypeSize(), clang::CodeGen::CodeGenFunction::HaveInsertPoint(), clang::CodeGen::CodeGenTypeCache::Int64Ty, clang::CodeGen::TargetDataInfo::MapTypesArray, 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.
|
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 812 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 4854 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 1307 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::getLocStart(), clang::CodeGen::CGOpenMPRuntime::getOutlinedHelperName(), clang::CodeGen::CGOpenMPRuntime::getThreadID(), clang::ValueDecl::getType(), clang::Type::isPointerType(), and OMPRTL__kmpc_omp_task.
|
static |
Emit initialization for private variables in task-based directives.
Definition at line 4171 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::OMPExecutableDirective::getDirectiveKind(), clang::CodeGen::LValue::getPointer(), clang::CodeGen::LValue::getTBAAInfo(), clang::CodeGen::LValue::getType(), clang::Type::isArrayType(), clang::isOpenMPTargetDataManagementDirective(), clang::isOpenMPTargetExecutionDirective(), clang::isOpenMPTaskLoopDirective(), clang::CodeGen::CodeGenFunction::isTrivialInitializer(), 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 3925 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::EmitLoadOfLValue(), 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::RValue::getScalarVal(), 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 5428 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::CodeGenFunction::disableDebugInfo(), 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::CodeGen::ReductionCodeGen::getSizes(), clang::ASTContext::getSizeType(), clang::CodeGen::CodeGenModule::getTypes(), clang::InternalLinkage, clang::ImplicitParamDecl::Other, clang::CodeGen::CodeGenFunction::OMPPrivateScope::Privatize(), clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), and clang::CodeGen::CodeGenFunction::StartFunction().
Referenced by emitReduceFiniFunction().
|
static |
Emits reduction finalizer function:
Definition at line 5502 of file CGOpenMPRuntime.cpp.
References addFieldToRecordDecl(), clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), clang::CodeGen::CodeGenFunction::Builder, clang::ASTContext::buildImplicitRecord(), clang::CodeGen::CodeGenFunction::CapturedStmtInfo, clang::Create(), clang::CodeGen::CodeGenFunction::CreateMemTemp(), clang::CodeGen::CGBuilderTy::CreatePointerBitCastOrAddrSpaceCast(), clang::CodeGen::createRuntimeFunction(), clang::CodeGen::CGBuilderTy::CreateStore(), clang::CodeGen::CodeGenFunction::disableDebugInfo(), 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::getRecordType(), 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, and clang::ASTContext::VoidPtrTy.
|
static |
Emits reduction initializer function:
Definition at line 5363 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), clang::Create(), clang::CodeGen::CodeGenFunction::disableDebugInfo(), 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::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, and clang::ASTContext::VoidPtrTy.
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 4928 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CGOpenMPRuntime::CGM, clang::Create(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CGBuilderTy::CreatePointerBitCastOrAddrSpaceCast(), clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(), clang::CodeGen::emitReductionFunction(), clang::CodeGen::RValue::get(), clang::CodeGen::CodeGenFunction::GetAddrOfLocalVar(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), clang::CodeGen::CodeGenModule::getTypes(), clang::InternalLinkage, clang::ImplicitParamDecl::Other, Privates, clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), clang::CodeGen::CodeGenFunction::StartFunction(), and clang::CodeGen::Type.
Referenced by clang::CodeGen::emitSingleReductionCombiner().
|
static |
Emit task_dup function (for initialization of private/firstprivate/lastprivate vars and last_iter flag)
Definition at line 4297 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), clang::Type::castAs(), clang::Create(), clang::CodeGen::CodeGenFunction::disableDebugInfo(), 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::getTypes(), clang::InternalLinkage, clang::CodeGen::Address::invalid(), clang::ImplicitParamDecl::Other, clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), and clang::CodeGen::CodeGenFunction::StartFunction().
|
static |
Emit a privates mapping function for correct handling of private and firstprivate variables.
Definition at line 4081 of file CGOpenMPRuntime.cpp.
References clang::ImplicitParamDecl::Create(), clang::CodeGen::CodeGenModule::getContext(), clang::Expr::getType(), and clang::ImplicitParamDecl::Other.
|
static |
Definition at line 7727 of file CGOpenMPRuntime.cpp.
|
static |
Definition at line 7674 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> "." <Loc_raw_encoding> "_" <N>
Definition at line 5347 of file CGOpenMPRuntime.cpp.
Referenced by emitReduceCombFunction(), emitReduceFiniFunction(), and emitReduceInitFunction().
|
static |
Definition at line 5725 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 |
Definition at line 1289 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenTypeCache::getPointerAlign().
|
static |
Definition at line 1292 of file CGOpenMPRuntime.cpp.
References clang::CharUnits::fromQuantity(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), and clang::CodeGen::CodeGenTypeCache::getPointerSize().
|
static |
Definition at line 1296 of file CGOpenMPRuntime.cpp.
References clang::CharUnits::fromQuantity().
|
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 748 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 2979 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 3002 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 5820 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::emitTargetOutlinedFunction(), clang::CodeGen::CGOpenMPRuntime::emitTargetOutlinedFunctionHelper(), clang::SourceManager::getPresumedLoc(), clang::ASTContext::getSourceManager(), clang::SourceLocation::isFileID(), clang::SourceLocation::isValid(), and SM.
Referenced by clang::CodeGen::CGOpenMPRuntime::emitTargetOutlinedFunctionHelper().
discard all CompoundStmts intervening between two constructs
Definition at line 5919 of file CGOpenMPRuntime.cpp.
Referenced by emitNumTeamsForTargetDirective(), and emitNumThreadsForTargetDirective().
|
static |
Definition at line 1056 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 4165 of file CGOpenMPRuntime.cpp.
ident_t |
Definition at line 486 of file CGOpenMPRuntime.cpp.