|
clang 23.0.0git
|
#include "CGOpenMPRuntime.h"#include "ABIInfoImpl.h"#include "CGCXXABI.h"#include "CGCleanup.h"#include "CGDebugInfo.h"#include "CGRecordLayout.h"#include "CodeGenFunction.h"#include "TargetInfo.h"#include "clang/AST/APValue.h"#include "clang/AST/Attr.h"#include "clang/AST/Decl.h"#include "clang/AST/OpenMPClause.h"#include "clang/AST/StmtOpenMP.h"#include "clang/AST/StmtVisitor.h"#include "clang/Basic/DiagnosticFrontend.h"#include "clang/Basic/OpenMPKinds.h"#include "clang/Basic/SourceManager.h"#include "clang/CodeGen/ConstantInitBuilder.h"#include "llvm/ADT/ArrayRef.h"#include "llvm/ADT/SmallSet.h"#include "llvm/ADT/SmallVector.h"#include "llvm/ADT/StringExtras.h"#include "llvm/Bitcode/BitcodeReader.h"#include "llvm/IR/Constants.h"#include "llvm/IR/DerivedTypes.h"#include "llvm/IR/GlobalValue.h"#include "llvm/IR/InstrTypes.h"#include "llvm/IR/Value.h"#include "llvm/Support/AtomicOrdering.h"#include "llvm/Support/raw_ostream.h"#include <cassert>#include <cstdint>#include <numeric>#include <optional>Go to the source code of this file.
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. | |
| 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. | |
| static LValue | loadToBegin (CodeGenFunction &CGF, QualType BaseTy, QualType ElTy, LValue BaseLV) |
| static Address | castToBase (CodeGenFunction &CGF, QualType BaseTy, QualType ElTy, Address OriginalBaseAddress, 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::Function * | emitParallelOrTeamsOutlinedFunction (CodeGenModule &CGM, const OMPExecutableDirective &D, const CapturedStmt *CS, const VarDecl *ThreadIDVar, OpenMPDirectiveKind InnermostKind, const StringRef OutlinedHelperName, const RegionCodeGenTy &CodeGen) |
| static StringRef | getIdentStringFromSourceLocation (CodeGenFunction &CGF, SourceLocation Loc, SmallString< 128 > &Buffer) |
| static llvm::OffloadEntriesInfoManager::OMPTargetDeviceClauseKind | convertDeviceClause (const VarDecl *VD) |
| static llvm::OffloadEntriesInfoManager::OMPTargetGlobalVarEntryKind | convertCaptureClause (const VarDecl *VD) |
| static llvm::TargetRegionEntryInfo | getEntryInfoFromPresumedLoc (CodeGenModule &CGM, llvm::OpenMPIRBuilder &OMPBuilder, SourceLocation BeginLoc, llvm::StringRef ParentName="") |
| 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. | |
| static llvm::Value * | emitCopyprivateCopyFunction (CodeGenModule &CGM, llvm::Type *ArgsElemType, 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. | |
| static OpenMPSchedType | getRuntimeSchedule (OpenMPDistScheduleClauseKind ScheduleKind, bool Chunked) |
| Map the OpenMP distribute schedule to the runtime enumeration. | |
| static int | addMonoNonMonoModifier (CodeGenModule &CGM, OpenMPSchedType Schedule, OpenMPScheduleClauseModifier M1, OpenMPScheduleClauseModifier M2) |
| static void | emitForStaticInitCall (CodeGenFunction &CGF, llvm::Value *UpdateLocation, llvm::Value *ThreadId, llvm::FunctionCallee ForStaticInitFunction, OpenMPSchedType Schedule, OpenMPScheduleClauseModifier M1, OpenMPScheduleClauseModifier M2, const CGOpenMPRuntime::StaticRTInput &Values) |
| static bool | isAllocatableDecl (const VarDecl *VD) |
| 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::Function * | emitProxyTaskFunction (CodeGenModule &CGM, SourceLocation Loc, OpenMPDirectiveKind Kind, QualType KmpInt32Ty, QualType KmpTaskTWithPrivatesPtrQTy, QualType KmpTaskTWithPrivatesQTy, QualType KmpTaskTQTy, QualType SharedsPtrTy, llvm::Function *TaskFunction, llvm::Value *TaskPrivatesMap) |
| Emit a proxy function which accepts kmp_task_t as the second argument. | |
| static llvm::Value * | emitDestructorsFunction (CodeGenModule &CGM, SourceLocation Loc, QualType KmpInt32Ty, QualType KmpTaskTWithPrivatesPtrQTy, QualType KmpTaskTWithPrivatesQTy) |
| static llvm::Value * | emitTaskPrivateMappingFunction (CodeGenModule &CGM, SourceLocation Loc, const OMPTaskDataTy &Data, QualType PrivatesQTy, ArrayRef< PrivateDataTy > Privates) |
| Emit a privates mapping function for correct handling of private and firstprivate variables. | |
| 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. | |
| static bool | checkInitIsRequired (CodeGenFunction &CGF, ArrayRef< PrivateDataTy > Privates) |
| Check if duplication function is required for taskloops. | |
| 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) | |
| static bool | checkDestructorsRequired (const RecordDecl *KmpTaskTWithPrivatesQTyRD, ArrayRef< PrivateDataTy > Privates) |
| Checks if destructor function is required to be generated. | |
| static std::pair< llvm::Value *, llvm::Value * > | getPointerAndSize (CodeGenFunction &CGF, const Expr *E) |
| static void | getKmpAffinityType (ASTContext &C, QualType &KmpTaskAffinityInfoTy) |
| Builds kmp_depend_info, if it is not built yet, and builds flags type. | |
| static RTLDependenceKindTy | translateDependencyKind (OpenMPDependClauseKind K) |
| Translates internal dependency kind into the runtime kind. | |
| static void | getDependTypes (ASTContext &C, QualType &KmpDependInfoTy, QualType &FlagsTy) |
| Builds kmp_depend_info, if it is not built yet, and builds flags type. | |
| static void | emitDependData (CodeGenFunction &CGF, QualType &KmpDependInfoTy, llvm::PointerUnion< unsigned *, LValue * > Pos, const OMPTaskDataTy::DependData &Data, Address DependenciesArray) |
| 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. | |
| static void | emitReductionCombiner (CodeGenFunction &CGF, const Expr *ReductionOp) |
| Emit reduction combiner. | |
| static std::string | generateUniqueName (CodeGenModule &CGM, llvm::StringRef Prefix, const Expr *Ref) |
| static std::string | generateUniqueName (CodeGenModule &CGM, StringRef Prefix, const Expr *Ref) |
| Generates unique name for artificial threadprivate variables. | |
| static llvm::Value * | emitReduceInitFunction (CodeGenModule &CGM, SourceLocation Loc, ReductionCodeGen &RCG, unsigned N) |
| Emits reduction initializer function: | |
| 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: | |
| static llvm::Value * | emitReduceFiniFunction (CodeGenModule &CGM, SourceLocation Loc, ReductionCodeGen &RCG, unsigned N) |
| Emits reduction finalizer function: | |
| static RTCancelKind | getCancellationKind (OpenMPDirectiveKind CancelRegion) |
| static bool | isTrivial (ASTContext &Ctx, const Expr *E) |
| Checks if the expression is constant or does not have non-trivial function calls. | |
| static void | getNumThreads (CodeGenFunction &CGF, const CapturedStmt *CS, const Expr **E, int32_t &UpperBound, bool UpperBoundOnly, llvm::Value **CondVal) |
Check for a num threads constant value (stored in DefaultVal), or expression (stored in E). | |
| static ValueDecl * | getDeclFromThisExpr (const Expr *E) |
| static llvm::Constant * | emitMappingInformation (CodeGenFunction &CGF, llvm::OpenMPIRBuilder &OMPBuilder, MappableExprsHandler::MappingExprInfo &MapExprs) |
| Emit a string constant containing the names of the values mapped to the offloading runtime library. | |
| static void | emitOffloadingArraysAndArgs (CodeGenFunction &CGF, MappableExprsHandler::MapCombinedInfoTy &CombinedInfo, CGOpenMPRuntime::TargetDataInfo &Info, llvm::OpenMPIRBuilder &OMPBuilder, bool IsNonContiguous=false, bool ForEndCall=false) |
| Emit the arrays used to pass the captures and map information to the offloading runtime library. | |
| static const OMPExecutableDirective * | getNestedDistributeDirective (ASTContext &Ctx, const OMPExecutableDirective &D) |
| Check for inner distribute directive. | |
| static void | emitTargetCallFallback (CGOpenMPRuntime *OMPRuntime, llvm::Function *OutlinedFn, const OMPExecutableDirective &D, llvm::SmallVectorImpl< llvm::Value * > &CapturedVars, bool RequiresOuterTask, const CapturedStmt &CS, bool OffloadingMandatory, CodeGenFunction &CGF) |
| static llvm::Value * | emitDeviceID (llvm::PointerIntPair< const Expr *, 2, OpenMPDeviceClauseModifier > Device, CodeGenFunction &CGF) |
| static std::pair< llvm::Value *, OMPDynGroupprivateFallbackType > | emitDynCGroupMem (const OMPExecutableDirective &D, CodeGenFunction &CGF) |
| static void | genMapInfoForCaptures (MappableExprsHandler &MEHandler, CodeGenFunction &CGF, const CapturedStmt &CS, llvm::SmallVectorImpl< llvm::Value * > &CapturedVars, llvm::OpenMPIRBuilder &OMPBuilder, llvm::DenseSet< CanonicalDeclPtr< const Decl > > &MappedVarSet, MappableExprsHandler::MapCombinedInfoTy &CombinedInfo) |
| static void | genMapInfo (MappableExprsHandler &MEHandler, CodeGenFunction &CGF, MappableExprsHandler::MapCombinedInfoTy &CombinedInfo, llvm::OpenMPIRBuilder &OMPBuilder, const llvm::DenseSet< CanonicalDeclPtr< const Decl > > &SkippedVarSet=llvm::DenseSet< CanonicalDeclPtr< const Decl > >()) |
| static void | genMapInfo (const OMPExecutableDirective &D, CodeGenFunction &CGF, const CapturedStmt &CS, llvm::SmallVectorImpl< llvm::Value * > &CapturedVars, llvm::OpenMPIRBuilder &OMPBuilder, MappableExprsHandler::MapCombinedInfoTy &CombinedInfo) |
| template<typename ClauseTy> | |
| static void | emitClauseForBareTargetDirective (CodeGenFunction &CGF, const OMPExecutableDirective &D, llvm::SmallVectorImpl< llvm::Value * > &Values) |
| static void | emitTargetCallKernelLaunch (CGOpenMPRuntime *OMPRuntime, llvm::Function *OutlinedFn, const OMPExecutableDirective &D, llvm::SmallVectorImpl< llvm::Value * > &CapturedVars, bool RequiresOuterTask, const CapturedStmt &CS, bool OffloadingMandatory, llvm::PointerIntPair< const Expr *, 2, OpenMPDeviceClauseModifier > Device, llvm::Value *OutlinedFnID, CodeGenFunction::OMPTargetDataInfo &InputInfo, llvm::Value *&MapTypesArray, llvm::Value *&MapNamesArray, llvm::function_ref< llvm::Value *(CodeGenFunction &CGF, const OMPLoopDirective &D)> SizeEmitter, CodeGenFunction &CGF, CodeGenModule &CGM) |
| static void | emitTargetCallElse (CGOpenMPRuntime *OMPRuntime, llvm::Function *OutlinedFn, const OMPExecutableDirective &D, llvm::SmallVectorImpl< llvm::Value * > &CapturedVars, bool RequiresOuterTask, const CapturedStmt &CS, bool OffloadingMandatory, CodeGenFunction &CGF) |
| static bool | isAssumedToBeNotEmitted (const ValueDecl *VD, bool IsDevice) |
| static unsigned | evaluateCDTSize (const FunctionDecl *FD, ArrayRef< llvm::OpenMPIRBuilder::DeclareSimdAttrTy > ParamAttrs) |
| static bool | getAArch64MTV (QualType QT, llvm::OpenMPIRBuilder::DeclareSimdKindTy Kind) |
| Maps To Vector (MTV), as defined in 4.1.1 of the AAVFABI (2021Q1). | |
| static bool | getAArch64PBV (QualType QT, ASTContext &C) |
| Pass By Value (PBV), as defined in 3.1.2 of the AAVFABI. | |
| static unsigned | getAArch64LS (QualType QT, llvm::OpenMPIRBuilder::DeclareSimdKindTy Kind, ASTContext &C) |
| Computes the lane size (LS) of a return type or of an input parameter, as defined by LS(P) in 3.2.1 of the AAVFABI. | |
| static std::tuple< unsigned, unsigned, bool > | getNDSWDS (const FunctionDecl *FD, ArrayRef< llvm::OpenMPIRBuilder::DeclareSimdAttrTy > ParamAttrs) |
| static llvm::OpenMPIRBuilder::DeclareSimdBranch | convertDeclareSimdBranch (OMPDeclareSimdDeclAttr::BranchStateTy State) |
| static bool | validateAArch64Simdlen (CodeGenModule &CGM, SourceLocation SLoc, unsigned UserVLEN, unsigned WDS, char ISA) |
| template<typename T> | |
| static void | EmitDoacrossOrdered (CodeGenFunction &CGF, CodeGenModule &CGM, const T *C, llvm::Value *ULoc, llvm::Value *ThreadID) |
| static llvm::Value * | getAllocatorVal (CodeGenFunction &CGF, const Expr *Allocator) |
| Return allocator value from expression, or return a null allocator (default when no allocator specified). | |
| static llvm::Value * | getAlignmentValue (CodeGenModule &CGM, const VarDecl *VD) |
| Return the alignment from an allocate directive if present. | |
|
static |
Definition at line 1024 of file CGOpenMPRuntime.cpp.
References clang::DeclContext::addDecl(), clang::AS_public, clang::C, clang::FieldDecl::Create(), and clang::ICIS_NoInit.
Referenced by createKmpTaskTRecordDecl(), createKmpTaskTWithPrivatesRecordDecl(), createPrivatesRecordDecl(), clang::CodeGen::CGOpenMPRuntime::emitDoacrossInit(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalInit(), clang::CodeGen::CGOpenMPRuntime::emitTaskReductionInit(), getDependTypes(), and getKmpAffinityType().
|
static |
Definition at line 2586 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenModule::getLangOpts(), clang::OMPC_SCHEDULE_MODIFIER_last, and clang::OMPC_SCHEDULE_MODIFIER_unknown.
Referenced by clang::CodeGen::CGOpenMPRuntime::emitForDispatchInit(), and emitForStaticInitCall().
|
static |
Definition at line 914 of file CGOpenMPRuntime.cpp.
References clang::Addr, clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CreateMemTemp(), clang::CodeGen::CGBuilderTy::CreatePointerBitCastOrAddrSpaceCast(), clang::CodeGen::CGBuilderTy::CreateStore(), clang::CodeGen::CodeGenFunction::getContext(), clang::CodeGen::RawAddress::getElementType(), clang::QualType::getNonReferenceType(), clang::Type::getPointeeType(), clang::CodeGen::RawAddress::getPointer(), clang::CodeGen::Address::getType(), clang::ASTContext::hasSameType(), clang::CodeGen::Address::invalid(), clang::CodeGen::RawAddress::invalid(), clang::Type::isPointerType(), clang::Type::isReferenceType(), clang::CodeGen::Address::isValid(), clang::CodeGen::RawAddress::isValid(), clang::CodeGen::NotKnownNonNull, and clang::CodeGen::Address::withPointer().
Referenced by clang::CodeGen::ReductionCodeGen::adjustPrivateAddress().
|
static |
Checks if destructor function is required to be generated.
Definition at line 3618 of file CGOpenMPRuntime.cpp.
References clang::QualType::isDestructedType(), and clang::Privates.
Referenced by clang::CodeGen::CGOpenMPRuntime::emitTaskInit().
|
static |
Check if duplication function is required for taskloops.
Definition at line 3517 of file CGOpenMPRuntime.cpp.
References clang::VarDecl::getAnyInitializer(), clang::Init, clang::CodeGen::CodeGenFunction::isTrivialInitializer(), and clang::Privates.
Referenced by clang::CodeGen::CGOpenMPRuntime::emitTaskInit().
|
static |
Definition at line 1522 of file CGOpenMPRuntime.cpp.
Referenced by clang::CodeGen::CGOpenMPRuntime::getAddrOfDeclareTargetVar(), and clang::CodeGen::CGOpenMPRuntime::registerTargetGlobalVariable().
|
static |
Definition at line 12030 of file CGOpenMPRuntime.cpp.
Referenced by clang::CodeGen::CGOpenMPRuntime::emitDeclareSimdFunction().
|
static |
Definition at line 1499 of file CGOpenMPRuntime.cpp.
Referenced by clang::CodeGen::CGOpenMPRuntime::getAddrOfDeclareTargetVar(), and clang::CodeGen::CGOpenMPRuntime::registerTargetGlobalVariable().
|
static |
Definition at line 3056 of file CGOpenMPRuntime.cpp.
References addFieldToRecordDecl(), clang::C, clang::RecordDecl::completeDefinition(), clang::CodeGen::CodeGenModule::getContext(), clang::ASTContext::getIntTypeForBitwidth(), clang::isOpenMPTaskLoopDirective(), clang::TagDecl::startDefinition(), and clang::Union.
Referenced by clang::CodeGen::CGOpenMPRuntime::emitTaskInit().
|
static |
Definition at line 3102 of file CGOpenMPRuntime.cpp.
References addFieldToRecordDecl(), clang::C, clang::RecordDecl::completeDefinition(), createPrivatesRecordDecl(), clang::CodeGen::CodeGenModule::getContext(), clang::Privates, and clang::TagDecl::startDefinition().
Referenced by clang::CodeGen::CGOpenMPRuntime::emitTaskInit().
|
static |
Definition at line 3022 of file CGOpenMPRuntime.cpp.
References clang::Decl::addAttr(), addFieldToRecordDecl(), clang::C, clang::RecordDecl::completeDefinition(), clang::Decl::getAttrs(), clang::CodeGen::CodeGenModule::getContext(), clang::QualType::getNonReferenceType(), clang::ValueDecl::getType(), clang::Decl::hasAttrs(), isAllocatableDecl(), clang::Type::isLValueReferenceType(), clang::Privates, 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 2245 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::ConvertTypeForMem(), clang::CodeGen::CGBuilderTy::CreateConstArrayGEP(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CodeGenFunction::getContext(), clang::ASTContext::getDeclAlign(), and clang::ValueDecl::getType().
Referenced by emitCopyprivateCopyFunction(), and clang::CodeGen::CGOpenMPRuntime::emitReductionFunction().
|
static |
Definition at line 10858 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::C, clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::CodeGenTypeCache::Int32Ty, and V.
Referenced by emitTargetCallKernelLaunch().
|
static |
Definition at line 1082 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), clang::C, clang::CodeGen::CodeGenFunction::EmitAnyExprToMem(), clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(), clang::CodeGen::CodeGenFunction::EmitLoadOfPointerLValue(), clang::CodeGen::CodeGenFunction::FinishFunction(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::CodeGenFunction::GetAddrOfLocalVar(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::CGOpenMPRuntime::getName(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::CodeGen::CodeGenModule::getTypes(), clang::CodeGen::CodeGenFunction::isTrivialInitializer(), clang::Other, clang::CodeGenOptions::SampleProfileFile, clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), and clang::CodeGen::CodeGenFunction::StartFunction().
Referenced by clang::CodeGen::CGOpenMPRuntime::emitUserDefinedReduction().
|
static |
Definition at line 2255 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), clang::CodeGen::CodeGenFunction::Builder, clang::C, clang::cast(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CGBuilderTy::CreatePointerBitCastOrAddrSpaceCast(), emitAddrOfVarFromArray(), clang::CodeGen::CodeGenFunction::EmitOMPCopy(), clang::CodeGen::CodeGenFunction::FinishFunction(), clang::CodeGen::CodeGenFunction::GetAddrOfLocalVar(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::CGOpenMPRuntime::getName(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::Other, clang::CodeGenOptions::SampleProfileFile, clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), and clang::CodeGen::CodeGenFunction::StartFunction().
Referenced by clang::CodeGen::CGOpenMPRuntime::emitSingleRegion().
|
static |
Definition at line 4225 of file CGOpenMPRuntime.cpp.
References clang::Addr, clang::CodeGen::CodeGenFunction::Builder, clang::C, clang::cast(), clang::Type::castAsRecordDecl(), clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::ConvertTypeForMem(), clang::CodeGen::CGBuilderTy::CreateConstGEP(), clang::CodeGen::CGBuilderTy::CreateGEP(), clang::Data, clang::CodeGen::CodeGenFunction::EmitLoadOfScalar(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CodeGen::CodeGenFunction::EmitStoreOfScalar(), clang::CodeGen::CodeGenModule::getContext(), getDependTypes(), clang::Expr::getExprLoc(), getPointerAndSize(), clang::CodeGen::CodeGenTypeCache::IntPtrTy, clang::CodeGen::CodeGenFunction::MakeAddrLValue(), clang::CodeGen::CodeGenTypeCache::SizeTy, and translateDependencyKind().
Referenced by clang::CodeGen::CGOpenMPRuntime::emitDependClause(), and clang::CodeGen::CGOpenMPRuntime::emitDepobjDependClause().
|
static |
Definition at line 3235 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), clang::C, clang::Type::castAs(), clang::Type::castAsRecordDecl(), clang::CodeGen::CodeGenFunction::EmitLoadOfPointerLValue(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CodeGen::CodeGenFunction::FinishFunction(), clang::CodeGen::CodeGenFunction::GetAddrOfLocalVar(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::CGOpenMPRuntime::getName(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::CodeGen::CodeGenModule::getTypes(), clang::Other, clang::CodeGen::CodeGenFunction::pushDestroy(), clang::CodeGenOptions::SampleProfileFile, clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), clang::CodeGen::CodeGenFunction::StartFunction(), and clang::QualType::withRestrict().
Referenced by clang::CodeGen::CGOpenMPRuntime::emitTaskInit().
|
static |
Definition at line 10658 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::Device, clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::CodeGenTypeCache::Int64Ty, and clang::OMPC_DEVICE_unknown.
Referenced by emitTargetCallKernelLaunch().
|
static |
Definition at line 12334 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::C, clang::CodeGen::CGOpenMPRuntime::CGM, clang::CodeGen::CGBuilderTy::CreateConstArrayGEP(), clang::CodeGen::CodeGenFunction::CreateMemTemp(), clang::CodeGen::Address::emitRawPointer(), clang::CodeGen::CodeGenFunction::EmitRuntimeCall(), clang::CodeGen::CodeGenFunction::EmitScalarConversion(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::CodeGenFunction::EmitStoreOfScalar(), clang::ASTContext::getConstantArrayType(), clang::CodeGen::CodeGenModule::getContext(), clang::Expr::getExprLoc(), clang::ASTContext::getIntTypeForBitwidth(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::CGOpenMPRuntime::getOMPBuilder(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::Expr::getType(), clang::Normal, and clang::CodeGen::CGOpenMPRuntime::OMPBuilder.
Referenced by clang::CodeGen::CGOpenMPRuntime::emitDoacrossOrdered(), and clang::CodeGen::CGOpenMPRuntime::emitDoacrossOrdered().
|
static |
Definition at line 10677 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::CodeGenTypeCache::Int32Ty, and clang::OMPC_DYN_GROUPPRIVATE_FALLBACK_unknown.
Referenced by emitTargetCallKernelLaunch().
|
static |
Definition at line 2680 of file CGOpenMPRuntime.cpp.
References addMonoNonMonoModifier(), clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CGOpenMPRuntime::StaticRTInput::Chunk, clang::CodeGen::Address::emitRawPointer(), clang::CodeGen::CodeGenFunction::EmitRuntimeCall(), clang::CodeGen::CodeGenFunction::HaveInsertPoint(), clang::CodeGen::CGOpenMPRuntime::StaticRTInput::IL, clang::CodeGen::CGOpenMPRuntime::StaticRTInput::IVSize, clang::CodeGen::CGOpenMPRuntime::StaticRTInput::LB, clang::CodeGen::CGOpenMPRuntime::StaticRTInput::Ordered, clang::CodeGen::CGOpenMPRuntime::StaticRTInput::ST, and clang::CodeGen::CGOpenMPRuntime::StaticRTInput::UB.
Referenced by clang::CodeGen::CGOpenMPRuntime::emitDistributeStaticInit(), and clang::CodeGen::CGOpenMPRuntime::emitForStaticInit().
|
static |
Definition at line 596 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::OMPPrivateScope::addPrivate(), clang::cast(), 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::Func, clang::CodeGen::RValue::get(), clang::CodeGen::RValue::getComplex(), clang::CodeGen::CodeGenFunction::getEvaluationKind(), clang::OMPDeclareReductionDecl::getInitializer(), clang::Decl::getLocation(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::CGOpenMPRuntime::getName(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::QualType::getQualifiers(), clang::CodeGen::CGOpenMPRuntime::getUserDefinedReduction(), clang::Expr::IgnoreParenImpCasts(), clang::Init, clang::CodeGen::CodeGenFunction::MakeNaturalAlignRawAddrLValue(), clang::CodeGen::CodeGenFunction::OMPPrivateScope::Privatize(), clang::Reduction, clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, clang::CodeGen::TEK_Scalar, clang::VK_LValue, and clang::VK_PRValue.
Referenced by clang::CodeGen::ReductionCodeGen::emitInitialization(), and EmitOMPAggregateInit().
|
static |
Emit a string constant containing the names of the values mapped to the offloading runtime library.
Definition at line 10326 of file CGOpenMPRuntime.cpp.
References clang::FileName, clang::PresumedLoc::getColumn(), clang::CodeGen::CodeGenFunction::getContext(), clang::CodeGen::CodeGenFunction::getDebugInfo(), getDeclFromThisExpr(), clang::PresumedLoc::getFilename(), clang::ASTContext::getLangOpts(), clang::PresumedLoc::getLine(), clang::Decl::getLocation(), clang::SourceManager::getPresumedLoc(), and clang::ASTContext::getSourceManager().
Referenced by clang::CodeGen::CGOpenMPRuntime::emitTargetDataCalls(), clang::CodeGen::CGOpenMPRuntime::emitUserDefinedMapper(), and genMapInfo().
|
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 10364 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::AllocaInsertPt, clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CGOpenMPRuntime::TargetDataInfo::CaptureDeviceAddrMap, clang::cast(), clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenModule::getOpenMPRuntime(), and clang::CodeGen::CGOpenMPRuntime::getOrCreateUserDefinedMapperFunc().
Referenced by emitTargetCallKernelLaunch(), and clang::CodeGen::CGOpenMPRuntime::emitTargetDataStandAloneCall().
|
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 655 of file CGOpenMPRuntime.cpp.
References clang::CharUnits::alignmentOfArrayElement(), clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::createBasicBlock(), clang::CodeGen::CGBuilderTy::CreateGEP(), clang::CodeGen::CodeGenFunction::EmitAnyExprToMem(), clang::CodeGen::CodeGenFunction::emitArrayLength(), clang::CodeGen::CodeGenFunction::EmitBlock(), emitInitWithReductionInitializer(), clang::CodeGen::Address::emitRawPointer(), clang::CodeGen::Address::getAlignment(), clang::Type::getAsArrayTypeUnsafe(), clang::CodeGen::CodeGenFunction::getContext(), clang::CodeGen::Address::getElementType(), clang::QualType::getQualifiers(), clang::ASTContext::getTypeSizeInChars(), clang::Init, 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 4872 of file CGOpenMPRuntime.cpp.
References clang::CharUnits::alignmentOfArrayElement(), clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::createBasicBlock(), clang::CodeGen::CGBuilderTy::CreateGEP(), clang::CodeGen::CodeGenFunction::emitArrayLength(), clang::CodeGen::CodeGenFunction::EmitBlock(), clang::CodeGen::Address::emitRawPointer(), clang::CodeGen::CodeGenFunction::GetAddrOfLocalVar(), clang::CodeGen::Address::getAlignment(), clang::Type::getAsArrayTypeUnsafe(), clang::CodeGen::CodeGenFunction::getContext(), clang::CodeGen::Address::getElementType(), and clang::ASTContext::getTypeSizeInChars().
Referenced by clang::CodeGen::CGOpenMPRuntime::emitReduction(), clang::CodeGen::CGOpenMPRuntime::emitReductionFunction(), and clang::CodeGen::CGOpenMPRuntime::emitSingleReductionCombiner().
|
static |
Definition at line 1217 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedStmtFunction(), clang::CodeGen::CGOpenMPRuntime::getOMPBuilder(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::ValueDecl::getType(), and clang::Type::isPointerType().
Referenced by clang::CodeGen::CGOpenMPRuntime::emitParallelOutlinedFunction(), and clang::CodeGen::CGOpenMPRuntime::emitTeamsOutlinedFunction().
|
static |
Emit initialization for private variables in task-based directives.
Definition at line 3398 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::C, clang::cast(), clang::CodeGen::CodeGenFunction::ConvertTypeForMem(), clang::CodeGen::CGBuilderTy::CreatePointerBitCastOrAddrSpaceCast(), clang::CodeGen::CodeGenFunction::CurCodeDecl, clang::Data, clang::CodeGen::Decl, clang::CodeGen::CodeGenFunction::EmitAggregateAssign(), clang::CodeGen::CodeGenFunction::EmitExprAsInit(), clang::CodeGen::CodeGenFunction::EmitLValue(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CodeGen::CodeGenFunction::EmitOMPAggregateAssign(), clang::RecordDecl::field_begin(), clang::CodeGen::CodeGenFunction::GetAddrOfLocalVar(), clang::VarDecl::getAnyInitializer(), clang::CodeGen::CodeGenFunction::getContext(), clang::Decl::getDeclContext(), clang::Init, clang::isa(), clang::Type::isArrayType(), clang::isOpenMPTargetDataManagementDirective(), clang::isOpenMPTargetExecutionDirective(), clang::isOpenMPTaskLoopDirective(), clang::CodeGen::CodeGenFunction::isTrivialInitializer(), clang::CodeGen::Address::isValid(), clang::CodeGen::CodeGenFunction::LambdaCaptureFields, clang::CodeGen::CodeGenFunction::CGCapturedStmtInfo::lookup(), clang::CodeGen::CodeGenFunction::MakeAddrLValue(), and clang::Privates.
Referenced by emitTaskDupFunction(), and clang::CodeGen::CGOpenMPRuntime::emitTaskInit().
|
static |
Emit a proxy function which accepts kmp_task_t as the second argument.
Definition at line 3130 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), clang::CodeGen::CodeGenFunction::Builder, clang::C, clang::Type::castAs(), clang::Type::castAsRecordDecl(), clang::CodeGen::CodeGenFunction::ConvertTypeForMem(), clang::CodeGen::CGBuilderTy::CreatePointerBitCastOrAddrSpaceCast(), clang::CodeGen::CodeGenFunction::EmitLoadOfPointerLValue(), clang::CodeGen::CodeGenFunction::EmitLoadOfScalar(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CodeGen::CGOpenMPRuntime::emitOutlinedFunctionCall(), clang::CodeGen::Address::emitRawPointer(), clang::CodeGen::CodeGenFunction::EmitStoreThroughLValue(), clang::CodeGen::CodeGenFunction::FinishFunction(), clang::CodeGen::RValue::get(), clang::CodeGen::CodeGenFunction::GetAddrOfLocalVar(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::CGOpenMPRuntime::getName(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::CodeGen::CodeGenModule::getTypes(), clang::CodeGen::CodeGenTypeCache::Int8Ty, clang::isOpenMPTaskLoopDirective(), clang::CodeGen::CodeGenFunction::MakeAddrLValue(), clang::Other, clang::CodeGen::CodeGenFunction::ReturnValue, clang::CodeGenOptions::SampleProfileFile, clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), clang::CodeGen::CodeGenFunction::StartFunction(), clang::CodeGen::CodeGenTypeCache::VoidPtrTy, and clang::QualType::withRestrict().
Referenced by clang::CodeGen::CGOpenMPRuntime::emitTaskInit().
|
static |
Emits reduction combiner function:
Definition at line 5752 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::OMPPrivateScope::addPrivate(), clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), clang::CodeGen::CodeGenFunction::Builder, clang::C, clang::cast(), clang::CodeGen::ReductionCodeGen::emitAggregateType(), clang::CodeGen::CodeGenFunction::EmitLoadOfPointer(), clang::CodeGen::CodeGenFunction::EmitLoadOfScalar(), clang::CodeGen::CGOpenMPRuntime::emitSingleReductionCombiner(), clang::CodeGen::CodeGenFunction::FinishFunction(), generateUniqueName(), clang::CodeGen::CGOpenMPRuntime::getAddrOfArtificialThreadPrivate(), clang::CodeGen::CodeGenFunction::GetAddrOfLocalVar(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::CGOpenMPRuntime::getName(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::CodeGen::ReductionCodeGen::getRefExpr(), clang::CodeGen::ReductionCodeGen::getSizes(), clang::ASTContext::getSizeType(), clang::CodeGen::CodeGenModule::getTypes(), clang::Other, clang::CodeGen::CodeGenFunction::OMPPrivateScope::Privatize(), clang::CodeGenOptions::SampleProfileFile, clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), clang::CodeGen::CodeGenFunction::StartFunction(), and clang::CodeGen::Address::withElementType().
Referenced by clang::CodeGen::CGOpenMPRuntime::emitTaskReductionInit().
|
static |
Emits reduction finalizer function:
Definition at line 5828 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), clang::C, clang::CodeGen::ReductionCodeGen::emitAggregateType(), clang::CodeGen::ReductionCodeGen::emitCleanups(), clang::CodeGen::CodeGenFunction::EmitLoadOfPointer(), clang::CodeGen::CodeGenFunction::EmitLoadOfScalar(), clang::CodeGen::CodeGenFunction::FinishFunction(), generateUniqueName(), clang::CodeGen::CGOpenMPRuntime::getAddrOfArtificialThreadPrivate(), clang::CodeGen::CodeGenFunction::GetAddrOfLocalVar(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::CGOpenMPRuntime::getName(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::CodeGen::ReductionCodeGen::getRefExpr(), clang::CodeGen::ReductionCodeGen::getSizes(), clang::ASTContext::getSizeType(), clang::CodeGen::CodeGenModule::getTypes(), clang::CodeGen::ReductionCodeGen::needCleanups(), clang::Other, clang::CodeGenOptions::SampleProfileFile, clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), and clang::CodeGen::CodeGenFunction::StartFunction().
Referenced by clang::CodeGen::CGOpenMPRuntime::emitTaskReductionInit().
|
static |
Emits reduction initializer function:
Definition at line 5683 of file CGOpenMPRuntime.cpp.
References clang::QualType::addRestrict(), clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), clang::CodeGen::CodeGenFunction::Builder, clang::C, clang::CanQual< T >::castAs(), clang::CodeGen::ReductionCodeGen::emitAggregateType(), clang::CodeGen::ReductionCodeGen::emitInitialization(), clang::CodeGen::CodeGenFunction::EmitLoadOfPointer(), clang::CodeGen::CodeGenFunction::EmitLoadOfScalar(), clang::CodeGen::CodeGenFunction::FinishFunction(), generateUniqueName(), clang::CodeGen::CGOpenMPRuntime::getAddrOfArtificialThreadPrivate(), clang::CodeGen::CodeGenFunction::GetAddrOfLocalVar(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::CGOpenMPRuntime::getName(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::CodeGen::ReductionCodeGen::getPrivateType(), clang::CodeGen::ReductionCodeGen::getRefExpr(), clang::CodeGen::ReductionCodeGen::getSizes(), clang::ASTContext::getSizeType(), clang::CodeGen::CodeGenModule::getTypes(), clang::CodeGen::Address::invalid(), clang::Other, clang::CodeGenOptions::SampleProfileFile, clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), clang::CodeGen::CodeGenFunction::StartFunction(), clang::CodeGen::ReductionCodeGen::usesReductionInitializer(), clang::ASTContext::VoidPtrTy, and clang::CodeGen::Address::withElementType().
Referenced by clang::CodeGen::CGOpenMPRuntime::emitTaskReductionInit().
|
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 4949 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(), clang::Func, clang::CodeGen::RValue::get(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::CodeGen::CGOpenMPRuntime::getUserDefinedReduction(), and clang::Reduction.
Referenced by clang::CodeGen::CGOpenMPRuntime::emitPrivateReduction(), clang::CodeGen::CGOpenMPRuntime::emitReduction(), clang::CodeGen::CGOpenMPRuntime::emitReductionFunction(), and clang::CodeGen::CGOpenMPRuntime::emitSingleReductionCombiner().
|
static |
Definition at line 11000 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CGOpenMPRuntime::emitInlinedDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTargetTaskBasedDirective(), and emitTargetCallFallback().
Referenced by clang::CodeGen::CGOpenMPRuntime::emitTargetCall().
|
static |
Definition at line 10638 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CGOpenMPRuntime::emitOutlinedFunctionCall(), and clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedVars().
Referenced by emitTargetCallElse(), and emitTargetCallKernelLaunch().
|
static |
Definition at line 10872 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::AllocaInsertPt, clang::CodeGen::CodeGenFunction::OMPTargetDataInfo::BasePointersArray, clang::CodeGen::CodeGenFunction::Builder, clang::Device, emitClauseForBareTargetDirective(), emitDeviceID(), emitDynCGroupMem(), clang::CodeGen::CGOpenMPRuntime::emitInlinedDirective(), clang::CodeGen::CGOpenMPRuntime::emitNumTeamsForTargetDirective(), clang::CodeGen::CGOpenMPRuntime::emitNumThreadsForTargetDirective(), emitOffloadingArraysAndArgs(), clang::CodeGen::CodeGenFunction::EmitOMPTargetTaskBasedDirective(), emitTargetCallFallback(), clang::CodeGen::CGOpenMPRuntime::emitTargetNumIterationsCall(), clang::CodeGen::CGOpenMPRuntime::emitUpdateLocation(), genMapInfo(), clang::CodeGen::CGOpenMPRuntime::getOMPBuilder(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), clang::CodeGen::CodeGenTypeCache::Int64Ty, clang::CodeGen::CodeGenFunction::OMPTargetDataInfo::MappersArray, clang::CodeGen::CodeGenFunction::OMPTargetDataInfo::NumberOfTargetItems, clang::CodeGen::CodeGenFunction::OMPTargetDataInfo::PointersArray, clang::CodeGen::CodeGenFunction::OMPTargetDataInfo::SizesArray, and clang::CodeGen::CodeGenTypeCache::VoidPtrTy.
Referenced by clang::CodeGen::CGOpenMPRuntime::emitTargetCall().
|
static |
Emit task_dup function (for initialization of private/firstprivate/lastprivate vars and last_iter flag)
Definition at line 3545 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), clang::C, clang::Type::castAs(), clang::Data, 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::CodeGenFunction::GetAddrOfLocalVar(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::CGOpenMPRuntime::getName(), clang::CodeGen::CodeGenModule::getNaturalTypeAlignment(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::CodeGen::CodeGenModule::getTypes(), clang::CodeGen::CodeGenTypeCache::Int8Ty, clang::CodeGen::Address::invalid(), clang::Other, clang::Privates, clang::CodeGenOptions::SampleProfileFile, clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), and clang::CodeGen::CodeGenFunction::StartFunction().
Referenced by clang::CodeGen::CGOpenMPRuntime::emitTaskInit().
|
static |
Emit a privates mapping function for correct handling of private and firstprivate variables.
Definition at line 3296 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), clang::C, clang::cast(), clang::Type::castAs(), clang::Type::castAsRecordDecl(), clang::ImplicitParamDecl::Create(), clang::Data, clang::CodeGen::CodeGenFunction::EmitLoadOfPointerLValue(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CodeGen::CodeGenFunction::EmitStoreOfScalar(), clang::CodeGen::CodeGenFunction::FinishFunction(), clang::CodeGen::CodeGenFunction::GetAddrOfLocalVar(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::CGOpenMPRuntime::getName(), clang::QualType::getNonReferenceType(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), isAllocatableDecl(), clang::Type::isLValueReferenceType(), clang::CodeGen::CodeGenFunction::MakeAddrLValue(), clang::Other, clang::Privates, clang::CodeGenOptions::SampleProfileFile, clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), and clang::CodeGen::CodeGenFunction::StartFunction().
Referenced by clang::CodeGen::CGOpenMPRuntime::emitTaskInit().
|
static |
Definition at line 11868 of file CGOpenMPRuntime.cpp.
References clang::C, clang::Decl::getASTContext(), clang::Type::getCanonicalTypeUnqualified(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::CXXMethodDecl::getParent(), clang::FunctionDecl::getReturnType(), clang::ValueDecl::getType(), clang::QualType::isNull(), clang::Type::isRecordType(), clang::Type::isUnionType(), and clang::Type::isVoidType().
Referenced by clang::CodeGen::CGOpenMPRuntime::emitDeclareSimdFunction().
|
static |
|
static |
Generates unique name for artificial threadprivate variables.
Format is: <Prefix> "." <Decl_mangled_name> "_" "<Decl_start_loc_raw_enc>"
Definition at line 5659 of file CGOpenMPRuntime.cpp.
References clang::cast(), getBaseDecl(), clang::DeclaratorDecl::getBeginLoc(), clang::VarDecl::getCanonicalDecl(), clang::CodeGen::CodeGenModule::getMangledName(), clang::CodeGen::CGOpenMPRuntime::getName(), clang::NamedDecl::getName(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::SourceLocation::getRawEncoding(), and clang::VarDecl::isLocalVarDeclOrParm().
|
static |
Definition at line 10842 of file CGOpenMPRuntime.cpp.
References genMapInfo(), and genMapInfoForCaptures().
|
static |
Definition at line 10820 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::CGM, emitMappingInformation(), and clang::CodeGen::CodeGenModule::getCodeGenOpts().
Referenced by emitTargetCallKernelLaunch(), clang::CodeGen::CGOpenMPRuntime::emitTargetDataStandAloneCall(), and genMapInfo().
|
static |
Definition at line 10714 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CapturedStmt::capture_begin(), clang::CapturedStmt::capture_end(), clang::CapturedStmt::Capture::capturesThis(), clang::CapturedStmt::Capture::capturesVariable(), clang::CapturedStmt::Capture::capturesVariableArrayType(), clang::RecordDecl::field_begin(), clang::VarDecl::getCanonicalDecl(), clang::CapturedStmt::getCapturedRecordDecl(), clang::CapturedStmt::Capture::getCapturedVar(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenFunction::getTypeSize(), clang::CodeGen::CodeGenTypeCache::Int64Ty, and clang::nullptr.
Referenced by genMapInfo().
|
static |
Computes the lane size (LS) of a return type or of an input parameter, as defined by LS(P) in 3.2.1 of the AAVFABI.
TODO: Add support for references, section 3.2.1, item 1.
Definition at line 11977 of file CGOpenMPRuntime.cpp.
References clang::C, getAArch64MTV(), getAArch64PBV(), clang::QualType::getCanonicalType(), clang::Type::getPointeeType(), and clang::Type::isPointerType().
Referenced by getNDSWDS().
Maps To Vector (MTV), as defined in 4.1.1 of the AAVFABI (2021Q1).
Definition at line 11929 of file CGOpenMPRuntime.cpp.
References clang::QualType::getCanonicalType(), clang::Type::isReferenceType(), and clang::Type::isVoidType().
Referenced by getAArch64LS(), and getNDSWDS().
|
static |
Pass By Value (PBV), as defined in 3.1.2 of the AAVFABI.
Definition at line 11952 of file CGOpenMPRuntime.cpp.
References clang::C, clang::QualType::getCanonicalType(), clang::Type::isFloatingType(), clang::Type::isIntegerType(), and clang::Type::isPointerType().
Referenced by getAArch64LS(), and getNDSWDS().
|
static |
Return the alignment from an allocate directive if present.
Definition at line 12437 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CGOpenMPRuntime::CGM, clang::CodeGen::CodeGenModule::getOMPAllocateAlignment(), and clang::CodeGen::CodeGenTypeCache::SizeTy.
Referenced by clang::CodeGen::CGOpenMPRuntime::getAddressOfLocalVariable().
|
static |
Return allocator value from expression, or return a null allocator (default when no allocator specified).
Definition at line 12418 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenTypes::ConvertType(), clang::CodeGen::CodeGenFunction::EmitScalarConversion(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::CodeGenFunction::getContext(), clang::Expr::getExprLoc(), clang::Expr::getType(), clang::CodeGen::CodeGenModule::getTypes(), and clang::ASTContext::VoidPtrTy.
Referenced by clang::CodeGen::CGOpenMPRuntime::getAddressOfLocalVariable().
|
static |
Definition at line 943 of file CGOpenMPRuntime.cpp.
References clang::cast(), and clang::DeclRefExpr::getDecl().
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPTargetDataDirective(), clang::CodeGen::CodeGenFunction::EmitOMPUseDeviceAddrClause(), and generateUniqueName().
|
static |
Definition at line 6126 of file CGOpenMPRuntime.cpp.
Referenced by clang::CodeGen::CGOpenMPRuntime::emitCancelCall(), and clang::CodeGen::CGOpenMPRuntime::emitCancellationPointCall().
Definition at line 10312 of file CGOpenMPRuntime.cpp.
References clang::Expr::IgnoreParenCasts().
Referenced by emitMappingInformation().
|
static |
Builds kmp_depend_info, if it is not built yet, and builds flags type.
Definition at line 4185 of file CGOpenMPRuntime.cpp.
References addFieldToRecordDecl(), clang::C, clang::RecordDecl::completeDefinition(), clang::QualType::isNull(), and clang::TagDecl::startDefinition().
Referenced by clang::CodeGen::CGOpenMPRuntime::emitDependClause(), emitDependData(), clang::CodeGen::CGOpenMPRuntime::emitDepobjDependClause(), clang::CodeGen::CGOpenMPRuntime::emitDestroyClause(), clang::CodeGen::CGOpenMPRuntime::emitUpdateClause(), and clang::CodeGen::CGOpenMPRuntime::getDepobjElements().
|
static |
Definition at line 1544 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenModule::getContext(), clang::PresumedLoc::getFilename(), clang::CodeGen::CodeGenModule::getFileSystem(), clang::PresumedLoc::getLine(), clang::ASTContext::getSourceManager(), and SM.
Referenced by clang::CodeGen::CGOpenMPRuntime::emitDeclareTargetFunction(), clang::CodeGen::CGOpenMPRuntime::emitTargetOutlinedFunctionHelper(), clang::CodeGen::CGOpenMPRuntime::getAddrOfDeclareTargetVar(), clang::CodeGen::CGOpenMPRuntime::registerTargetGlobalVariable(), clang::CodeGen::CGOpenMPRuntime::registerVTableOffloadEntry(), and clang::CodeGen::CGOpenMPRuntime::scanForTargetRegionsFunctions().
|
static |
Definition at line 1359 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::CurFuncDecl, clang::PresumedLoc::getColumn(), clang::CodeGen::CodeGenFunction::getContext(), clang::CodeGen::CodeGenFunction::getDebugInfo(), clang::PresumedLoc::getFilename(), clang::PresumedLoc::getLine(), clang::SourceManager::getPresumedLoc(), and clang::ASTContext::getSourceManager().
Referenced by clang::CodeGen::CGOpenMPRuntime::getThreadID().
|
static |
Builds kmp_depend_info, if it is not built yet, and builds flags type.
Definition at line 3741 of file CGOpenMPRuntime.cpp.
References addFieldToRecordDecl(), clang::C, clang::RecordDecl::completeDefinition(), clang::QualType::isNull(), and clang::TagDecl::startDefinition().
Referenced by clang::CodeGen::CGOpenMPRuntime::emitTaskInit().
|
static |
Definition at line 11995 of file CGOpenMPRuntime.cpp.
References clang::C, getAArch64LS(), getAArch64MTV(), getAArch64PBV(), clang::Decl::getASTContext(), clang::QualType::getCanonicalType(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::FunctionDecl::getReturnType(), clang::ValueDecl::getType(), and clang::Type::isVoidType().
Referenced by clang::CodeGen::CGOpenMPRuntime::emitDeclareSimdFunction().
|
static |
Check for inner distribute directive.
Definition at line 10398 of file CGOpenMPRuntime.cpp.
References clang::CapturedStmt::getCapturedStmt(), clang::CodeGen::CGOpenMPRuntime::getSingleCompoundChild(), clang::Stmt::IgnoreContainers(), and clang::isOpenMPDistributeDirective().
Referenced by clang::CodeGen::CGOpenMPRuntime::emitTargetNumIterationsCall().
|
static |
Check for a num threads constant value (stored in DefaultVal), or expression (stored in E).
If the value is conditional (via an if-clause), store the condition in CondVal. If E, and CondVal respectively, are nullptr, no expression evaluation is perfomed.
Definition at line 6629 of file CGOpenMPRuntime.cpp.
References clang::C, clang::cast(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), clang::CodeGen::CodeGenFunction::EmitAutoVarCleanups(), clang::CodeGen::CodeGenFunction::EmitVarDecl(), clang::Expr::EvaluateAsBooleanCondition(), clang::CodeGen::CodeGenFunction::EvaluateExprAsBool(), clang::CapturedStmt::getCapturedStmt(), clang::OMPIfClause::getCondition(), clang::CodeGen::CodeGenFunction::getContext(), clang::OMPClauseWithPreInit::getPreInitStmt(), clang::CodeGen::CGOpenMPRuntime::getSingleCompoundChild(), clang::Stmt::getSourceRange(), clang::isOpenMPParallelDirective(), and clang::isOpenMPSimdDirective().
Referenced by clang::CodeGen::CGOpenMPRuntime::getNumThreadsExprForTargetDirective().
|
static |
Definition at line 3707 of file CGOpenMPRuntime.cpp.
References clang::Addr, clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::EmitArraySectionExpr(), clang::CodeGen::CodeGenFunction::EmitLValue(), clang::CodeGen::Address::emitRawPointer(), clang::CodeGen::CodeGenFunction::EmitScalarConversion(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::CodeGenFunction::getContext(), clang::CodeGen::Address::getElementType(), clang::CodeGen::LValue::getPointer(), clang::ASTContext::getSizeType(), clang::Expr::getType(), clang::CodeGen::CodeGenFunction::getTypeSize(), and clang::Expr::IgnoreParenImpCasts().
Referenced by emitDependData(), and clang::CodeGen::CGOpenMPRuntime::emitTaskInit().
|
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 586 of file CGOpenMPRuntime.cpp.
Referenced by clang::CodeGen::ReductionCodeGen::emitInitialization(), clang::CodeGen::CGOpenMPRuntime::emitPrivateReduction(), and clang::CodeGen::ReductionCodeGen::usesReductionInitializer().
|
static |
Map the OpenMP distribute schedule to the runtime enumeration.
Definition at line 2548 of file CGOpenMPRuntime.cpp.
|
static |
Map the OpenMP loop schedule to the runtime enumeration.
Definition at line 2525 of file CGOpenMPRuntime.cpp.
References clang::OMPC_SCHEDULE_unknown.
Referenced by clang::CodeGen::CGOpenMPRuntime::emitDistributeStaticInit(), clang::CodeGen::CGOpenMPRuntime::emitForDispatchInit(), clang::CodeGen::CGOpenMPRuntime::emitForStaticInit(), clang::CodeGen::CGOpenMPRuntime::isDynamic(), clang::CodeGen::CGOpenMPRuntime::isStaticChunked(), clang::CodeGen::CGOpenMPRuntime::isStaticChunked(), clang::CodeGen::CGOpenMPRuntime::isStaticNonchunked(), and clang::CodeGen::CGOpenMPRuntime::isStaticNonchunked().
Definition at line 3011 of file CGOpenMPRuntime.cpp.
References clang::Decl::getAttr(), clang::VarDecl::getCanonicalDecl(), and clang::Decl::hasAttr().
Referenced by createPrivatesRecordDecl(), clang::CodeGen::CodeGenFunction::EmitOMPTaskBasedDirective(), clang::CodeGen::CGOpenMPRuntime::emitTaskInit(), emitTaskPrivateMappingFunction(), clang::CodeGen::CGOpenMPRuntime::getAddressOfLocalVariable(), and clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::getAddressOfLocalVariable().
Definition at line 11258 of file CGOpenMPRuntime.cpp.
Referenced by clang::CodeGen::CGOpenMPRuntime::emitTargetFunctions(), and clang::CodeGen::CGOpenMPRuntime::emitTargetGlobalVariable().
|
static |
Checks if the expression is constant or does not have non-trivial function calls.
Definition at line 6405 of file CGOpenMPRuntime.cpp.
References clang::Expr::hasNonTrivialCall(), clang::Expr::HasSideEffects(), clang::Expr::isEvaluatable(), and clang::Expr::SE_AllowUndefinedBehavior.
Referenced by clang::CodeGen::CGOpenMPRuntime::getSingleCompoundChild(), and clang::TextNodeDumper::VisitCXXRecordDecl().
|
static |
Definition at line 895 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::ConvertTypeForMem(), clang::CodeGen::CodeGenFunction::EmitLoadOfPointerLValue(), clang::CodeGen::CodeGenFunction::EmitLoadOfReferenceLValue(), clang::Type::getAs(), clang::CodeGen::CodeGenFunction::getContext(), clang::QualType::getNonReferenceType(), clang::Type::getPointeeType(), clang::CodeGen::CodeGenModule::getTBAAInfoForSubobject(), clang::ASTContext::hasSameType(), clang::Type::isPointerType(), clang::Type::isReferenceType(), and clang::CodeGen::CodeGenFunction::MakeAddrLValue().
Referenced by clang::CodeGen::ReductionCodeGen::adjustPrivateAddress().
|
static |
Translates internal dependency kind into the runtime kind.
Definition at line 4154 of file CGOpenMPRuntime.cpp.
References clang::OMPC_DEPEND_unknown.
Referenced by emitDependData(), and clang::CodeGen::CGOpenMPRuntime::emitUpdateClause().
|
static |
Definition at line 12043 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CGOpenMPRuntime::CGM, clang::CodeGen::CodeGenModule::getDiags(), and clang::DiagnosticsEngine::Report().
Referenced by clang::CodeGen::CGOpenMPRuntime::emitDeclareSimdFunction().