class CGOpenMPRuntime
Declaration
class CGOpenMPRuntime { /* full declaration omitted */ };
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:228
Member Variables
- protected clang::CodeGen::CodeGenModule& CGM
- protected llvm::StringRef FirstSeparator
- protected llvm::StringRef Separator
- protected llvm::OpenMPIRBuilder OMPBuilder
- An OpenMP-IR-Builder instance.
- private clang::CodeGen::CGOpenMPRuntime:: OpenMPDebugLocMapTy OpenMPDebugLocMap
- private llvm::FunctionType* Kmpc_MicroTy = nullptr
- The type for a microtask which gets passed to __kmpc_fork_call(). Original representation is: typedef void (kmpc_micro)(kmp_int32 global_tid, kmp_int32 bound_tid,...);
- private clang::CodeGen::CGOpenMPRuntime:: OpenMPLocThreadIDMapTy OpenMPLocThreadIDMap
- private clang::CodeGen::CGOpenMPRuntime::UDRMapTy UDRMap
- private clang::CodeGen::CGOpenMPRuntime::FunctionUDRMapTy FunctionUDRMap
- private llvm::DenseMap<const OMPDeclareMapperDecl*, llvm::Function*> UDMMap
- Map from the user-defined mapper declaration to its corresponding functions.
- private clang::CodeGen::CGOpenMPRuntime::FunctionUDMMapTy FunctionUDMMap
- private llvm::DenseMap< llvm::Function*, llvm::DenseMap<CanonicalDeclPtr<const Decl>, std::tuple<QualType, const FieldDecl*, const FieldDecl*, LValue>>> LastprivateConditionalToTypes
- Maps local variables marked as lastprivate conditional to their internal types.
- private llvm::DenseMap<llvm::Function*, unsigned int> FunctionToUntiedTaskStackMap
- Maps function to the position of the untied task locals stack.
- private llvm::ArrayType* KmpCriticalNameTy
- Type kmp_critical_name, originally defined as typedef kmp_int32 kmp_critical_name[8];
- private llvm::StringMap< llvm::AssertingVH<llvm::GlobalVariable>, llvm::BumpPtrAllocator> InternalVars
- An ordered map of auto-generated variables to their unique names. It stores variables with the following names: 1) ".gomp_critical_user_" + <critical _section_name> + ".var" for "omp critical" directives; 2) <mangled _name_for_global_var> + ".cache." for cache for threadprivate variables.
- private llvm::Type* KmpRoutineEntryPtrTy = nullptr
- Type typedef kmp_int32 (* kmp_routine_entry_t)(kmp_int32, void *);
- private clang::QualType KmpRoutineEntryPtrQTy
- private clang::QualType KmpTaskTQTy
- Type typedef struct kmp_task { void * shareds; /** < pointer to block of pointers to shared vars */ kmp_routine_entry_t routine; /** < pointer to routine to call for executing task */ kmp_int32 part_id; /** < part id for the task */ kmp_routine_entry_t destructors; /* pointer to function to invoke deconstructors of firstprivate C++ objects */ } kmp_task_t;
- private clang::QualType SavedKmpTaskTQTy
- Saved kmp_task_t for task directive.
- private clang::QualType SavedKmpTaskloopTQTy
- Saved kmp_task_t for taskloop-based directive.
- private clang::QualType KmpDependInfoTy
- Type typedef struct kmp_depend_info { kmp_intptr_t base_addr; size_t len; struct { bool in:1; bool out:1; } flags; } kmp_depend_info_t;
- private clang::QualType KmpTaskAffinityInfoTy
- Type typedef struct kmp_task_affinity_info { kmp_intptr_t base_addr; size_t len; struct { bool flag1 : 1; bool flag2 : 1; kmp_int32 reserved : 30; } flags; } kmp_task_affinity_info_t;
- private clang::QualType KmpDimTy
- struct kmp_dim { // loop bounds info casted to kmp_int64 kmp_int64 lo; // lower kmp_int64 up; // upper kmp_int64 st; // stride };
- private clang::CodeGen::CGOpenMPRuntime:: OffloadEntriesInfoManagerTy OffloadEntriesInfoManager
- private bool ShouldMarkAsGlobal = true
- private llvm::DenseSet<CanonicalDeclPtr<const Decl>> AlreadyEmittedTargetDecls
- List of the emitted declarations.
- private llvm::StringMap<llvm::WeakTrackingVH> EmittedNonTargetVariables
- List of the global variables with their addresses that should not be emitted for the target.
- private llvm::SmallDenseSet<const VarDecl*> DeferredGlobalVariables
- List of variables that can become declare target implicitly and, thus, must be emitted.
- private llvm::SmallVector<NontemporalDeclsSet, 4> NontemporalDeclsStack
- Stack for list of declarations in current context marked as nontemporal. The set is the union of all current stack elements.
- private llvm::SmallVector<UntiedLocalVarsAddressesMap, 4> UntiedLocalVarsStack
- private llvm::SmallVector<LastprivateConditionalData, 4> LastprivateConditionalStack
- Stack for list of addresses of declarations in current context marked as lastprivate conditional. The set is the union of all current stack elements.
- Flag for keeping track of weather a requires unified_shared_memory directive is present.
- private llvm::AtomicOrdering RequiresAtomicOrdering = llvm::AtomicOrdering::Monotonic
- Atomic ordering from the omp requires directive.
- private bool HasEmittedTargetRegion = false
- Flag for keeping track of weather a target region has been emitted.
- private bool HasEmittedDeclareTargetRegion = false
- Flag for keeping track of weather a device routine has been emitted. Device routines are specific to the
- private llvm::StringSet<> ThreadPrivateWithDefinition
- Set of threadprivate variables with the generated initializer.
- private llvm::StringSet<> DeclareTargetWithDefinition
- Set of declare target variables with the generated initializer.
Method Overview
- protected CGOpenMPRuntime(clang::CodeGen::CodeGenModule & CGM, llvm::StringRef FirstSeparator, llvm::StringRef Separator)
- public CGOpenMPRuntime(clang::CodeGen::CodeGenModule & CGM)
- public virtual void adjustTargetSpecificDataForLambdas(clang::CodeGen::CodeGenFunction & CGF, const clang::OMPExecutableDirective & D) const
- public virtual void checkAndEmitLastprivateConditional(clang::CodeGen::CodeGenFunction & CGF, const clang::Expr * LHS)
- public virtual void checkAndEmitSharedLastprivateConditional(clang::CodeGen::CodeGenFunction & CGF, const clang::OMPExecutableDirective & D, const llvm::DenseSet<CanonicalDeclPtr<const VarDecl>> & IgnoredDecls)
- public virtual void clear()
- protected void clearLocThreadIdInsertPt(clang::CodeGen::CodeGenFunction & CGF)
- private llvm::FunctionCallee createDispatchFiniFunction(unsigned int IVSize, bool IVSigned)
- private llvm::FunctionCallee createDispatchInitFunction(unsigned int IVSize, bool IVSigned)
- private llvm::FunctionCallee createDispatchNextFunction(unsigned int IVSize, bool IVSigned)
- private llvm::FunctionCallee createForStaticInitFunction(unsigned int IVSize, bool IVSigned, bool IsGPUDistribute)
- public void createOffloadEntriesAndInfoMetadata()
- protected virtual void createOffloadEntry(llvm::Constant * ID, llvm::Constant * Addr, uint64_t Size, int32_t Flags, llvm::GlobalValue::LinkageTypes Linkage)
- public virtual void emitBarrierCall(clang::CodeGen::CodeGenFunction & CGF, clang::SourceLocation Loc, clang::OpenMPDirectiveKind Kind, bool EmitChecks = true, bool ForceSimpleCall = false)
- protected void emitCall(clang::CodeGen::CodeGenFunction & CGF, clang::SourceLocation Loc, llvm::FunctionCallee Callee, ArrayRef<llvm::Value *> Args = llvm::None) const
- public virtual void emitCancelCall(clang::CodeGen::CodeGenFunction & CGF, clang::SourceLocation Loc, const clang::Expr * IfCond, clang::OpenMPDirectiveKind CancelRegion)
- public virtual void emitCancellationPointCall(clang::CodeGen::CodeGenFunction & CGF, clang::SourceLocation Loc, clang::OpenMPDirectiveKind CancelRegion)
- public virtual void emitCriticalRegion(clang::CodeGen::CodeGenFunction & CGF, llvm::StringRef CriticalName, const clang::CodeGen::RegionCodeGenTy & CriticalOpGen, clang::SourceLocation Loc, const clang::Expr * Hint = nullptr)
- public virtual void emitDeclareSimdFunction(const clang::FunctionDecl * FD, llvm::Function * Fn)
- public virtual bool emitDeclareTargetVarDefinition(const clang::VarDecl * VD, llvm::GlobalVariable * Addr, bool PerformInit)
- public void emitDeferredTargetDecls() const
- public std::pair<llvm::Value *, Address> emitDependClause(clang::CodeGen::CodeGenFunction & CGF, ArrayRef<OMPTaskDataTy::DependData> Dependencies, clang::SourceLocation Loc)
- public clang::CodeGen::Address emitDepobjDependClause(clang::CodeGen::CodeGenFunction & CGF, const OMPTaskDataTy::DependData & Dependencies, clang::SourceLocation Loc)
- private void emitDepobjElements(clang::CodeGen::CodeGenFunction & CGF, clang::QualType & KmpDependInfoTy, clang::CodeGen::LValue PosLVal, const OMPTaskDataTy::DependData & Data, clang::CodeGen::Address DependenciesArray)
- private SmallVector<llvm::Value *, 4> emitDepobjElementsSizes(clang::CodeGen::CodeGenFunction & CGF, clang::QualType & KmpDependInfoTy, const OMPTaskDataTy::DependData & Data)
- public void emitDestroyClause(clang::CodeGen::CodeGenFunction & CGF, clang::CodeGen::LValue DepobjLVal, clang::SourceLocation Loc)
- public virtual void emitDistributeStaticInit(clang::CodeGen::CodeGenFunction & CGF, clang::SourceLocation Loc, clang::OpenMPDistScheduleClauseKind SchedKind, const clang::CodeGen::CGOpenMPRuntime::StaticRTInput & Values)
- public virtual void emitDoacrossInit(clang::CodeGen::CodeGenFunction & CGF, const clang::OMPLoopDirective & D, ArrayRef<clang::Expr *> NumIterations)
- public virtual void emitDoacrossOrdered(clang::CodeGen::CodeGenFunction & CGF, const clang::OMPDependClause * C)
- public virtual void emitFlush(clang::CodeGen::CodeGenFunction & CGF, ArrayRef<const clang::Expr *> Vars, clang::SourceLocation Loc, llvm::AtomicOrdering AO)
- public virtual void emitForDispatchInit(clang::CodeGen::CodeGenFunction & CGF, clang::SourceLocation Loc, const clang::OpenMPScheduleTy & ScheduleKind, unsigned int IVSize, bool IVSigned, bool Ordered, const clang::CodeGen::CGOpenMPRuntime::DispatchRTInput & DispatchValues)
- public virtual llvm::Value * emitForNext(clang::CodeGen::CodeGenFunction & CGF, clang::SourceLocation Loc, unsigned int IVSize, bool IVSigned, clang::CodeGen::Address IL, clang::CodeGen::Address LB, clang::CodeGen::Address UB, clang::CodeGen::Address ST)
- public virtual void emitForOrderedIterationEnd(clang::CodeGen::CodeGenFunction & CGF, clang::SourceLocation Loc, unsigned int IVSize, bool IVSigned)
- public virtual void emitForStaticFinish(clang::CodeGen::CodeGenFunction & CGF, clang::SourceLocation Loc, clang::OpenMPDirectiveKind DKind)
- public virtual void emitForStaticInit(clang::CodeGen::CodeGenFunction & CGF, clang::SourceLocation Loc, clang::OpenMPDirectiveKind DKind, const clang::OpenMPScheduleTy & ScheduleKind, const clang::CodeGen::CGOpenMPRuntime::StaticRTInput & Values)
- public virtual void emitFunctionProlog(clang::CodeGen::CodeGenFunction & CGF, const clang::Decl * D)
- public void emitIfClause(clang::CodeGen::CodeGenFunction & CGF, const clang::Expr * Cond, const clang::CodeGen::RegionCodeGenTy & ThenGen, const clang::CodeGen::RegionCodeGenTy & ElseGen)
- public virtual void emitInlinedDirective(clang::CodeGen::CodeGenFunction & CGF, clang::OpenMPDirectiveKind InnermostKind, const clang::CodeGen::RegionCodeGenTy & CodeGen, bool HasCancel = false)
- private void emitKmpRoutineEntryT(clang::QualType KmpInt32Ty)
- public virtual void emitLastprivateConditionalFinalUpdate(clang::CodeGen::CodeGenFunction & CGF, clang::CodeGen::LValue PrivLVal, const clang::VarDecl * VD, clang::SourceLocation Loc)
- public clang::CodeGen::Address emitLastprivateConditionalInit(clang::CodeGen::CodeGenFunction & CGF, const clang::VarDecl * VD)
- private void emitLastprivateConditionalUpdate(clang::CodeGen::CodeGenFunction & CGF, clang::CodeGen::LValue IVLVal, llvm::StringRef UniqueDeclName, clang::CodeGen::LValue LVal, clang::SourceLocation Loc)
- public virtual void emitMaskedRegion(clang::CodeGen::CodeGenFunction & CGF, const clang::CodeGen::RegionCodeGenTy & MaskedOpGen, clang::SourceLocation Loc, const clang::Expr * Filter = nullptr)
- public virtual void emitMasterRegion(clang::CodeGen::CodeGenFunction & CGF, const clang::CodeGen::RegionCodeGenTy & MasterOpGen, clang::SourceLocation Loc)
- public virtual void emitNumTeamsClause(clang::CodeGen::CodeGenFunction & CGF, const clang::Expr * NumTeams, const clang::Expr * ThreadLimit, clang::SourceLocation Loc)
- protected llvm::Value * emitNumTeamsForTargetDirective(clang::CodeGen::CodeGenFunction & CGF, const clang::OMPExecutableDirective & D)
- public virtual void emitNumThreadsClause(clang::CodeGen::CodeGenFunction & CGF, llvm::Value * NumThreads, clang::SourceLocation Loc)
- protected llvm::Value * emitNumThreadsForTargetDirective(clang::CodeGen::CodeGenFunction & CGF, const clang::OMPExecutableDirective & D)
- public virtual void emitOrderedRegion(clang::CodeGen::CodeGenFunction & CGF, const clang::CodeGen::RegionCodeGenTy & OrderedOpGen, clang::SourceLocation Loc, bool IsThreads)
- public virtual void emitOutlinedFunctionCall(clang::CodeGen::CodeGenFunction & CGF, clang::SourceLocation Loc, llvm::FunctionCallee OutlinedFn, ArrayRef<llvm::Value *> Args = llvm::None) const
- public virtual void emitParallelCall(clang::CodeGen::CodeGenFunction & CGF, clang::SourceLocation Loc, llvm::Function * OutlinedFn, ArrayRef<llvm::Value *> CapturedVars, const clang::Expr * IfCond, llvm::Value * NumThreads)
- public virtual llvm::Function * emitParallelOutlinedFunction(const clang::OMPExecutableDirective & D, const clang::VarDecl * ThreadIDVar, clang::OpenMPDirectiveKind InnermostKind, const clang::CodeGen::RegionCodeGenTy & CodeGen)
- public virtual void emitProcBindClause(clang::CodeGen::CodeGenFunction & CGF, llvm::omp::ProcBindKind ProcBind, clang::SourceLocation Loc)
- public virtual void emitReduction(clang::CodeGen::CodeGenFunction & CGF, clang::SourceLocation Loc, ArrayRef<const clang::Expr *> Privates, ArrayRef<const clang::Expr *> LHSExprs, ArrayRef<const clang::Expr *> RHSExprs, ArrayRef<const clang::Expr *> ReductionOps, clang::CodeGen::CGOpenMPRuntime::ReductionOptionsTy Options)
- public llvm::Function * emitReductionFunction(clang::SourceLocation Loc, llvm::Type * ArgsElemType, ArrayRef<const clang::Expr *> Privates, ArrayRef<const clang::Expr *> LHSExprs, ArrayRef<const clang::Expr *> RHSExprs, ArrayRef<const clang::Expr *> ReductionOps)
- public llvm::Function * emitRequiresDirectiveRegFun()
- public void emitSingleReductionCombiner(clang::CodeGen::CodeGenFunction & CGF, const clang::Expr * ReductionOp, const clang::Expr * PrivateRef, const clang::DeclRefExpr * LHS, const clang::DeclRefExpr * RHS)
- public virtual void emitSingleRegion(clang::CodeGen::CodeGenFunction & CGF, const clang::CodeGen::RegionCodeGenTy & SingleOpGen, clang::SourceLocation Loc, ArrayRef<const clang::Expr *> CopyprivateVars, ArrayRef<const clang::Expr *> DestExprs, ArrayRef<const clang::Expr *> SrcExprs, ArrayRef<const clang::Expr *> AssignmentOps)
- public virtual void emitTargetCall(clang::CodeGen::CodeGenFunction & CGF, const clang::OMPExecutableDirective & D, llvm::Function * OutlinedFn, llvm::Value * OutlinedFnID, const clang::Expr * IfCond, llvm::PointerIntPair<const Expr *, 2, OpenMPDeviceClauseModifier> Device, llvm::function_ref<llvm::Value *(CodeGenFunction &, const OMPLoopDirective &)> SizeEmitter)
- public virtual void emitTargetDataCalls(clang::CodeGen::CodeGenFunction & CGF, const clang::OMPExecutableDirective & D, const clang::Expr * IfCond, const clang::Expr * Device, const clang::CodeGen::RegionCodeGenTy & CodeGen, clang::CodeGen::CGOpenMPRuntime::TargetDataInfo & Info)
- public virtual void emitTargetDataStandAloneCall(clang::CodeGen::CodeGenFunction & CGF, const clang::OMPExecutableDirective & D, const clang::Expr * IfCond, const clang::Expr * Device)
- public virtual bool emitTargetFunctions(clang::GlobalDecl GD)
- public virtual bool emitTargetGlobal(clang::GlobalDecl GD)
- public virtual bool emitTargetGlobalVariable(clang::GlobalDecl GD)
- private llvm::Value * emitTargetNumIterationsCall(clang::CodeGen::CodeGenFunction & CGF, const clang::OMPExecutableDirective & D, llvm::function_ref<llvm::Value *(CodeGenFunction &, const OMPLoopDirective &)> SizeEmitter)
- public virtual void emitTargetOutlinedFunction(const clang::OMPExecutableDirective & D, llvm::StringRef ParentName, llvm::Function *& OutlinedFn, llvm::Constant *& OutlinedFnID, bool IsOffloadEntry, const clang::CodeGen::RegionCodeGenTy & CodeGen)
- protected virtual void emitTargetOutlinedFunctionHelper(const clang::OMPExecutableDirective & D, llvm::StringRef ParentName, llvm::Function *& OutlinedFn, llvm::Constant *& OutlinedFnID, bool IsOffloadEntry, const clang::CodeGen::RegionCodeGenTy & CodeGen)
- public virtual void emitTaskCall(clang::CodeGen::CodeGenFunction & CGF, clang::SourceLocation Loc, const clang::OMPExecutableDirective & D, llvm::Function * TaskFunction, clang::QualType SharedsTy, clang::CodeGen::Address Shareds, const clang::Expr * IfCond, const clang::CodeGen::OMPTaskDataTy & Data)
- private clang::CodeGen::CGOpenMPRuntime::TaskResultTy emitTaskInit(clang::CodeGen::CodeGenFunction & CGF, clang::SourceLocation Loc, const clang::OMPExecutableDirective & D, llvm::Function * TaskFunction, clang::QualType SharedsTy, clang::CodeGen::Address Shareds, const clang::CodeGen::OMPTaskDataTy & Data)
- public virtual void emitTaskLoopCall(clang::CodeGen::CodeGenFunction & CGF, clang::SourceLocation Loc, const clang::OMPLoopDirective & D, llvm::Function * TaskFunction, clang::QualType SharedsTy, clang::CodeGen::Address Shareds, const clang::Expr * IfCond, const clang::CodeGen::OMPTaskDataTy & Data)
- public virtual llvm::Function * emitTaskOutlinedFunction(const clang::OMPExecutableDirective & D, const clang::VarDecl * ThreadIDVar, const clang::VarDecl * PartIDVar, const clang::VarDecl * TaskTVar, clang::OpenMPDirectiveKind InnermostKind, const clang::CodeGen::RegionCodeGenTy & CodeGen, bool Tied, unsigned int & NumberOfParts)
- public virtual void emitTaskReductionFini(clang::CodeGen::CodeGenFunction & CGF, clang::SourceLocation Loc, bool IsWorksharingReduction)
- public virtual void emitTaskReductionFixups(clang::CodeGen::CodeGenFunction & CGF, clang::SourceLocation Loc, clang::CodeGen::ReductionCodeGen & RCG, unsigned int N)
- public virtual llvm::Value * emitTaskReductionInit(clang::CodeGen::CodeGenFunction & CGF, clang::SourceLocation Loc, ArrayRef<const clang::Expr *> LHSExprs, ArrayRef<const clang::Expr *> RHSExprs, const clang::CodeGen::OMPTaskDataTy & Data)
- public virtual void emitTaskgroupRegion(clang::CodeGen::CodeGenFunction & CGF, const clang::CodeGen::RegionCodeGenTy & TaskgroupOpGen, clang::SourceLocation Loc)
- public virtual void emitTaskwaitCall(clang::CodeGen::CodeGenFunction & CGF, clang::SourceLocation Loc, const clang::CodeGen::OMPTaskDataTy & Data)
- public virtual void emitTaskyieldCall(clang::CodeGen::CodeGenFunction & CGF, clang::SourceLocation Loc)
- public virtual void emitTeamsCall(clang::CodeGen::CodeGenFunction & CGF, const clang::OMPExecutableDirective & D, clang::SourceLocation Loc, llvm::Function * OutlinedFn, ArrayRef<llvm::Value *> CapturedVars)
- public virtual llvm::Function * emitTeamsOutlinedFunction(const clang::OMPExecutableDirective & D, const clang::VarDecl * ThreadIDVar, clang::OpenMPDirectiveKind InnermostKind, const clang::CodeGen::RegionCodeGenTy & CodeGen)
- protected virtual clang::CodeGen::Address emitThreadIDAddress(clang::CodeGen::CodeGenFunction & CGF, clang::SourceLocation Loc)
- public virtual llvm::Function * emitThreadPrivateVarDefinition(const clang::VarDecl * VD, clang::CodeGen::Address VDAddr, clang::SourceLocation Loc, bool PerformInit, clang::CodeGen::CodeGenFunction * CGF = nullptr)
- private void emitThreadPrivateVarInit(clang::CodeGen::CodeGenFunction & CGF, clang::CodeGen::Address VDAddr, llvm::Value * Ctor, llvm::Value * CopyCtor, llvm::Value * Dtor, clang::SourceLocation Loc)
- private void emitUDMapperArrayInitOrDel(clang::CodeGen::CodeGenFunction & MapperCGF, llvm::Value * Handle, llvm::Value * BasePtr, llvm::Value * Ptr, llvm::Value * Size, llvm::Value * MapType, llvm::Value * MapName, clang::CharUnits ElementSize, llvm::BasicBlock * ExitBB, bool IsInit)
- public void emitUpdateClause(clang::CodeGen::CodeGenFunction & CGF, clang::CodeGen::LValue DepobjLVal, clang::OpenMPDependClauseKind NewDepKind, clang::SourceLocation Loc)
- protected llvm::Value * emitUpdateLocation(clang::CodeGen::CodeGenFunction & CGF, clang::SourceLocation Loc, unsigned int Flags = 0)
- public void emitUserDefinedMapper(const clang::OMPDeclareMapperDecl * D, clang::CodeGen::CodeGenFunction * CGF = nullptr)
- public virtual void emitUserDefinedReduction(clang::CodeGen::CodeGenFunction * CGF, const clang::OMPDeclareReductionDecl * D)
- public void emitUsesAllocatorsFini(clang::CodeGen::CodeGenFunction & CGF, const clang::Expr * Allocator)
- public void emitUsesAllocatorsInit(clang::CodeGen::CodeGenFunction & CGF, const clang::Expr * Allocator, const clang::Expr * AllocatorTraits)
- public virtual void functionFinished(clang::CodeGen::CodeGenFunction & CGF)
- public virtual clang::CodeGen::Address getAddrOfArtificialThreadPrivate(clang::CodeGen::CodeGenFunction & CGF, clang::QualType VarType, llvm::StringRef Name)
- public virtual clang::CodeGen::Address getAddrOfDeclareTargetVar(const clang::VarDecl * VD)
- public virtual clang::CodeGen::Address getAddrOfThreadPrivate(clang::CodeGen::CodeGenFunction & CGF, const clang::VarDecl * VD, clang::CodeGen::Address VDAddr, clang::SourceLocation Loc)
- public virtual clang::CodeGen::Address getAddressOfLocalVariable(clang::CodeGen::CodeGenFunction & CGF, const clang::VarDecl * VD)
- protected llvm::Value * getCriticalRegionLock(llvm::StringRef CriticalName)
- public virtual void getDefaultDistScheduleAndChunk(clang::CodeGen::CodeGenFunction & CGF, const clang::OMPLoopDirective & S, clang::OpenMPDistScheduleClauseKind & ScheduleKind, llvm::Value *& Chunk) const
- protected static unsigned int getDefaultFlagsForBarriers(clang::OpenMPDirectiveKind Kind)
- protected virtual unsigned int getDefaultLocationReserved2Flags() const
- public llvm::AtomicOrdering getDefaultMemoryOrdering() const
- public virtual void getDefaultScheduleAndChunk(clang::CodeGen::CodeGenFunction & CGF, const clang::OMPLoopDirective & S, clang::OpenMPScheduleClauseKind & ScheduleKind, const clang::Expr *& ChunkExpr) const
- private std::pair<llvm::Value *, LValue> getDepobjElements(clang::CodeGen::CodeGenFunction & CGF, clang::CodeGen::LValue DepobjLVal, clang::SourceLocation Loc)
- protected llvm::Type * getIdentTyPointerTy()
- protected llvm::ArrayType * getKmpCriticalNameTy() const
- private llvm::Type * getKmpc_MicroPointerTy()
- public std::string getName(ArrayRef<llvm::StringRef> Parts) const
- protected const clang::Expr * getNumTeamsExprForTargetDirective(clang::CodeGen::CodeGenFunction & CGF, const clang::OMPExecutableDirective & D, int32_t & DefaultVal)
- protected const clang::Expr * getNumThreadsExprForTargetDirective(clang::CodeGen::CodeGenFunction & CGF, const clang::OMPExecutableDirective & D, int32_t & DefaultVal)
- public llvm::OpenMPIRBuilder & getOMPBuilder()
- private llvm::GlobalVariable * getOrCreateInternalVariable(llvm::Type * Ty, const llvm::Twine & Name, unsigned int AddressSpace = 0)
- private llvm::Constant * getOrCreateThreadPrivateCache(const clang::VarDecl * VD)
- public llvm::Function * getOrCreateUserDefinedMapperFunc(const clang::OMPDeclareMapperDecl * D)
- protected virtual llvm::StringRef getOutlinedHelperName() const
- public virtual clang::CodeGen::Address getParameterAddress(clang::CodeGen::CodeGenFunction & CGF, const clang::VarDecl * NativeParam, const clang::VarDecl * TargetParam) const
- public static const clang::Stmt * getSingleCompoundChild(clang::ASTContext & Ctx, const clang::Stmt * Body)
- public virtual clang::CodeGen::Address getTaskReductionItem(clang::CodeGen::CodeGenFunction & CGF, clang::SourceLocation Loc, llvm::Value * ReductionsPtr, clang::CodeGen::LValue SharedLVal)
- protected llvm::Value * getThreadID(clang::CodeGen::CodeGenFunction & CGF, clang::SourceLocation Loc)
- public virtual std::pair<llvm::Function *, llvm::Function *> getUserDefinedReduction(const clang::OMPDeclareReductionDecl * D)
- public virtual bool hasAllocateAttributeForGlobalVar(const clang::VarDecl * VD, clang::LangAS & AS)
- public bool hasRequiresUnifiedSharedMemory() const
- protected virtual bool isDefaultLocationConstant() const
- public virtual bool isDynamic(clang::OpenMPScheduleClauseKind ScheduleKind) const
- public bool isLocalVarInUntiedTask(clang::CodeGen::CodeGenFunction & CGF, const clang::VarDecl * VD) const
- public bool isNontemporalDecl(const clang::ValueDecl * VD) const
- public virtual bool isStaticChunked(clang::OpenMPScheduleClauseKind ScheduleKind, bool Chunked) const
- public virtual bool isStaticChunked(clang::OpenMPDistScheduleClauseKind ScheduleKind, bool Chunked) const
- public virtual bool isStaticNonchunked(clang::OpenMPScheduleClauseKind ScheduleKind, bool Chunked) const
- public virtual bool isStaticNonchunked(clang::OpenMPDistScheduleClauseKind ScheduleKind, bool Chunked) const
- private void loadOffloadInfoMetadata()
- public bool markAsGlobalTarget(clang::GlobalDecl GD)
- public virtual void processRequiresDirective(const clang::OMPRequiresDecl * D)
- public virtual void registerTargetGlobalVariable(const clang::VarDecl * VD, llvm::Constant * Addr)
- private void scanForTargetRegionsFunctions(const clang::Stmt * S, llvm::StringRef ParentName)
- protected void setLocThreadIdInsertPt(clang::CodeGen::CodeGenFunction & CGF, bool AtCurrentPoint = false)
- public virtual const clang::VarDecl * translateParameter(const clang::FieldDecl * FD, const clang::VarDecl * NativeParam) const
- public virtual ~CGOpenMPRuntime()
Methods
¶CGOpenMPRuntime(
clang::CodeGen::CodeGenModule& CGM,
llvm::StringRef FirstSeparator,
llvm::StringRef Separator)
CGOpenMPRuntime(
clang::CodeGen::CodeGenModule& CGM,
llvm::StringRef FirstSeparator,
llvm::StringRef Separator)
Description
Constructor allowing to redefine the name separator for the variables.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:315
Parameters
- clang::CodeGen::CodeGenModule& CGM
- llvm::StringRef FirstSeparator
- llvm::StringRef Separator
¶CGOpenMPRuntime(
clang::CodeGen::CodeGenModule& CGM)
CGOpenMPRuntime(
clang::CodeGen::CodeGenModule& CGM)
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:918
Parameters
¶virtual void adjustTargetSpecificDataForLambdas(
clang::CodeGen::CodeGenFunction& CGF,
const clang::OMPExecutableDirective& D) const
virtual void adjustTargetSpecificDataForLambdas(
clang::CodeGen::CodeGenFunction& CGF,
const clang::OMPExecutableDirective& D) const
Description
Adjust some parameters for the target-based directives, like addresses of the variables captured by reference in lambdas.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1815
Parameters
¶virtual void checkAndEmitLastprivateConditional(
clang::CodeGen::CodeGenFunction& CGF,
const clang::Expr* LHS)
virtual void checkAndEmitLastprivateConditional(
clang::CodeGen::CodeGenFunction& CGF,
const clang::Expr* LHS)
Description
Checks if the provided \p LVal is lastprivate conditional and emits the code to update the value of the original variable.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1854
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- const clang::Expr* LHS
¶virtual void
checkAndEmitSharedLastprivateConditional(
clang::CodeGen::CodeGenFunction& CGF,
const clang::OMPExecutableDirective& D,
const llvm::DenseSet<
CanonicalDeclPtr<const VarDecl>>&
IgnoredDecls)
virtual void
checkAndEmitSharedLastprivateConditional(
clang::CodeGen::CodeGenFunction& CGF,
const clang::OMPExecutableDirective& D,
const llvm::DenseSet<
CanonicalDeclPtr<const VarDecl>>&
IgnoredDecls)
Description
Checks if the lastprivate conditional was updated in inner region and writes the value.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1877
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- const clang::OMPExecutableDirective& D
- const llvm::DenseSet< CanonicalDeclPtr<const VarDecl>>& IgnoredDecls
¶virtual void clear()
virtual void clear()
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:921
¶void clearLocThreadIdInsertPt(
clang::CodeGen::CodeGenFunction& CGF)
void clearLocThreadIdInsertPt(
clang::CodeGen::CodeGenFunction& CGF)
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:398
Parameters
¶llvm::FunctionCallee createDispatchFiniFunction(
unsigned int IVSize,
bool IVSigned)
llvm::FunctionCallee createDispatchFiniFunction(
unsigned int IVSize,
bool IVSigned)
Description
Returns __kmpc_dispatch_fini_* runtime function for the specified size \a IVSize and sign \a IVSigned.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:807
Parameters
- unsigned int IVSize
- bool IVSigned
¶llvm::FunctionCallee createDispatchInitFunction(
unsigned int IVSize,
bool IVSigned)
llvm::FunctionCallee createDispatchInitFunction(
unsigned int IVSize,
bool IVSigned)
Description
Returns __kmpc_dispatch_init_* runtime function for the specified size \a IVSize and sign \a IVSigned.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:797
Parameters
- unsigned int IVSize
- bool IVSigned
¶llvm::FunctionCallee createDispatchNextFunction(
unsigned int IVSize,
bool IVSigned)
llvm::FunctionCallee createDispatchNextFunction(
unsigned int IVSize,
bool IVSigned)
Description
Returns __kmpc_dispatch_next_* runtime function for the specified size \a IVSize and sign \a IVSigned.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:802
Parameters
- unsigned int IVSize
- bool IVSigned
¶llvm::FunctionCallee createForStaticInitFunction(
unsigned int IVSize,
bool IVSigned,
bool IsGPUDistribute)
llvm::FunctionCallee createForStaticInitFunction(
unsigned int IVSize,
bool IVSigned,
bool IsGPUDistribute)
Description
Returns __kmpc_for_static_init_* runtime function for the specified size \a IVSize and sign \a IVSigned. Will create a distribute call __kmpc_distribute_static_init* if \a IsGPUDistribute is set.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:791
Parameters
- unsigned int IVSize
- bool IVSigned
- bool IsGPUDistribute
¶void createOffloadEntriesAndInfoMetadata()
void createOffloadEntriesAndInfoMetadata()
Description
Creates all the offload entries in the current compilation unit along with the associated metadata.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1632
¶virtual void createOffloadEntry(
llvm::Constant* ID,
llvm::Constant* Addr,
uint64_t Size,
int32_t Flags,
llvm::GlobalValue::LinkageTypes Linkage)
virtual void createOffloadEntry(
llvm::Constant* ID,
llvm::Constant* Addr,
uint64_t Size,
int32_t Flags,
llvm::GlobalValue::LinkageTypes Linkage)
Description
Creates offloading entry for the provided entry ID \a ID, address \a Addr, size \a Size, and flags \a Flags.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:320
Parameters
- llvm::Constant* ID
- llvm::Constant* Addr
- uint64_t Size
- int32_t Flags
- llvm::GlobalValue::LinkageTypes Linkage
¶virtual void emitBarrierCall(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc,
clang::OpenMPDirectiveKind Kind,
bool EmitChecks = true,
bool ForceSimpleCall = false)
virtual void emitBarrierCall(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc,
clang::OpenMPDirectiveKind Kind,
bool EmitChecks = true,
bool ForceSimpleCall = false)
Description
Emit an implicit/explicit barrier for OpenMP threads.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1084
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- clang::SourceLocation Loc
- clang::OpenMPDirectiveKind Kind
- Directive for which this implicit barrier call must be generated. Must be OMPD_barrier for explicit barrier generation.
- bool EmitChecks = true
- true if need to emit checks for cancellation barriers.
- bool ForceSimpleCall = false
- true simple barrier call must be emitted, false if runtime class decides which one to emit (simple or with cancellation checks).
¶void emitCall(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc,
llvm::FunctionCallee Callee,
ArrayRef<llvm::Value*> Args =
llvm::None) const
void emitCall(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc,
llvm::FunctionCallee Callee,
ArrayRef<llvm::Value*> Args =
llvm::None) const
Description
Emits \p Callee function call with arguments \p Args with location \p Loc.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:388
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- clang::SourceLocation Loc
- llvm::FunctionCallee Callee
- ArrayRef<llvm::Value*> Args = llvm::None
¶virtual void emitCancelCall(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc,
const clang::Expr* IfCond,
clang::OpenMPDirectiveKind CancelRegion)
virtual void emitCancelCall(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc,
const clang::Expr* IfCond,
clang::OpenMPDirectiveKind CancelRegion)
Description
Emit code for 'cancel' construct.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1565
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- clang::SourceLocation Loc
- const clang::Expr* IfCond
- Condition in the associated 'if' clause, if it was specified, nullptr otherwise.
- clang::OpenMPDirectiveKind CancelRegion
- Region kind for which the cancel must be emitted.
¶virtual void emitCancellationPointCall(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc,
clang::OpenMPDirectiveKind CancelRegion)
virtual void emitCancellationPointCall(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc,
clang::OpenMPDirectiveKind CancelRegion)
Description
Emit code for 'cancellation point' construct.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1556
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- clang::SourceLocation Loc
- clang::OpenMPDirectiveKind CancelRegion
- Region kind for which the cancellation point must be emitted.
¶virtual void emitCriticalRegion(
clang::CodeGen::CodeGenFunction& CGF,
llvm::StringRef CriticalName,
const clang::CodeGen::RegionCodeGenTy&
CriticalOpGen,
clang::SourceLocation Loc,
const clang::Expr* Hint = nullptr)
virtual void emitCriticalRegion(
clang::CodeGen::CodeGenFunction& CGF,
llvm::StringRef CriticalName,
const clang::CodeGen::RegionCodeGenTy&
CriticalOpGen,
clang::SourceLocation Loc,
const clang::Expr* Hint = nullptr)
Description
Emits a critical region.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1028
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- llvm::StringRef CriticalName
- Name of the critical region.
- const clang::CodeGen::RegionCodeGenTy& CriticalOpGen
- Generator for the statement associated with the given critical region.
- clang::SourceLocation Loc
- const clang::Expr* Hint = nullptr
- Value of the 'hint' clause (optional).
¶virtual void emitDeclareSimdFunction(
const clang::FunctionDecl* FD,
llvm::Function* Fn)
virtual void emitDeclareSimdFunction(
const clang::FunctionDecl* FD,
llvm::Function* Fn)
Description
Marks function \a Fn with properly mangled versions of vector functions.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1748
Parameters
- const clang::FunctionDecl* FD
- Function marked as 'declare simd'.
- llvm::Function* Fn
- LLVM function that must be marked with 'declare simd' attributes.
¶virtual bool emitDeclareTargetVarDefinition(
const clang::VarDecl* VD,
llvm::GlobalVariable* Addr,
bool PerformInit)
virtual bool emitDeclareTargetVarDefinition(
const clang::VarDecl* VD,
llvm::GlobalVariable* Addr,
bool PerformInit)
Description
Emit a code for initialization of declare target variable.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1310
Parameters
- const clang::VarDecl* VD
- Declare target variable.
- llvm::GlobalVariable* Addr
- Address of the global variable \a VD.
- bool PerformInit
- true if initialization expression is not constant.
¶void emitDeferredTargetDecls() const
void emitDeferredTargetDecls() const
Description
Emit deferred declare target variables marked for deferred emission.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1810
¶std::pair<llvm::Value*, Address> emitDependClause(
clang::CodeGen::CodeGenFunction& CGF,
ArrayRef<OMPTaskDataTy::DependData>
Dependencies,
clang::SourceLocation Loc)
std::pair<llvm::Value*, Address> emitDependClause(
clang::CodeGen::CodeGenFunction& CGF,
ArrayRef<OMPTaskDataTy::DependData>
Dependencies,
clang::SourceLocation Loc)
Description
Emits list of dependecies based on the provided data (array of dependence/expression pairs).
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1894
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- ArrayRef<OMPTaskDataTy::DependData> Dependencies
- clang::SourceLocation Loc
Returns
Pointer to the first element of the array casted to VoidPtr type.
¶clang::CodeGen::Address emitDepobjDependClause(
clang::CodeGen::CodeGenFunction& CGF,
const OMPTaskDataTy::DependData& Dependencies,
clang::SourceLocation Loc)
clang::CodeGen::Address emitDepobjDependClause(
clang::CodeGen::CodeGenFunction& CGF,
const OMPTaskDataTy::DependData& Dependencies,
clang::SourceLocation Loc)
Description
Emits list of dependecies based on the provided data (array of dependence/expression pairs) for depobj construct. In this case, the variable is allocated in dynamically.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1902
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- const OMPTaskDataTy::DependData& Dependencies
- clang::SourceLocation Loc
Returns
Pointer to the first element of the array casted to VoidPtr type.
¶void emitDepobjElements(
clang::CodeGen::CodeGenFunction& CGF,
clang::QualType& KmpDependInfoTy,
clang::CodeGen::LValue PosLVal,
const OMPTaskDataTy::DependData& Data,
clang::CodeGen::Address DependenciesArray)
void emitDepobjElements(
clang::CodeGen::CodeGenFunction& CGF,
clang::QualType& KmpDependInfoTy,
clang::CodeGen::LValue PosLVal,
const OMPTaskDataTy::DependData& Data,
clang::CodeGen::Address DependenciesArray)
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:913
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- clang::QualType& KmpDependInfoTy
- clang::CodeGen::LValue PosLVal
- const OMPTaskDataTy::DependData& Data
- clang::CodeGen::Address DependenciesArray
¶SmallVector<llvm::Value*, 4>
emitDepobjElementsSizes(
clang::CodeGen::CodeGenFunction& CGF,
clang::QualType& KmpDependInfoTy,
const OMPTaskDataTy::DependData& Data)
SmallVector<llvm::Value*, 4>
emitDepobjElementsSizes(
clang::CodeGen::CodeGenFunction& CGF,
clang::QualType& KmpDependInfoTy,
const OMPTaskDataTy::DependData& Data)
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:910
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- clang::QualType& KmpDependInfoTy
- const OMPTaskDataTy::DependData& Data
¶void emitDestroyClause(
clang::CodeGen::CodeGenFunction& CGF,
clang::CodeGen::LValue DepobjLVal,
clang::SourceLocation Loc)
void emitDestroyClause(
clang::CodeGen::CodeGenFunction& CGF,
clang::CodeGen::LValue DepobjLVal,
clang::SourceLocation Loc)
Description
Emits the code to destroy the dependency object provided in depobj directive.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1908
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- clang::CodeGen::LValue DepobjLVal
- clang::SourceLocation Loc
¶virtual void emitDistributeStaticInit(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc,
clang::OpenMPDistScheduleClauseKind SchedKind,
const clang::CodeGen::CGOpenMPRuntime::
StaticRTInput& Values)
virtual void emitDistributeStaticInit(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc,
clang::OpenMPDistScheduleClauseKind SchedKind,
const clang::CodeGen::CGOpenMPRuntime::
StaticRTInput& Values)
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1218
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- Reference to current CodeGenFunction.
- clang::SourceLocation Loc
- Clang source location.
- clang::OpenMPDistScheduleClauseKind SchedKind
- Schedule kind, specified by the 'dist_schedule' clause.
- const clang::CodeGen::CGOpenMPRuntime:: StaticRTInput& Values
- Input arguments for the construct.
¶virtual void emitDoacrossInit(
clang::CodeGen::CodeGenFunction& CGF,
const clang::OMPLoopDirective& D,
ArrayRef<clang::Expr*> NumIterations)
virtual void emitDoacrossInit(
clang::CodeGen::CodeGenFunction& CGF,
const clang::OMPLoopDirective& D,
ArrayRef<clang::Expr*> NumIterations)
Description
Emit initialization for doacross loop nesting support.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1753
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- const clang::OMPLoopDirective& D
- Loop-based construct used in doacross nesting construct.
- ArrayRef<clang::Expr*> NumIterations
¶virtual void emitDoacrossOrdered(
clang::CodeGen::CodeGenFunction& CGF,
const clang::OMPDependClause* C)
virtual void emitDoacrossOrdered(
clang::CodeGen::CodeGenFunction& CGF,
const clang::OMPDependClause* C)
Description
Emit code for doacross ordered directive with 'depend' clause.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1758
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- const clang::OMPDependClause* C
- 'depend' clause with 'sink|source' dependency kind.
¶virtual void emitFlush(
clang::CodeGen::CodeGenFunction& CGF,
ArrayRef<const clang::Expr*> Vars,
clang::SourceLocation Loc,
llvm::AtomicOrdering AO)
virtual void emitFlush(
clang::CodeGen::CodeGenFunction& CGF,
ArrayRef<const clang::Expr*> Vars,
clang::SourceLocation Loc,
llvm::AtomicOrdering AO)
Description
Emit flush of the variables specified in 'omp flush' directive.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1324
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- ArrayRef<const clang::Expr*> Vars
- List of variables to flush.
- clang::SourceLocation Loc
- llvm::AtomicOrdering AO
¶virtual void emitForDispatchInit(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc,
const clang::OpenMPScheduleTy& ScheduleKind,
unsigned int IVSize,
bool IVSigned,
bool Ordered,
const clang::CodeGen::CGOpenMPRuntime::
DispatchRTInput& DispatchValues)
virtual void emitForDispatchInit(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc,
const clang::OpenMPScheduleTy& ScheduleKind,
unsigned int IVSize,
bool IVSigned,
bool Ordered,
const clang::CodeGen::CGOpenMPRuntime::
DispatchRTInput& DispatchValues)
Description
This is used for non static scheduled types and when the ordered clause is present on the loop construct. Depending on the loop schedule, it is necessary to call some runtime routine before start of the OpenMP loop to get the loop upper / lower bounds \a LB and \a UB and stride \a ST.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1158
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- Reference to current CodeGenFunction.
- clang::SourceLocation Loc
- Clang source location.
- const clang::OpenMPScheduleTy& ScheduleKind
- Schedule kind, specified by the 'schedule' clause.
- unsigned int IVSize
- Size of the iteration variable in bits.
- bool IVSigned
- Sign of the iteration variable.
- bool Ordered
- true if loop is ordered, false otherwise.
- const clang::CodeGen::CGOpenMPRuntime:: DispatchRTInput& DispatchValues
- struct containing llvm values for lower bound, upper bound, and chunk expression. For the default (nullptr) value, the chunk 1 will be used.
¶virtual llvm::Value* emitForNext(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc,
unsigned int IVSize,
bool IVSigned,
clang::CodeGen::Address IL,
clang::CodeGen::Address LB,
clang::CodeGen::Address UB,
clang::CodeGen::Address ST)
virtual llvm::Value* emitForNext(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc,
unsigned int IVSize,
bool IVSigned,
clang::CodeGen::Address IL,
clang::CodeGen::Address LB,
clang::CodeGen::Address UB,
clang::CodeGen::Address ST)
Description
Call __kmpc_dispatch_next( ident_t *loc, kmp_int32 tid, kmp_int32 *p_lastiter, kmp_int[32|64] *p_lower, kmp_int[32|64] *p_upper, kmp_int[32|64] *p_stride);
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1259
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- clang::SourceLocation Loc
- unsigned int IVSize
- Size of the iteration variable in bits.
- bool IVSigned
- Sign of the iteration variable.
- clang::CodeGen::Address IL
- Address of the output variable in which the flag of the last iteration is returned.
- clang::CodeGen::Address LB
- Address of the output variable in which the lower iteration number is returned.
- clang::CodeGen::Address UB
- Address of the output variable in which the upper iteration number is returned.
- clang::CodeGen::Address ST
- Address of the output variable in which the stride value is returned.
¶virtual void emitForOrderedIterationEnd(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc,
unsigned int IVSize,
bool IVSigned)
virtual void emitForOrderedIterationEnd(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc,
unsigned int IVSize,
bool IVSigned)
Description
Call the appropriate runtime routine to notify that we finished iteration of the ordered loop with the dynamic scheduling.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1231
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- Reference to current CodeGenFunction.
- clang::SourceLocation Loc
- Clang source location.
- unsigned int IVSize
- Size of the iteration variable in bits.
- bool IVSigned
- Sign of the iteration variable.
¶virtual void emitForStaticFinish(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc,
clang::OpenMPDirectiveKind DKind)
virtual void emitForStaticFinish(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc,
clang::OpenMPDirectiveKind DKind)
Description
Call the appropriate runtime routine to notify that we finished all the work with current loop.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1242
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- Reference to current CodeGenFunction.
- clang::SourceLocation Loc
- Clang source location.
- clang::OpenMPDirectiveKind DKind
- Kind of the directive for which the static finish is emitted.
¶virtual void emitForStaticInit(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc,
clang::OpenMPDirectiveKind DKind,
const clang::OpenMPScheduleTy& ScheduleKind,
const clang::CodeGen::CGOpenMPRuntime::
StaticRTInput& Values)
virtual void emitForStaticInit(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc,
clang::OpenMPDirectiveKind DKind,
const clang::OpenMPScheduleTy& ScheduleKind,
const clang::CodeGen::CGOpenMPRuntime::
StaticRTInput& Values)
Description
Call the appropriate runtime routine to initialize it before start of loop. This is used only in case of static schedule, when the user did not specify a ordered clause on the loop construct. Depending on the loop schedule, it is necessary to call some runtime routine before start of the OpenMP loop to get the loop upper / lower bounds LB and UB and stride ST.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1207
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- Reference to current CodeGenFunction.
- clang::SourceLocation Loc
- Clang source location.
- clang::OpenMPDirectiveKind DKind
- Kind of the directive.
- const clang::OpenMPScheduleTy& ScheduleKind
- Schedule kind, specified by the 'schedule' clause.
- const clang::CodeGen::CGOpenMPRuntime:: StaticRTInput& Values
- Input arguments for the construct.
¶virtual void emitFunctionProlog(
clang::CodeGen::CodeGenFunction& CGF,
const clang::Decl* D)
virtual void emitFunctionProlog(
clang::CodeGen::CodeGenFunction& CGF,
const clang::Decl* D)
Description
Emits OpenMP-specific function prolog. Required for device constructs.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1799
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- const clang::Decl* D
¶void emitIfClause(
clang::CodeGen::CodeGenFunction& CGF,
const clang::Expr* Cond,
const clang::CodeGen::RegionCodeGenTy&
ThenGen,
const clang::CodeGen::RegionCodeGenTy&
ElseGen)
void emitIfClause(
clang::CodeGen::CodeGenFunction& CGF,
const clang::Expr* Cond,
const clang::CodeGen::RegionCodeGenTy&
ThenGen,
const clang::CodeGen::RegionCodeGenTy&
ElseGen)
Description
Emits code for OpenMP 'if' clause using specified \a CodeGen function. Here is the logic: if (Cond) { ThenGen(); } else { ElseGen(); }
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:930
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- const clang::Expr* Cond
- const clang::CodeGen::RegionCodeGenTy& ThenGen
- const clang::CodeGen::RegionCodeGenTy& ElseGen
¶virtual void emitInlinedDirective(
clang::CodeGen::CodeGenFunction& CGF,
clang::OpenMPDirectiveKind InnermostKind,
const clang::CodeGen::RegionCodeGenTy&
CodeGen,
bool HasCancel = false)
virtual void emitInlinedDirective(
clang::CodeGen::CodeGenFunction& CGF,
clang::OpenMPDirectiveKind InnermostKind,
const clang::CodeGen::RegionCodeGenTy&
CodeGen,
bool HasCancel = false)
Description
Emit code for the directive that does not require outlining.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1402
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- clang::OpenMPDirectiveKind InnermostKind
- Kind of innermost directive (for simple directives it is a directive itself, for combined - its innermost directive).
- const clang::CodeGen::RegionCodeGenTy& CodeGen
- Code generation sequence for the \a D directive.
- bool HasCancel = false
- true if region has inner cancel directive, false otherwise.
¶void emitKmpRoutineEntryT(
clang::QualType KmpInt32Ty)
void emitKmpRoutineEntryT(
clang::QualType KmpInt32Ty)
Description
Build type kmp_routine_entry_t (if not built yet).
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:783
Parameters
- clang::QualType KmpInt32Ty
¶virtual void
emitLastprivateConditionalFinalUpdate(
clang::CodeGen::CodeGenFunction& CGF,
clang::CodeGen::LValue PrivLVal,
const clang::VarDecl* VD,
clang::SourceLocation Loc)
virtual void
emitLastprivateConditionalFinalUpdate(
clang::CodeGen::CodeGenFunction& CGF,
clang::CodeGen::LValue PrivLVal,
const clang::VarDecl* VD,
clang::SourceLocation Loc)
Description
Gets the address of the global copy used for lastprivate conditional update, if any.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1885
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- clang::CodeGen::LValue PrivLVal
- LValue for the private copy.
- const clang::VarDecl* VD
- Original lastprivate declaration.
- clang::SourceLocation Loc
¶clang::CodeGen::Address
emitLastprivateConditionalInit(
clang::CodeGen::CodeGenFunction& CGF,
const clang::VarDecl* VD)
clang::CodeGen::Address
emitLastprivateConditionalInit(
clang::CodeGen::CodeGenFunction& CGF,
const clang::VarDecl* VD)
Description
Create specialized alloca to handle lastprivate conditionals.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1838
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- const clang::VarDecl* VD
¶void emitLastprivateConditionalUpdate(
clang::CodeGen::CodeGenFunction& CGF,
clang::CodeGen::LValue IVLVal,
llvm::StringRef UniqueDeclName,
clang::CodeGen::LValue LVal,
clang::SourceLocation Loc)
void emitLastprivateConditionalUpdate(
clang::CodeGen::CodeGenFunction& CGF,
clang::CodeGen::LValue IVLVal,
llvm::StringRef UniqueDeclName,
clang::CodeGen::LValue LVal,
clang::SourceLocation Loc)
Description
Emit update for lastprivate conditional data.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:897
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- clang::CodeGen::LValue IVLVal
- llvm::StringRef UniqueDeclName
- clang::CodeGen::LValue LVal
- clang::SourceLocation Loc
¶virtual void emitMaskedRegion(
clang::CodeGen::CodeGenFunction& CGF,
const clang::CodeGen::RegionCodeGenTy&
MaskedOpGen,
clang::SourceLocation Loc,
const clang::Expr* Filter = nullptr)
virtual void emitMaskedRegion(
clang::CodeGen::CodeGenFunction& CGF,
const clang::CodeGen::RegionCodeGenTy&
MaskedOpGen,
clang::SourceLocation Loc,
const clang::Expr* Filter = nullptr)
Description
Emits a masked region.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1043
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- const clang::CodeGen::RegionCodeGenTy& MaskedOpGen
- Generator for the statement associated with the given masked region.
- clang::SourceLocation Loc
- const clang::Expr* Filter = nullptr
¶virtual void emitMasterRegion(
clang::CodeGen::CodeGenFunction& CGF,
const clang::CodeGen::RegionCodeGenTy&
MasterOpGen,
clang::SourceLocation Loc)
virtual void emitMasterRegion(
clang::CodeGen::CodeGenFunction& CGF,
const clang::CodeGen::RegionCodeGenTy&
MasterOpGen,
clang::SourceLocation Loc)
Description
Emits a master region.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1036
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- const clang::CodeGen::RegionCodeGenTy& MasterOpGen
- Generator for the statement associated with the given master region.
- clang::SourceLocation Loc
¶virtual void emitNumTeamsClause(
clang::CodeGen::CodeGenFunction& CGF,
const clang::Expr* NumTeams,
const clang::Expr* ThreadLimit,
clang::SourceLocation Loc)
virtual void emitNumTeamsClause(
clang::CodeGen::CodeGenFunction& CGF,
const clang::Expr* NumTeams,
const clang::Expr* ThreadLimit,
clang::SourceLocation Loc)
Description
Emits call to void __kmpc_push_num_teams(ident_t *loc, kmp_int32 global_tid, kmp_int32 num_teams, kmp_int32 thread_limit) to generate code for num_teams clause.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1652
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- const clang::Expr* NumTeams
- An integer expression of teams.
- const clang::Expr* ThreadLimit
- An integer expression of threads.
- clang::SourceLocation Loc
¶llvm::Value* emitNumTeamsForTargetDirective(
clang::CodeGen::CodeGenFunction& CGF,
const clang::OMPExecutableDirective& D)
llvm::Value* emitNumTeamsForTargetDirective(
clang::CodeGen::CodeGenFunction& CGF,
const clang::OMPExecutableDirective& D)
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:357
Parameters
¶virtual void emitNumThreadsClause(
clang::CodeGen::CodeGenFunction& CGF,
llvm::Value* NumThreads,
clang::SourceLocation Loc)
virtual void emitNumThreadsClause(
clang::CodeGen::CodeGenFunction& CGF,
llvm::Value* NumThreads,
clang::SourceLocation Loc)
Description
Emits call to void __kmpc_push_num_threads(ident_t *loc, kmp_int32 global_tid, kmp_int32 num_threads) to generate code for 'num_threads' clause.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1268
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- llvm::Value* NumThreads
- An integer value of threads.
- clang::SourceLocation Loc
¶llvm::Value* emitNumThreadsForTargetDirective(
clang::CodeGen::CodeGenFunction& CGF,
const clang::OMPExecutableDirective& D)
llvm::Value* emitNumThreadsForTargetDirective(
clang::CodeGen::CodeGenFunction& CGF,
const clang::OMPExecutableDirective& D)
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:372
Parameters
¶virtual void emitOrderedRegion(
clang::CodeGen::CodeGenFunction& CGF,
const clang::CodeGen::RegionCodeGenTy&
OrderedOpGen,
clang::SourceLocation Loc,
bool IsThreads)
virtual void emitOrderedRegion(
clang::CodeGen::CodeGenFunction& CGF,
const clang::CodeGen::RegionCodeGenTy&
OrderedOpGen,
clang::SourceLocation Loc,
bool IsThreads)
Description
Emit an ordered region.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1072
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- const clang::CodeGen::RegionCodeGenTy& OrderedOpGen
- Generator for the statement associated with the given ordered region.
- clang::SourceLocation Loc
- bool IsThreads
¶virtual void emitOutlinedFunctionCall(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc,
llvm::FunctionCallee OutlinedFn,
ArrayRef<llvm::Value*> Args =
llvm::None) const
virtual void emitOutlinedFunctionCall(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc,
llvm::FunctionCallee OutlinedFn,
ArrayRef<llvm::Value*> Args =
llvm::None) const
Description
Emits call of the outlined function with the provided arguments, translating these arguments to correct target-specific arguments.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1793
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- clang::SourceLocation Loc
- llvm::FunctionCallee OutlinedFn
- ArrayRef<llvm::Value*> Args = llvm::None
¶virtual void emitParallelCall(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc,
llvm::Function* OutlinedFn,
ArrayRef<llvm::Value*> CapturedVars,
const clang::Expr* IfCond,
llvm::Value* NumThreads)
virtual void emitParallelCall(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc,
llvm::Function* OutlinedFn,
ArrayRef<llvm::Value*> CapturedVars,
const clang::Expr* IfCond,
llvm::Value* NumThreads)
Description
Emits code for parallel or serial call of the \a OutlinedFn with variables captured in a record which address is stored in \a CapturedStruct.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1018
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- clang::SourceLocation Loc
- llvm::Function* OutlinedFn
- Outlined function to be run in parallel threads. Type of this function is void(*)(kmp_int32 *, kmp_int32, struct context_vars*).
- ArrayRef<llvm::Value*> CapturedVars
- A pointer to the record with the references to variables used in \a OutlinedFn function.
- const clang::Expr* IfCond
- Condition in the associated 'if' clause, if it was specified, nullptr otherwise.
- llvm::Value* NumThreads
- The value corresponding to the num_threads clause, if any, or nullptr.
¶virtual llvm::Function*
emitParallelOutlinedFunction(
const clang::OMPExecutableDirective& D,
const clang::VarDecl* ThreadIDVar,
clang::OpenMPDirectiveKind InnermostKind,
const clang::CodeGen::RegionCodeGenTy&
CodeGen)
virtual llvm::Function*
emitParallelOutlinedFunction(
const clang::OMPExecutableDirective& D,
const clang::VarDecl* ThreadIDVar,
clang::OpenMPDirectiveKind InnermostKind,
const clang::CodeGen::RegionCodeGenTy&
CodeGen)
Description
Emits outlined function for the specified OpenMP parallel directive\a D. This outlined function has type void(*)(kmp_int32 *ThreadID, kmp_int32 BoundID, struct context_vars*).
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:965
Parameters
- const clang::OMPExecutableDirective& D
- OpenMP directive.
- const clang::VarDecl* ThreadIDVar
- Variable for thread id in the current OpenMP region.
- clang::OpenMPDirectiveKind InnermostKind
- Kind of innermost directive (for simple directives it is a directive itself, for combined - its innermost directive).
- const clang::CodeGen::RegionCodeGenTy& CodeGen
- Code generation sequence for the \a D directive.
¶virtual void emitProcBindClause(
clang::CodeGen::CodeGenFunction& CGF,
llvm::omp::ProcBindKind ProcBind,
clang::SourceLocation Loc)
virtual void emitProcBindClause(
clang::CodeGen::CodeGenFunction& CGF,
llvm::omp::ProcBindKind ProcBind,
clang::SourceLocation Loc)
Description
Emit call to void __kmpc_push_proc_bind(ident_t *loc, kmp_int32 global_tid, int proc_bind) to generate code for 'proc_bind' clause.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1274
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- llvm::omp::ProcBindKind ProcBind
- clang::SourceLocation Loc
¶virtual void emitReduction(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc,
ArrayRef<const clang::Expr*> Privates,
ArrayRef<const clang::Expr*> LHSExprs,
ArrayRef<const clang::Expr*> RHSExprs,
ArrayRef<const clang::Expr*> ReductionOps,
clang::CodeGen::CGOpenMPRuntime::
ReductionOptionsTy Options)
virtual void emitReduction(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc,
ArrayRef<const clang::Expr*> Privates,
ArrayRef<const clang::Expr*> LHSExprs,
ArrayRef<const clang::Expr*> RHSExprs,
ArrayRef<const clang::Expr*> ReductionOps,
clang::CodeGen::CGOpenMPRuntime::
ReductionOptionsTy Options)
Description
Emit a code for reduction clause. Next code should be emitted for reduction:
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1475
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- clang::SourceLocation Loc
- ArrayRef<const clang::Expr*> Privates
- List of private copies for original reduction arguments.
- ArrayRef<const clang::Expr*> LHSExprs
- List of LHS in \a ReductionOps reduction operations.
- ArrayRef<const clang::Expr*> RHSExprs
- List of RHS in \a ReductionOps reduction operations.
- ArrayRef<const clang::Expr*> ReductionOps
- List of reduction operations in form 'LHS binop RHS' or 'operator binop(LHS, RHS)'.
- clang::CodeGen::CGOpenMPRuntime:: ReductionOptionsTy Options
- List of options for reduction codegen: WithNowait true if parent directive has also nowait clause, false otherwise. SimpleReduction Emit reduction operation only. Used for omp simd directive on the host. ReductionKind The kind of reduction to perform.
¶llvm::Function* emitReductionFunction(
clang::SourceLocation Loc,
llvm::Type* ArgsElemType,
ArrayRef<const clang::Expr*> Privates,
ArrayRef<const clang::Expr*> LHSExprs,
ArrayRef<const clang::Expr*> RHSExprs,
ArrayRef<const clang::Expr*> ReductionOps)
llvm::Function* emitReductionFunction(
clang::SourceLocation Loc,
llvm::Type* ArgsElemType,
ArrayRef<const clang::Expr*> Privates,
ArrayRef<const clang::Expr*> LHSExprs,
ArrayRef<const clang::Expr*> RHSExprs,
ArrayRef<const clang::Expr*> ReductionOps)
Description
Emits reduction function.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1414
Parameters
- clang::SourceLocation Loc
- llvm::Type* ArgsElemType
- Array type containing pointers to reduction variables.
- ArrayRef<const clang::Expr*> Privates
- List of private copies for original reduction arguments.
- ArrayRef<const clang::Expr*> LHSExprs
- List of LHS in \a ReductionOps reduction operations.
- ArrayRef<const clang::Expr*> RHSExprs
- List of RHS in \a ReductionOps reduction operations.
- ArrayRef<const clang::Expr*> ReductionOps
- List of reduction operations in form 'LHS binop RHS' or 'operator binop(LHS, RHS)'.
¶llvm::Function* emitRequiresDirectiveRegFun()
llvm::Function* emitRequiresDirectiveRegFun()
Description
Creates and returns a registration function for when at least one requires directives was used in the current module.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1628
¶void emitSingleReductionCombiner(
clang::CodeGen::CodeGenFunction& CGF,
const clang::Expr* ReductionOp,
const clang::Expr* PrivateRef,
const clang::DeclRefExpr* LHS,
const clang::DeclRefExpr* RHS)
void emitSingleReductionCombiner(
clang::CodeGen::CodeGenFunction& CGF,
const clang::Expr* ReductionOp,
const clang::Expr* PrivateRef,
const clang::DeclRefExpr* LHS,
const clang::DeclRefExpr* RHS)
Description
Emits single reduction combiner
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1422
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- const clang::Expr* ReductionOp
- const clang::Expr* PrivateRef
- const clang::DeclRefExpr* LHS
- const clang::DeclRefExpr* RHS
¶virtual void emitSingleRegion(
clang::CodeGen::CodeGenFunction& CGF,
const clang::CodeGen::RegionCodeGenTy&
SingleOpGen,
clang::SourceLocation Loc,
ArrayRef<const clang::Expr*> CopyprivateVars,
ArrayRef<const clang::Expr*> DestExprs,
ArrayRef<const clang::Expr*> SrcExprs,
ArrayRef<const clang::Expr*> AssignmentOps)
virtual void emitSingleRegion(
clang::CodeGen::CodeGenFunction& CGF,
const clang::CodeGen::RegionCodeGenTy&
SingleOpGen,
clang::SourceLocation Loc,
ArrayRef<const clang::Expr*> CopyprivateVars,
ArrayRef<const clang::Expr*> DestExprs,
ArrayRef<const clang::Expr*> SrcExprs,
ArrayRef<const clang::Expr*> AssignmentOps)
Description
Emits a single region.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1061
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- const clang::CodeGen::RegionCodeGenTy& SingleOpGen
- Generator for the statement associated with the given single region.
- clang::SourceLocation Loc
- ArrayRef<const clang::Expr*> CopyprivateVars
- ArrayRef<const clang::Expr*> DestExprs
- ArrayRef<const clang::Expr*> SrcExprs
- ArrayRef<const clang::Expr*> AssignmentOps
¶virtual void emitTargetCall(
clang::CodeGen::CodeGenFunction& CGF,
const clang::OMPExecutableDirective& D,
llvm::Function* OutlinedFn,
llvm::Value* OutlinedFnID,
const clang::Expr* IfCond,
llvm::PointerIntPair<
const Expr*,
2,
OpenMPDeviceClauseModifier> Device,
llvm::function_ref<llvm::Value*(
CodeGenFunction&,
const OMPLoopDirective&)> SizeEmitter)
virtual void emitTargetCall(
clang::CodeGen::CodeGenFunction& CGF,
const clang::OMPExecutableDirective& D,
llvm::Function* OutlinedFn,
llvm::Value* OutlinedFnID,
const clang::Expr* IfCond,
llvm::PointerIntPair<
const Expr*,
2,
OpenMPDeviceClauseModifier> Device,
llvm::function_ref<llvm::Value*(
CodeGenFunction&,
const OMPLoopDirective&)> SizeEmitter)
Description
Emit the target offloading code associated with \a D. The emitted code attempts offloading the execution to the device, an the event of a failure it executes the host version outlined in \a OutlinedFn.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1597
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- const clang::OMPExecutableDirective& D
- Directive to emit.
- llvm::Function* OutlinedFn
- Host version of the code to be offloaded.
- llvm::Value* OutlinedFnID
- ID of host version of the code to be offloaded.
- const clang::Expr* IfCond
- Expression evaluated in if clause associated with the target directive, or null if no if clause is used.
- llvm::PointerIntPair<const Expr*, 2, OpenMPDeviceClauseModifier> Device
- Expression evaluated in device clause associated with the target directive, or null if no device clause is used and device modifier.
- llvm::function_ref<llvm::Value*( CodeGenFunction&, const OMPLoopDirective&)> SizeEmitter
- Callback to emit number of iterations for loop-based directives.
¶virtual void emitTargetDataCalls(
clang::CodeGen::CodeGenFunction& CGF,
const clang::OMPExecutableDirective& D,
const clang::Expr* IfCond,
const clang::Expr* Device,
const clang::CodeGen::RegionCodeGenTy&
CodeGen,
clang::CodeGen::CGOpenMPRuntime::
TargetDataInfo& Info)
virtual void emitTargetDataCalls(
clang::CodeGen::CodeGenFunction& CGF,
const clang::OMPExecutableDirective& D,
const clang::Expr* IfCond,
const clang::Expr* Device,
const clang::CodeGen::RegionCodeGenTy&
CodeGen,
clang::CodeGen::CGOpenMPRuntime::
TargetDataInfo& Info)
Description
Emit the target data mapping code associated with \a D.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1726
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- const clang::OMPExecutableDirective& D
- Directive to emit.
- const clang::Expr* IfCond
- Expression evaluated in if clause associated with the target directive, or null if no device clause is used.
- const clang::Expr* Device
- Expression evaluated in device clause associated with the target directive, or null if no device clause is used.
- const clang::CodeGen::RegionCodeGenTy& CodeGen
- clang::CodeGen::CGOpenMPRuntime::TargetDataInfo& Info
- A record used to store information that needs to be preserved until the region is closed.
¶virtual void emitTargetDataStandAloneCall(
clang::CodeGen::CodeGenFunction& CGF,
const clang::OMPExecutableDirective& D,
const clang::Expr* IfCond,
const clang::Expr* Device)
virtual void emitTargetDataStandAloneCall(
clang::CodeGen::CodeGenFunction& CGF,
const clang::OMPExecutableDirective& D,
const clang::Expr* IfCond,
const clang::Expr* Device)
Description
Emit the data mapping/movement code associated with the directive\a D that should be of the form 'target [{enter|exit} data | update]'.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1739
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- const clang::OMPExecutableDirective& D
- Directive to emit.
- const clang::Expr* IfCond
- Expression evaluated in if clause associated with the target directive, or null if no if clause is used.
- const clang::Expr* Device
- Expression evaluated in device clause associated with the target directive, or null if no device clause is used.
¶virtual bool emitTargetFunctions(
clang::GlobalDecl GD)
virtual bool emitTargetFunctions(
clang::GlobalDecl GD)
Description
Emit the target regions enclosed in \a GD function definition or the function itself in case it is a valid device function. Returns true if\a GD was dealt with successfully.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1609
Parameters
- clang::GlobalDecl GD
- Function to scan.
¶virtual bool emitTargetGlobal(
clang::GlobalDecl GD)
virtual bool emitTargetGlobal(
clang::GlobalDecl GD)
Description
Emit the global \a GD if it is meaningful for the target. Returns if it was emitted successfully.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1624
Parameters
- clang::GlobalDecl GD
- Global to scan.
¶virtual bool emitTargetGlobalVariable(
clang::GlobalDecl GD)
virtual bool emitTargetGlobalVariable(
clang::GlobalDecl GD)
Description
Emit the global variable if it is a valid device global variable. Returns true if \a GD was dealt with successfully.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1614
Parameters
- clang::GlobalDecl GD
- Variable declaration to emit.
¶llvm::Value* emitTargetNumIterationsCall(
clang::CodeGen::CodeGenFunction& CGF,
const clang::OMPExecutableDirective& D,
llvm::function_ref<llvm::Value*(
CodeGenFunction&,
const OMPLoopDirective&)> SizeEmitter)
llvm::Value* emitTargetNumIterationsCall(
clang::CodeGen::CodeGenFunction& CGF,
const clang::OMPExecutableDirective& D,
llvm::function_ref<llvm::Value*(
CodeGenFunction&,
const OMPLoopDirective&)> SizeEmitter)
Description
Return the trip count of loops associated with constructs / 'target teams distribute' and 'teams distribute parallel for'.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:890
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- const clang::OMPExecutableDirective& D
- llvm::function_ref<llvm::Value*( CodeGenFunction&, const OMPLoopDirective&)> SizeEmitter
- Emits the int64 value for the number of iterations of the associated loop.
¶virtual void emitTargetOutlinedFunction(
const clang::OMPExecutableDirective& D,
llvm::StringRef ParentName,
llvm::Function*& OutlinedFn,
llvm::Constant*& OutlinedFnID,
bool IsOffloadEntry,
const clang::CodeGen::RegionCodeGenTy&
CodeGen)
virtual void emitTargetOutlinedFunction(
const clang::OMPExecutableDirective& D,
llvm::StringRef ParentName,
llvm::Function*& OutlinedFn,
llvm::Constant*& OutlinedFnID,
bool IsOffloadEntry,
const clang::CodeGen::RegionCodeGenTy&
CodeGen)
Description
Emit outilined function for 'target' directive.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1578
Parameters
- const clang::OMPExecutableDirective& D
- Directive to emit.
- llvm::StringRef ParentName
- Name of the function that encloses the target region.
- llvm::Function*& OutlinedFn
- Outlined function value to be defined by this call.
- llvm::Constant*& OutlinedFnID
- Outlined function ID value to be defined by this call.
- bool IsOffloadEntry
- True if the outlined function is an offload entry.
- const clang::CodeGen::RegionCodeGenTy& CodeGen
- Code generation sequence for the \a D directive. An outlined function may not be an entry if, e.g. the if clause always evaluates to false.
¶virtual void emitTargetOutlinedFunctionHelper(
const clang::OMPExecutableDirective& D,
llvm::StringRef ParentName,
llvm::Function*& OutlinedFn,
llvm::Constant*& OutlinedFnID,
bool IsOffloadEntry,
const clang::CodeGen::RegionCodeGenTy&
CodeGen)
virtual void emitTargetOutlinedFunctionHelper(
const clang::OMPExecutableDirective& D,
llvm::StringRef ParentName,
llvm::Function*& OutlinedFn,
llvm::Constant*& OutlinedFnID,
bool IsOffloadEntry,
const clang::CodeGen::RegionCodeGenTy&
CodeGen)
Description
Helper to emit outlined function for 'target' directive.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:333
Parameters
- const clang::OMPExecutableDirective& D
- Directive to emit.
- llvm::StringRef ParentName
- Name of the function that encloses the target region.
- llvm::Function*& OutlinedFn
- Outlined function value to be defined by this call.
- llvm::Constant*& OutlinedFnID
- Outlined function ID value to be defined by this call.
- bool IsOffloadEntry
- True if the outlined function is an offload entry.
- const clang::CodeGen::RegionCodeGenTy& CodeGen
- Lambda codegen specific to an accelerator device. An outlined function may not be an entry if, e.g. the if clause always evaluates to false.
¶virtual void emitTaskCall(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc,
const clang::OMPExecutableDirective& D,
llvm::Function* TaskFunction,
clang::QualType SharedsTy,
clang::CodeGen::Address Shareds,
const clang::Expr* IfCond,
const clang::CodeGen::OMPTaskDataTy& Data)
virtual void emitTaskCall(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc,
const clang::OMPExecutableDirective& D,
llvm::Function* TaskFunction,
clang::QualType SharedsTy,
clang::CodeGen::Address Shareds,
const clang::Expr* IfCond,
const clang::CodeGen::OMPTaskDataTy& Data)
Description
Emit task region for the task directive. The task region is emitted in several steps: 1. Emit a call to kmp_task_t *__kmpc_omp_task_alloc(ident_t *, kmp_int32 gtid, kmp_int32 flags, size_t sizeof_kmp_task_t, size_t sizeof_shareds, kmp_routine_entry_t *task_entry). Here task_entry is a pointer to the function: kmp_int32 .omp_task_entry.(kmp_int32 gtid, kmp_task_t *tt) { TaskFunction(gtid, tt->part_id, tt->shareds); return 0; } 2. Copy a list of shared variables to field shareds of the resulting structure kmp_task_t returned by the previous call (if any). 3. Copy a pointer to destructions function to field destructions of the resulting structure kmp_task_t. 4. Emit a call to kmp_int32 __kmpc_omp_task(ident_t *, kmp_int32 gtid, kmp_task_t *new_task), where new_task is a resulting structure from previous items.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1354
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- clang::SourceLocation Loc
- const clang::OMPExecutableDirective& D
- Current task directive.
- llvm::Function* TaskFunction
- An LLVM function with type void (*)(i32 /*gtid*/, i32 /*part_id*/, captured_struct */*__context*/);
- clang::QualType SharedsTy
- A type which contains references the shared variables.
- clang::CodeGen::Address Shareds
- Context with the list of shared variables from the \p TaskFunction.
- const clang::Expr* IfCond
- Not a nullptr if 'if' clause was specified, nullptr otherwise.
- const clang::CodeGen::OMPTaskDataTy& Data
- Additional data for task generation like tiednsee, final state, list of privates etc.
¶clang::CodeGen::CGOpenMPRuntime::TaskResultTy
emitTaskInit(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc,
const clang::OMPExecutableDirective& D,
llvm::Function* TaskFunction,
clang::QualType SharedsTy,
clang::CodeGen::Address Shareds,
const clang::CodeGen::OMPTaskDataTy& Data)
clang::CodeGen::CGOpenMPRuntime::TaskResultTy
emitTaskInit(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc,
const clang::OMPExecutableDirective& D,
llvm::Function* TaskFunction,
clang::QualType SharedsTy,
clang::CodeGen::Address Shareds,
const clang::CodeGen::OMPTaskDataTy& Data)
Description
Emit task region for the task directive. The task region is emitted in several steps: 1. Emit a call to kmp_task_t *__kmpc_omp_task_alloc(ident_t *, kmp_int32 gtid, kmp_int32 flags, size_t sizeof_kmp_task_t, size_t sizeof_shareds, kmp_routine_entry_t *task_entry). Here task_entry is a pointer to the function: kmp_int32 .omp_task_entry.(kmp_int32 gtid, kmp_task_t *tt) { TaskFunction(gtid, tt->part_id, tt->shareds); return 0; } 2. Copy a list of shared variables to field shareds of the resulting structure kmp_task_t returned by the previous call (if any). 3. Copy a pointer to destructions function to field destructions of the resulting structure kmp_task_t.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:882
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- clang::SourceLocation Loc
- const clang::OMPExecutableDirective& D
- Current task directive.
- llvm::Function* TaskFunction
- An LLVM function with type void (*)(i32 /*gtid*/, i32 /*part_id*/, captured_struct */*__context*/);
- clang::QualType SharedsTy
- A type which contains references the shared variables.
- clang::CodeGen::Address Shareds
- Context with the list of shared variables from the \p TaskFunction.
- const clang::CodeGen::OMPTaskDataTy& Data
- Additional data for task generation like tiednsee, final state, list of privates etc.
¶virtual void emitTaskLoopCall(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc,
const clang::OMPLoopDirective& D,
llvm::Function* TaskFunction,
clang::QualType SharedsTy,
clang::CodeGen::Address Shareds,
const clang::Expr* IfCond,
const clang::CodeGen::OMPTaskDataTy& Data)
virtual void emitTaskLoopCall(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc,
const clang::OMPLoopDirective& D,
llvm::Function* TaskFunction,
clang::QualType SharedsTy,
clang::CodeGen::Address Shareds,
const clang::Expr* IfCond,
const clang::CodeGen::OMPTaskDataTy& Data)
Description
Emit task region for the taskloop directive. The taskloop region is emitted in several steps: 1. Emit a call to kmp_task_t *__kmpc_omp_task_alloc(ident_t *, kmp_int32 gtid, kmp_int32 flags, size_t sizeof_kmp_task_t, size_t sizeof_shareds, kmp_routine_entry_t *task_entry). Here task_entry is a pointer to the function: kmp_int32 .omp_task_entry.(kmp_int32 gtid, kmp_task_t *tt) { TaskFunction(gtid, tt->part_id, tt->shareds); return 0; } 2. Copy a list of shared variables to field shareds of the resulting structure kmp_task_t returned by the previous call (if any). 3. Copy a pointer to destructions function to field destructions of the resulting structure kmp_task_t. 4. Emit a call to void __kmpc_taskloop(ident_t *loc, int gtid, kmp_task_t *task, int if_val, kmp_uint64 *lb, kmp_uint64 *ub, kmp_int64 st, int nogroup, int sched, kmp_uint64 grainsize, void *task_dup ), where new_task is a resulting structure from previous items.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1389
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- clang::SourceLocation Loc
- const clang::OMPLoopDirective& D
- Current task directive.
- llvm::Function* TaskFunction
- An LLVM function with type void (*)(i32 /*gtid*/, i32 /*part_id*/, captured_struct */*__context*/);
- clang::QualType SharedsTy
- A type which contains references the shared variables.
- clang::CodeGen::Address Shareds
- Context with the list of shared variables from the \p TaskFunction.
- const clang::Expr* IfCond
- Not a nullptr if 'if' clause was specified, nullptr otherwise.
- const clang::CodeGen::OMPTaskDataTy& Data
- Additional data for task generation like tiednsee, final state, list of privates etc.
¶virtual llvm::Function* emitTaskOutlinedFunction(
const clang::OMPExecutableDirective& D,
const clang::VarDecl* ThreadIDVar,
const clang::VarDecl* PartIDVar,
const clang::VarDecl* TaskTVar,
clang::OpenMPDirectiveKind InnermostKind,
const clang::CodeGen::RegionCodeGenTy&
CodeGen,
bool Tied,
unsigned int& NumberOfParts)
virtual llvm::Function* emitTaskOutlinedFunction(
const clang::OMPExecutableDirective& D,
const clang::VarDecl* ThreadIDVar,
const clang::VarDecl* PartIDVar,
const clang::VarDecl* TaskTVar,
clang::OpenMPDirectiveKind InnermostKind,
const clang::CodeGen::RegionCodeGenTy&
CodeGen,
bool Tied,
unsigned int& NumberOfParts)
Description
Emits outlined function for the OpenMP task directive \a D. This outlined function has type void(*)(kmp_int32 ThreadID, struct task_t* TaskT).
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:996
Parameters
- const clang::OMPExecutableDirective& D
- OpenMP directive.
- const clang::VarDecl* ThreadIDVar
- Variable for thread id in the current OpenMP region.
- const clang::VarDecl* PartIDVar
- Variable for partition id in the current OpenMP untied task region.
- const clang::VarDecl* TaskTVar
- Variable for task_t argument.
- clang::OpenMPDirectiveKind InnermostKind
- Kind of innermost directive (for simple directives it is a directive itself, for combined - its innermost directive).
- const clang::CodeGen::RegionCodeGenTy& CodeGen
- Code generation sequence for the \a D directive.
- bool Tied
- true if task is generated for tied task, false otherwise.
- unsigned int& NumberOfParts
- Number of parts in untied task. Ignored for tied tasks.
¶virtual void emitTaskReductionFini(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc,
bool IsWorksharingReduction)
virtual void emitTaskReductionFini(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc,
bool IsWorksharingReduction)
Description
Emits the following code for reduction clause with task modifier:
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1528
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- clang::SourceLocation Loc
- bool IsWorksharingReduction
¶virtual void emitTaskReductionFixups(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc,
clang::CodeGen::ReductionCodeGen& RCG,
unsigned int N)
virtual void emitTaskReductionFixups(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc,
clang::CodeGen::ReductionCodeGen& RCG,
unsigned int N)
Description
Required to resolve existing problems in the runtime. Emits threadprivate variables to store the size of the VLAs/array sections for initializer/combiner/finalizer functions.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1536
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- clang::SourceLocation Loc
- clang::CodeGen::ReductionCodeGen& RCG
- Allows to reuse an existing data for the reductions.
- unsigned int N
- Reduction item for which fixups must be emitted.
¶virtual llvm::Value* emitTaskReductionInit(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc,
ArrayRef<const clang::Expr*> LHSExprs,
ArrayRef<const clang::Expr*> RHSExprs,
const clang::CodeGen::OMPTaskDataTy& Data)
virtual llvm::Value* emitTaskReductionInit(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc,
ArrayRef<const clang::Expr*> LHSExprs,
ArrayRef<const clang::Expr*> RHSExprs,
const clang::CodeGen::OMPTaskDataTy& Data)
Description
Emit a code for initialization of task reduction clause. Next code should be emitted for reduction: For reduction clause with task modifier it emits the next call:
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1518
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- clang::SourceLocation Loc
- ArrayRef<const clang::Expr*> LHSExprs
- List of LHS in \a Data.ReductionOps reduction operations.
- ArrayRef<const clang::Expr*> RHSExprs
- List of RHS in \a Data.ReductionOps reduction operations.
- const clang::CodeGen::OMPTaskDataTy& Data
- Additional data for task generation like tiedness, final state, list of privates, reductions etc.
¶virtual void emitTaskgroupRegion(
clang::CodeGen::CodeGenFunction& CGF,
const clang::CodeGen::RegionCodeGenTy&
TaskgroupOpGen,
clang::SourceLocation Loc)
virtual void emitTaskgroupRegion(
clang::CodeGen::CodeGenFunction& CGF,
const clang::CodeGen::RegionCodeGenTy&
TaskgroupOpGen,
clang::SourceLocation Loc)
Description
Emit a taskgroup region.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1054
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- const clang::CodeGen::RegionCodeGenTy& TaskgroupOpGen
- Generator for the statement associated with the given taskgroup region.
- clang::SourceLocation Loc
¶virtual void emitTaskwaitCall(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc,
const clang::CodeGen::OMPTaskDataTy& Data)
virtual void emitTaskwaitCall(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc,
const clang::CodeGen::OMPTaskDataTy& Data)
Description
Emit code for 'taskwait' directive.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1549
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- clang::SourceLocation Loc
- const clang::CodeGen::OMPTaskDataTy& Data
¶virtual void emitTaskyieldCall(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc)
virtual void emitTaskyieldCall(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc)
Description
Emits code for a taskyield directive.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1049
Parameters
¶virtual void emitTeamsCall(
clang::CodeGen::CodeGenFunction& CGF,
const clang::OMPExecutableDirective& D,
clang::SourceLocation Loc,
llvm::Function* OutlinedFn,
ArrayRef<llvm::Value*> CapturedVars)
virtual void emitTeamsCall(
clang::CodeGen::CodeGenFunction& CGF,
const clang::OMPExecutableDirective& D,
clang::SourceLocation Loc,
llvm::Function* OutlinedFn,
ArrayRef<llvm::Value*> CapturedVars)
Description
Emits code for teams call of the \a OutlinedFn with variables captured in a record which address is stored in \a CapturedStruct.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1642
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- const clang::OMPExecutableDirective& D
- clang::SourceLocation Loc
- llvm::Function* OutlinedFn
- Outlined function to be run by team masters. Type of this function is void(*)(kmp_int32 *, kmp_int32, struct context_vars*).
- ArrayRef<llvm::Value*> CapturedVars
- A pointer to the record with the references to variables used in \a OutlinedFn function.
¶virtual llvm::Function* emitTeamsOutlinedFunction(
const clang::OMPExecutableDirective& D,
const clang::VarDecl* ThreadIDVar,
clang::OpenMPDirectiveKind InnermostKind,
const clang::CodeGen::RegionCodeGenTy&
CodeGen)
virtual llvm::Function* emitTeamsOutlinedFunction(
const clang::OMPExecutableDirective& D,
const clang::VarDecl* ThreadIDVar,
clang::OpenMPDirectiveKind InnermostKind,
const clang::CodeGen::RegionCodeGenTy&
CodeGen)
Description
Emits outlined function for the specified OpenMP teams directive\a D. This outlined function has type void(*)(kmp_int32 *ThreadID, kmp_int32 BoundID, struct context_vars*).
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:977
Parameters
- const clang::OMPExecutableDirective& D
- OpenMP directive.
- const clang::VarDecl* ThreadIDVar
- Variable for thread id in the current OpenMP region.
- clang::OpenMPDirectiveKind InnermostKind
- Kind of innermost directive (for simple directives it is a directive itself, for combined - its innermost directive).
- const clang::CodeGen::RegionCodeGenTy& CodeGen
- Code generation sequence for the \a D directive.
¶virtual clang::CodeGen::Address
emitThreadIDAddress(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc)
virtual clang::CodeGen::Address
emitThreadIDAddress(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc)
Description
Emits address of the word in a memory where current thread id is stored.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:394
Parameters
¶virtual llvm::Function*
emitThreadPrivateVarDefinition(
const clang::VarDecl* VD,
clang::CodeGen::Address VDAddr,
clang::SourceLocation Loc,
bool PerformInit,
clang::CodeGen::CodeGenFunction* CGF =
nullptr)
virtual llvm::Function*
emitThreadPrivateVarDefinition(
const clang::VarDecl* VD,
clang::CodeGen::Address VDAddr,
clang::SourceLocation Loc,
bool PerformInit,
clang::CodeGen::CodeGenFunction* CGF =
nullptr)
Description
Emit a code for initialization of threadprivate variable. It emits a call to runtime library which adds initial value to the newly created threadprivate variable (if it is not constant) and registers destructor for the variable (if any).
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1302
Parameters
- const clang::VarDecl* VD
- Threadprivate variable.
- clang::CodeGen::Address VDAddr
- Address of the global variable \a VD.
- clang::SourceLocation Loc
- Location of threadprivate declaration.
- bool PerformInit
- true if initialization expression is not constant.
- clang::CodeGen::CodeGenFunction* CGF = nullptr
¶void emitThreadPrivateVarInit(
clang::CodeGen::CodeGenFunction& CGF,
clang::CodeGen::Address VDAddr,
llvm::Value* Ctor,
llvm::Value* CopyCtor,
llvm::Value* Dtor,
clang::SourceLocation Loc)
void emitThreadPrivateVarInit(
clang::CodeGen::CodeGenFunction& CGF,
clang::CodeGen::Address VDAddr,
llvm::Value* Ctor,
llvm::Value* CopyCtor,
llvm::Value* Dtor,
clang::SourceLocation Loc)
Description
Emits initialization code for the threadprivate variables.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:839
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- clang::CodeGen::Address VDAddr
- Address of the global variable \a VD.
- llvm::Value* Ctor
- Pointer to a global init function for \a VD.
- llvm::Value* CopyCtor
- Pointer to a global copy function for \a VD.
- llvm::Value* Dtor
- Pointer to a global destructor function for \a VD.
- clang::SourceLocation Loc
- Location of threadprivate declaration.
¶void emitUDMapperArrayInitOrDel(
clang::CodeGen::CodeGenFunction& MapperCGF,
llvm::Value* Handle,
llvm::Value* BasePtr,
llvm::Value* Ptr,
llvm::Value* Size,
llvm::Value* MapType,
llvm::Value* MapName,
clang::CharUnits ElementSize,
llvm::BasicBlock* ExitBB,
bool IsInit)
void emitUDMapperArrayInitOrDel(
clang::CodeGen::CodeGenFunction& MapperCGF,
llvm::Value* Handle,
llvm::Value* BasePtr,
llvm::Value* Ptr,
llvm::Value* Size,
llvm::Value* MapType,
llvm::Value* MapName,
clang::CharUnits ElementSize,
llvm::BasicBlock* ExitBB,
bool IsInit)
Description
Emit the array initialization or deletion portion for user-defined mapper code generation.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:845
Parameters
- clang::CodeGen::CodeGenFunction& MapperCGF
- llvm::Value* Handle
- llvm::Value* BasePtr
- llvm::Value* Ptr
- llvm::Value* Size
- llvm::Value* MapType
- llvm::Value* MapName
- clang::CharUnits ElementSize
- llvm::BasicBlock* ExitBB
- bool IsInit
¶void emitUpdateClause(
clang::CodeGen::CodeGenFunction& CGF,
clang::CodeGen::LValue DepobjLVal,
clang::OpenMPDependClauseKind NewDepKind,
clang::SourceLocation Loc)
void emitUpdateClause(
clang::CodeGen::CodeGenFunction& CGF,
clang::CodeGen::LValue DepobjLVal,
clang::OpenMPDependClauseKind NewDepKind,
clang::SourceLocation Loc)
Description
Updates the dependency kind in the specified depobj object.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1914
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- clang::CodeGen::LValue DepobjLVal
- LValue for the main depobj object.
- clang::OpenMPDependClauseKind NewDepKind
- New dependency kind.
- clang::SourceLocation Loc
¶llvm::Value* emitUpdateLocation(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc,
unsigned int Flags = 0)
llvm::Value* emitUpdateLocation(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc,
unsigned int Flags = 0)
Description
Emits object of ident_t type with info for source location.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:343
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- clang::SourceLocation Loc
- unsigned int Flags = 0
- Flags for OpenMP location.
¶void emitUserDefinedMapper(
const clang::OMPDeclareMapperDecl* D,
clang::CodeGen::CodeGenFunction* CGF =
nullptr)
void emitUserDefinedMapper(
const clang::OMPDeclareMapperDecl* D,
clang::CodeGen::CodeGenFunction* CGF =
nullptr)
Description
Emit the function for the user defined mapper construct.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:950
Parameters
- const clang::OMPDeclareMapperDecl* D
- clang::CodeGen::CodeGenFunction* CGF = nullptr
¶virtual void emitUserDefinedReduction(
clang::CodeGen::CodeGenFunction* CGF,
const clang::OMPDeclareReductionDecl* D)
virtual void emitUserDefinedReduction(
clang::CodeGen::CodeGenFunction* CGF,
const clang::OMPDeclareReductionDecl* D)
Description
Emit code for the specified user defined reduction construct.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:943
Parameters
¶void emitUsesAllocatorsFini(
clang::CodeGen::CodeGenFunction& CGF,
const clang::Expr* Allocator)
void emitUsesAllocatorsFini(
clang::CodeGen::CodeGenFunction& CGF,
const clang::Expr* Allocator)
Description
Destroys user defined allocators specified in the uses_allocators clause.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1923
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- const clang::Expr* Allocator
¶void emitUsesAllocatorsInit(
clang::CodeGen::CodeGenFunction& CGF,
const clang::Expr* Allocator,
const clang::Expr* AllocatorTraits)
void emitUsesAllocatorsInit(
clang::CodeGen::CodeGenFunction& CGF,
const clang::Expr* Allocator,
const clang::Expr* AllocatorTraits)
Description
Initializes user defined allocators specified in the uses_allocators clauses.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1919
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- const clang::Expr* Allocator
- const clang::Expr* AllocatorTraits
¶virtual void functionFinished(
clang::CodeGen::CodeGenFunction& CGF)
virtual void functionFinished(
clang::CodeGen::CodeGenFunction& CGF)
Description
Cleans up references to the objects in finished function.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1004
Parameters
¶virtual clang::CodeGen::Address
getAddrOfArtificialThreadPrivate(
clang::CodeGen::CodeGenFunction& CGF,
clang::QualType VarType,
llvm::StringRef Name)
virtual clang::CodeGen::Address
getAddrOfArtificialThreadPrivate(
clang::CodeGen::CodeGenFunction& CGF,
clang::QualType VarType,
llvm::StringRef Name)
Description
Creates artificial threadprivate variable with name \p Name and type \p VarType.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1318
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- clang::QualType VarType
- Type of the artificial threadprivate variable.
- llvm::StringRef Name
- Name of the artificial threadprivate variable.
¶virtual clang::CodeGen::Address
getAddrOfDeclareTargetVar(
const clang::VarDecl* VD)
virtual clang::CodeGen::Address
getAddrOfDeclareTargetVar(
const clang::VarDecl* VD)
Description
Returns the address of the variable marked as declare target with link clause OR as declare target with to clause and unified memory.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1291
Parameters
- const clang::VarDecl* VD
¶virtual clang::CodeGen::Address
getAddrOfThreadPrivate(
clang::CodeGen::CodeGenFunction& CGF,
const clang::VarDecl* VD,
clang::CodeGen::Address VDAddr,
clang::SourceLocation Loc)
virtual clang::CodeGen::Address
getAddrOfThreadPrivate(
clang::CodeGen::CodeGenFunction& CGF,
const clang::VarDecl* VD,
clang::CodeGen::Address VDAddr,
clang::SourceLocation Loc)
Description
Returns address of the threadprivate variable for the current thread.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1284
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- const clang::VarDecl* VD
- Threadprivate variable.
- clang::CodeGen::Address VDAddr
- Address of the global variable \a VD.
- clang::SourceLocation Loc
- Location of the reference to threadprivate var.
Returns
Address of the threadprivate variable for the current thread.
¶virtual clang::CodeGen::Address
getAddressOfLocalVariable(
clang::CodeGen::CodeGenFunction& CGF,
const clang::VarDecl* VD)
virtual clang::CodeGen::Address
getAddressOfLocalVariable(
clang::CodeGen::CodeGenFunction& CGF,
const clang::VarDecl* VD)
Description
Gets the OpenMP-specific address of the local variable.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1802
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- const clang::VarDecl* VD
¶llvm::Value* getCriticalRegionLock(
llvm::StringRef CriticalName)
llvm::Value* getCriticalRegionLock(
llvm::StringRef CriticalName)
Description
Returns corresponding lock object for the specified critical region name. If the lock object does not exist it is created, otherwise the reference to the existing copy is returned.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:420
Parameters
- llvm::StringRef CriticalName
- Name of the critical region.
¶virtual void getDefaultDistScheduleAndChunk(
clang::CodeGen::CodeGenFunction& CGF,
const clang::OMPLoopDirective& S,
clang::OpenMPDistScheduleClauseKind&
ScheduleKind,
llvm::Value*& Chunk) const
virtual void getDefaultDistScheduleAndChunk(
clang::CodeGen::CodeGenFunction& CGF,
const clang::OMPLoopDirective& S,
clang::OpenMPDistScheduleClauseKind&
ScheduleKind,
llvm::Value*& Chunk) const
Description
Choose default schedule type and chunk value for the dist_schedule clause.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1780
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- const clang::OMPLoopDirective& S
- clang::OpenMPDistScheduleClauseKind& ScheduleKind
- llvm::Value*& Chunk
¶static unsigned int getDefaultFlagsForBarriers(
clang::OpenMPDirectiveKind Kind)
static unsigned int getDefaultFlagsForBarriers(
clang::OpenMPDirectiveKind Kind)
Description
Returns default flags for the barriers depending on the directive, for which this barier is going to be emitted.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:410
Parameters
- clang::OpenMPDirectiveKind Kind
¶virtual unsigned int
getDefaultLocationReserved2Flags() const
virtual unsigned int
getDefaultLocationReserved2Flags() const
Description
Returns additional flags that can be stored in reserved_2 field of the default location.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:406
¶llvm::AtomicOrdering getDefaultMemoryOrdering()
const
llvm::AtomicOrdering getDefaultMemoryOrdering()
const
Description
Gets default memory ordering as specified in requires directive.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1823
¶virtual void getDefaultScheduleAndChunk(
clang::CodeGen::CodeGenFunction& CGF,
const clang::OMPLoopDirective& S,
clang::OpenMPScheduleClauseKind& ScheduleKind,
const clang::Expr*& ChunkExpr) const
virtual void getDefaultScheduleAndChunk(
clang::CodeGen::CodeGenFunction& CGF,
const clang::OMPLoopDirective& S,
clang::OpenMPScheduleClauseKind& ScheduleKind,
const clang::Expr*& ChunkExpr) const
Description
Choose default schedule type and chunk value for the schedule clause.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1786
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- const clang::OMPLoopDirective& S
- clang::OpenMPScheduleClauseKind& ScheduleKind
- const clang::Expr*& ChunkExpr
¶std::pair<llvm::Value*, LValue> getDepobjElements(
clang::CodeGen::CodeGenFunction& CGF,
clang::CodeGen::LValue DepobjLVal,
clang::SourceLocation Loc)
std::pair<llvm::Value*, LValue> getDepobjElements(
clang::CodeGen::CodeGenFunction& CGF,
clang::CodeGen::LValue DepobjLVal,
clang::SourceLocation Loc)
Description
Returns the number of the elements and the address of the depobj dependency array.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:905
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- clang::CodeGen::LValue DepobjLVal
- clang::SourceLocation Loc
Returns
Number of elements in depobj array and the pointer to the array of dependencies.
¶llvm::Type* getIdentTyPointerTy()
llvm::Type* getIdentTyPointerTy()
Description
Returns pointer to ident_t type.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:376
¶llvm::ArrayType* getKmpCriticalNameTy() const
llvm::ArrayType* getKmpCriticalNameTy() const
Description
Get the LLVM type for the critical name.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:413
¶llvm::Type* getKmpc_MicroPointerTy()
llvm::Type* getKmpc_MicroPointerTy()
Description
Returns pointer to kmpc_micro type.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:786
¶std::string getName(
ArrayRef<llvm::StringRef> Parts) const
std::string getName(
ArrayRef<llvm::StringRef> Parts) const
Description
Get the platform-specific name separator.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:940
Parameters
- ArrayRef<llvm::StringRef> Parts
¶const clang::Expr*
getNumTeamsExprForTargetDirective(
clang::CodeGen::CodeGenFunction& CGF,
const clang::OMPExecutableDirective& D,
int32_t& DefaultVal)
const clang::Expr*
getNumTeamsExprForTargetDirective(
clang::CodeGen::CodeGenFunction& CGF,
const clang::OMPExecutableDirective& D,
int32_t& DefaultVal)
Description
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.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:354
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- const clang::OMPExecutableDirective& D
- int32_t& DefaultVal
¶const clang::Expr*
getNumThreadsExprForTargetDirective(
clang::CodeGen::CodeGenFunction& CGF,
const clang::OMPExecutableDirective& D,
int32_t& DefaultVal)
const clang::Expr*
getNumThreadsExprForTargetDirective(
clang::CodeGen::CodeGenFunction& CGF,
const clang::OMPExecutableDirective& D,
int32_t& DefaultVal)
Description
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.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:368
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- const clang::OMPExecutableDirective& D
- int32_t& DefaultVal
¶llvm::OpenMPIRBuilder& getOMPBuilder()
llvm::OpenMPIRBuilder& getOMPBuilder()
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:305
¶llvm::GlobalVariable* getOrCreateInternalVariable(
llvm::Type* Ty,
const llvm::Twine& Name,
unsigned int AddressSpace = 0)
llvm::GlobalVariable* getOrCreateInternalVariable(
llvm::Type* Ty,
const llvm::Twine& Name,
unsigned int AddressSpace = 0)
Description
Gets (if variable with the given name already exist) or creates internal global variable with the specified Name. The created variable has linkage CommonLinkage by default and is initialized by null value.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:823
Parameters
- llvm::Type* Ty
- Type of the global variable. If it is exist already the type must be the same.
- const llvm::Twine& Name
- Name of the variable.
- unsigned int AddressSpace = 0
¶llvm::Constant* getOrCreateThreadPrivateCache(
const clang::VarDecl* VD)
llvm::Constant* getOrCreateThreadPrivateCache(
const clang::VarDecl* VD)
Description
If the specified mangled name is not in the module, create and return threadprivate cache object. This object is a pointer's worth of storage that's reserved for use by the OpenMP runtime.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:815
Parameters
- const clang::VarDecl* VD
- Threadprivate variable.
Returns
Cache variable for the specified threadprivate.
¶llvm::Function* getOrCreateUserDefinedMapperFunc(
const clang::OMPDeclareMapperDecl* D)
llvm::Function* getOrCreateUserDefinedMapperFunc(
const clang::OMPDeclareMapperDecl* D)
Description
Get the function for the specified user-defined mapper. If it does not exist, create one.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:955
Parameters
- const clang::OMPDeclareMapperDecl* D
¶virtual llvm::StringRef getOutlinedHelperName()
const
virtual llvm::StringRef getOutlinedHelperName()
const
Description
Get the function name of an outlined region.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:385
¶virtual clang::CodeGen::Address
getParameterAddress(
clang::CodeGen::CodeGenFunction& CGF,
const clang::VarDecl* NativeParam,
const clang::VarDecl* TargetParam) const
virtual clang::CodeGen::Address
getParameterAddress(
clang::CodeGen::CodeGenFunction& CGF,
const clang::VarDecl* NativeParam,
const clang::VarDecl* TargetParam) const
Description
Gets the address of the native argument basing on the address of the target-specific parameter.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1774
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- const clang::VarDecl* NativeParam
- Parameter itself.
- const clang::VarDecl* TargetParam
- Corresponding target-specific parameter.
¶static const clang::Stmt* getSingleCompoundChild(
clang::ASTContext& Ctx,
const clang::Stmt* Body)
static const clang::Stmt* getSingleCompoundChild(
clang::ASTContext& Ctx,
const clang::Stmt* Body)
Description
Checks if the \p Body is the \a CompoundStmt and returns its child statement iff there is only one that is not evaluatable at the compile time.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:937
Parameters
- clang::ASTContext& Ctx
- const clang::Stmt* Body
¶virtual clang::CodeGen::Address
getTaskReductionItem(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc,
llvm::Value* ReductionsPtr,
clang::CodeGen::LValue SharedLVal)
virtual clang::CodeGen::Address
getTaskReductionItem(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc,
llvm::Value* ReductionsPtr,
clang::CodeGen::LValue SharedLVal)
Description
Get the address of `void *` type of the privatue copy of the reduction item specified by the \p SharedLVal.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1544
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- clang::SourceLocation Loc
- llvm::Value* ReductionsPtr
- Pointer to the reduction data returned by the emitTaskReductionInit function.
- clang::CodeGen::LValue SharedLVal
- Address of the original reduction item.
¶llvm::Value* getThreadID(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc)
llvm::Value* getThreadID(
clang::CodeGen::CodeGenFunction& CGF,
clang::SourceLocation Loc)
Description
Gets thread id value for the current thread.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:380
Parameters
¶virtual std::pair<llvm::Function*,
llvm::Function*>
getUserDefinedReduction(
const clang::OMPDeclareReductionDecl* D)
virtual std::pair<llvm::Function*,
llvm::Function*>
getUserDefinedReduction(
const clang::OMPDeclareReductionDecl* D)
Description
Get combiner/initializer for the specified user-defined reduction, if any.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:947
Parameters
- const clang::OMPDeclareReductionDecl* D
¶virtual bool hasAllocateAttributeForGlobalVar(
const clang::VarDecl* VD,
clang::LangAS& AS)
virtual bool hasAllocateAttributeForGlobalVar(
const clang::VarDecl* VD,
clang::LangAS& AS)
Description
Checks if the variable has associated OMPAllocateDeclAttr attribute with the predefined allocator and translates it into the corresponding address space.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1828
Parameters
- const clang::VarDecl* VD
- clang::LangAS& AS
¶bool hasRequiresUnifiedSharedMemory() const
bool hasRequiresUnifiedSharedMemory() const
Description
Return whether the unified_shared_memory has been specified.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1831
¶virtual bool isDefaultLocationConstant() const
virtual bool isDefaultLocationConstant() const
Description
Check if the default location must be constant. Default is false to support OMPT/OMPD.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:402
¶virtual bool isDynamic(
clang::OpenMPScheduleClauseKind ScheduleKind)
const
virtual bool isDynamic(
clang::OpenMPScheduleClauseKind ScheduleKind)
const
Description
Check if the specified \a ScheduleKind is dynamic. This kind of worksharing directive is emitted without outer loop.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1123
Parameters
- clang::OpenMPScheduleClauseKind ScheduleKind
- Schedule Kind specified in the 'schedule' clause.
¶bool isLocalVarInUntiedTask(
clang::CodeGen::CodeGenFunction& CGF,
const clang::VarDecl* VD) const
bool isLocalVarInUntiedTask(
clang::CodeGen::CodeGenFunction& CGF,
const clang::VarDecl* VD) const
Description
Returns true if the variable is a local variable in untied task.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1926
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- const clang::VarDecl* VD
¶bool isNontemporalDecl(
const clang::ValueDecl* VD) const
bool isNontemporalDecl(
const clang::ValueDecl* VD) const
Description
Checks if the \p VD variable is marked as nontemporal declaration in current context.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1835
Parameters
- const clang::ValueDecl* VD
¶virtual bool isStaticChunked(
clang::OpenMPScheduleClauseKind ScheduleKind,
bool Chunked) const
virtual bool isStaticChunked(
clang::OpenMPScheduleClauseKind ScheduleKind,
bool Chunked) const
Description
Check if the specified \a ScheduleKind is static chunked.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1109
Parameters
- clang::OpenMPScheduleClauseKind ScheduleKind
- Schedule kind specified in the 'schedule' clause.
- bool Chunked
- True if chunk is specified in the clause.
¶virtual bool isStaticChunked(
clang::OpenMPDistScheduleClauseKind
ScheduleKind,
bool Chunked) const
virtual bool isStaticChunked(
clang::OpenMPDistScheduleClauseKind
ScheduleKind,
bool Chunked) const
Description
Check if the specified \a ScheduleKind is static non-chunked.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1116
Parameters
- clang::OpenMPDistScheduleClauseKind ScheduleKind
- Schedule kind specified in the 'dist_schedule' clause.
- bool Chunked
- True if chunk is specified in the clause.
¶virtual bool isStaticNonchunked(
clang::OpenMPScheduleClauseKind ScheduleKind,
bool Chunked) const
virtual bool isStaticNonchunked(
clang::OpenMPScheduleClauseKind ScheduleKind,
bool Chunked) const
Description
Check if the specified \a ScheduleKind is static non-chunked. This kind of worksharing directive is emitted without outer loop.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1094
Parameters
- clang::OpenMPScheduleClauseKind ScheduleKind
- Schedule kind specified in the 'schedule' clause.
- bool Chunked
- True if chunk is specified in the clause.
¶virtual bool isStaticNonchunked(
clang::OpenMPDistScheduleClauseKind
ScheduleKind,
bool Chunked) const
virtual bool isStaticNonchunked(
clang::OpenMPDistScheduleClauseKind
ScheduleKind,
bool Chunked) const
Description
Check if the specified \a ScheduleKind is static non-chunked. This kind of distribute directive is emitted without outer loop.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1102
Parameters
- clang::OpenMPDistScheduleClauseKind ScheduleKind
- Schedule kind specified in the 'dist_schedule' clause.
- bool Chunked
- True if chunk is specified in the clause.
¶void loadOffloadInfoMetadata()
void loadOffloadInfoMetadata()
Description
Loads all the offload entries information from the host IR metadata.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:774
¶bool markAsGlobalTarget(clang::GlobalDecl GD)
bool markAsGlobalTarget(clang::GlobalDecl GD)
Description
Marks the declaration as already emitted for the device code and returns true, if it was marked already, and false, otherwise.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1807
Parameters
¶virtual void processRequiresDirective(
const clang::OMPRequiresDecl* D)
virtual void processRequiresDirective(
const clang::OMPRequiresDecl* D)
Description
Perform check on requires decl to ensure that target architecture supports unified addressing
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1820
Parameters
- const clang::OMPRequiresDecl* D
¶virtual void registerTargetGlobalVariable(
const clang::VarDecl* VD,
llvm::Constant* Addr)
virtual void registerTargetGlobalVariable(
const clang::VarDecl* VD,
llvm::Constant* Addr)
Description
Checks if the provided global decl \a GD is a declare target variable and registers it when emitting code for the host.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1618
Parameters
- const clang::VarDecl* VD
- llvm::Constant* Addr
¶void scanForTargetRegionsFunctions(
const clang::Stmt* S,
llvm::StringRef ParentName)
void scanForTargetRegionsFunctions(
const clang::Stmt* S,
llvm::StringRef ParentName)
Description
Start scanning from statement \a S and and emit all target regions found along the way.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:780
Parameters
- const clang::Stmt* S
- Starting statement.
- llvm::StringRef ParentName
- Name of the function declaration that is being scanned.
¶void setLocThreadIdInsertPt(
clang::CodeGen::CodeGenFunction& CGF,
bool AtCurrentPoint = false)
void setLocThreadIdInsertPt(
clang::CodeGen::CodeGenFunction& CGF,
bool AtCurrentPoint = false)
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:396
Parameters
- clang::CodeGen::CodeGenFunction& CGF
- bool AtCurrentPoint = false
¶virtual const clang::VarDecl* translateParameter(
const clang::FieldDecl* FD,
const clang::VarDecl* NativeParam) const
virtual const clang::VarDecl* translateParameter(
const clang::FieldDecl* FD,
const clang::VarDecl* NativeParam) const
Description
Translates the native parameter of outlined function if this is required for target.
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:1765
Parameters
- const clang::FieldDecl* FD
- Field decl from captured record for the parameter.
- const clang::VarDecl* NativeParam
- Parameter itself.
¶virtual ~CGOpenMPRuntime()
virtual ~CGOpenMPRuntime()
Declared at: clang/lib/CodeGen/CGOpenMPRuntime.h:920