14 #ifndef LLVM_CLANG_LIB_CODEGEN_CGOPENMPRUNTIME_H
15 #define LLVM_CLANG_LIB_CODEGEN_CGOPENMPRUNTIME_H
21 #include "llvm/ADT/DenseMap.h"
22 #include "llvm/ADT/SmallPtrSet.h"
23 #include "llvm/ADT/StringMap.h"
24 #include "llvm/IR/Function.h"
25 #include "llvm/IR/ValueHandle.h"
41 class OMPExecutableDirective;
42 class OMPLoopDirective;
44 class OMPDeclareReductionDecl;
49 class CodeGenFunction;
71 template <
typename Callable>
74 return (*reinterpret_cast<Callable *>(CodeGen))(CGF,
Action);
78 template <
typename Callable>
81 typename std::enable_if<
84 : CodeGen(reinterpret_cast<
intptr_t>(&CodeGen)),
85 Callback(CallbackFn<typename std::remove_reference<Callable>::
type>),
86 PrePostAction(nullptr) {}
100 llvm::PointerIntPair<llvm::Value *, 1, bool>
Final;
101 llvm::PointerIntPair<llvm::Value *, 1, bool>
Schedule;
102 llvm::PointerIntPair<llvm::Value *, 1, bool>
Priority;
127 StringRef ParentName,
128 llvm::Function *&OutlinedFn,
129 llvm::Constant *&OutlinedFnID,
136 llvm::Constant *DefaultOpenMPPSource =
nullptr;
138 typedef llvm::DenseMap<unsigned, llvm::Value *> OpenMPDefaultLocMapTy;
139 OpenMPDefaultLocMapTy OpenMPDefaultLocMap;
140 Address getOrCreateDefaultLocation(
unsigned Flags);
142 llvm::StructType *IdentTy =
nullptr;
144 typedef llvm::DenseMap<unsigned, llvm::Value *> OpenMPDebugLocMapTy;
145 OpenMPDebugLocMapTy OpenMPDebugLocMap;
149 llvm::FunctionType *Kmpc_MicroTy =
nullptr;
151 struct DebugLocThreadIdTy {
156 typedef llvm::DenseMap<llvm::Function *, DebugLocThreadIdTy>
157 OpenMPLocThreadIDMapTy;
158 OpenMPLocThreadIDMapTy OpenMPLocThreadIDMap;
161 std::pair<llvm::Function *, llvm::Function *>>
165 typedef llvm::DenseMap<llvm::Function *,
168 FunctionUDRMapTy FunctionUDRMap;
175 llvm::ArrayType *KmpCriticalNameTy;
181 llvm::StringMap<llvm::AssertingVH<llvm::Constant>, llvm::BumpPtrAllocator>
245 unsigned OffloadingEntriesNum;
255 OFFLOAD_ENTRY_INFO_TARGET_REGION = 0,
257 OFFLOAD_ENTRY_INFO_INVALID = ~0u
262 : Order(Order), Kind(Kind) {}
279 unsigned size()
const {
return OffloadingEntriesNum; }
281 : CGM(CGM), OffloadingEntriesNum(0) {}
289 llvm::Constant *Addr;
296 Addr(nullptr),
ID(nullptr) {}
298 llvm::Constant *Addr,
301 Addr(Addr), ID(ID) {}
306 assert(!Addr &&
"Address as been set before!");
310 assert(!
ID &&
"ID as been set before!");
314 return Info->
getKind() == OFFLOAD_ENTRY_INFO_TARGET_REGION;
318 void initializeTargetRegionEntryInfo(
unsigned DeviceID,
unsigned FileID,
319 StringRef ParentName,
unsigned LineNum,
322 void registerTargetRegionEntryInfo(
unsigned DeviceID,
unsigned FileID,
323 StringRef ParentName,
unsigned LineNum,
324 llvm::Constant *Addr,
328 bool hasTargetRegionEntryInfo(
unsigned DeviceID,
unsigned FileID,
329 StringRef ParentName,
unsigned LineNum)
const;
331 typedef llvm::function_ref<void(
unsigned,
unsigned, StringRef,
unsigned,
332 OffloadEntryInfoTargetRegion &)>
334 void actOnTargetRegionEntriesInfo(
340 typedef llvm::DenseMap<unsigned, OffloadEntryInfoTargetRegion>
341 OffloadEntriesTargetRegionPerLine;
342 typedef llvm::StringMap<OffloadEntriesTargetRegionPerLine>
343 OffloadEntriesTargetRegionPerParentName;
344 typedef llvm::DenseMap<unsigned, OffloadEntriesTargetRegionPerParentName>
345 OffloadEntriesTargetRegionPerFile;
346 typedef llvm::DenseMap<unsigned, OffloadEntriesTargetRegionPerFile>
347 OffloadEntriesTargetRegionPerDevice;
348 typedef OffloadEntriesTargetRegionPerDevice OffloadEntriesTargetRegionTy;
349 OffloadEntriesTargetRegionTy OffloadEntriesTargetRegion;
438 const llvm::Twine &
Name);
498 virtual void clear();
504 virtual std::pair<llvm::Function *, llvm::Function *>
537 bool Tied,
unsigned &NumberOfParts);
564 const RegionCodeGenTy &CriticalOpGen,
566 const Expr *Hint =
nullptr);
572 const RegionCodeGenTy &MasterOpGen,
582 const RegionCodeGenTy &TaskgroupOpGen,
589 const RegionCodeGenTy &SingleOpGen,
600 const RegionCodeGenTy &OrderedOpGen,
613 bool EmitChecks =
true,
614 bool ForceSimpleCall =
false);
640 unsigned IVSize,
bool IVSigned,
bool Ordered,
670 unsigned IVSize,
bool IVSigned,
bool Ordered,
671 Address IL, Address LB, Address UB, Address ST,
694 unsigned IVSize,
bool IVSigned,
695 bool Ordered, Address IL, Address LB,
696 Address UB, Address ST,
734 unsigned IVSize,
bool IVSigned,
735 Address IL, Address LB,
736 Address UB, Address ST);
771 virtual llvm::Function *
774 CodeGenFunction *CGF =
nullptr);
858 bool HasCancel =
false);
902 bool WithNowait,
bool SimpleReduction);
934 StringRef ParentName,
935 llvm::Function *&OutlinedFn,
936 llvm::Constant *&OutlinedFnID,
1009 const Expr *IfCond,
const Expr *Device,
1022 const Expr *Device);
1029 llvm::Function *Fn);
FunctionDecl - An instance of this class is created to represent a function declaration or definition...
virtual void emitForDispatchInit(CodeGenFunction &CGF, SourceLocation Loc, const OpenMPScheduleTy &ScheduleKind, unsigned IVSize, bool IVSigned, bool Ordered, llvm::Value *UB, llvm::Value *Chunk=nullptr)
QualType TgtDeviceImageQTy
struct __tgt_device_image{ void *ImageStart; // Pointer to the target code start. ...
Scheduling data for loop-based OpenMP directives.
A (possibly-)qualified type.
virtual void emitDistributeStaticInit(CodeGenFunction &CGF, SourceLocation Loc, OpenMPDistScheduleClauseKind SchedKind, unsigned IVSize, bool IVSigned, bool Ordered, Address IL, Address LB, Address UB, Address ST, llvm::Value *Chunk=nullptr)
virtual bool emitTargetGlobalVariable(GlobalDecl GD)
Emit the global variable if it is a valid device global variable.
llvm::SmallPtrSet< const VarDecl *, 4 > ThreadPrivateWithDefinition
Set of threadprivate variables with the generated initializer.
virtual void emitUserDefinedReduction(CodeGenFunction *CGF, const OMPDeclareReductionDecl *D)
Emit code for the specified user defined reduction construct.
OffloadEntriesInfoManagerTy(CodeGenModule &CGM)
C Language Family Type Representation.
QualType getTgtBinaryDescriptorQTy()
Returns __tgt_bin_desc type.
SmallVector< std::pair< OpenMPDependClauseKind, const Expr * >, 4 > Dependences
virtual bool emitTargetGlobal(GlobalDecl GD)
Emit the global GD if it is meaningful for the target.
SmallVector< const Expr *, 4 > LastprivateCopies
llvm::Constant * getOrCreateInternalVariable(llvm::Type *Ty, const llvm::Twine &Name)
Gets (if variable with the given name already exist) or creates internal global variable with the spe...
void scanForTargetRegionsFunctions(const Stmt *S, StringRef ParentName)
Start scanning from statement S and and emit all target regions found along the way.
llvm::Value * getCriticalRegionLock(StringRef CriticalName)
Returns corresponding lock object for the specified critical region name.
VarDecl - An instance of this class is created to represent a variable declaration or definition...
OffloadEntryInfo(OffloadingEntryInfoKinds Kind, unsigned Order)
virtual void Exit(CodeGenFunction &CGF)
llvm::Value * getThreadID(CodeGenFunction &CGF, SourceLocation Loc)
Gets thread id value for the current thread.
virtual bool isDynamic(OpenMPScheduleClauseKind ScheduleKind) const
Check if the specified ScheduleKind is dynamic.
OffloadEntryInfoTargetRegion()
OffloadingEntryInfoKinds
Kind of a given entry.
void createOffloadEntriesAndInfoMetadata()
Creates all the offload entries in the current compilation unit along with the associated metadata...
QualType getTgtOffloadEntryQTy()
Returns __tgt_offload_entry type.
SmallVector< const Expr *, 4 > PrivateVars
RecordDecl - Represents a struct/union/class.
virtual void createOffloadEntry(llvm::Constant *ID, llvm::Constant *Addr, uint64_t Size)
Creates offloading entry for the provided entry ID ID, address Addr and size Size.
llvm::Constant * getAddress() const
One of these records is kept for each identifier that is lexed.
class LLVM_ALIGNAS(8) DependentTemplateSpecializationType const IdentifierInfo * Name
Represents a template specialization type whose template cannot be resolved, e.g. ...
CodeGenFunction - This class organizes the per-function state that is used while generating LLVM code...
virtual void emitFlush(CodeGenFunction &CGF, ArrayRef< const Expr * > Vars, SourceLocation Loc)
Emit flush of the variables specified in 'omp flush' directive.
SmallVector< const Expr *, 4 > LastprivateVars
virtual void emitCancellationPointCall(CodeGenFunction &CGF, SourceLocation Loc, OpenMPDirectiveKind CancelRegion)
Emit code for 'cancellation point' construct.
Defines some OpenMP-specific enums and functions.
llvm::Type * getKmpc_MicroPointerTy()
Returns pointer to kmpc_micro type.
virtual bool emitTargetFunctions(GlobalDecl GD)
Emit the target regions enclosed in GD function definition or the function itself in case it is a val...
This is a common base class for loop directives ('omp simd', 'omp for', 'omp for simd' etc...
unsigned size() const
Return number of entries defined so far.
static bool classof(const OffloadEntryInfo *Info)
OpenMPDistScheduleClauseKind
OpenMP attributes for 'dist_schedule' clause.
virtual void emitForStaticInit(CodeGenFunction &CGF, SourceLocation Loc, const OpenMPScheduleTy &ScheduleKind, unsigned IVSize, bool IVSigned, bool Ordered, Address IL, Address LB, Address UB, Address ST, llvm::Value *Chunk=nullptr)
Call the appropriate runtime routine to initialize it before start of loop.
QualType TgtOffloadEntryQTy
Type struct __tgt_offload_entry{ void *addr; // Pointer to the offload entry info.
virtual std::pair< llvm::Function *, llvm::Function * > getUserDefinedReduction(const OMPDeclareReductionDecl *D)
Get combiner/initializer for the specified user-defined reduction, if any.
SmallVector< const Expr *, 4 > PrivateCopies
llvm::Type * getIdentTyPointerTy()
Returns pointer to ident_t type.
Base class of the entries info.
virtual void emitDeclareSimdFunction(const FunctionDecl *FD, llvm::Function *Fn)
Marks function Fn with properly mangled versions of vector functions.
SmallVector< const Expr *, 4 > FirstprivateCopies
__INTPTR_TYPE__ intptr_t
A signed integer type with the property that any valid pointer to void can be converted to this type...
virtual void emitReduction(CodeGenFunction &CGF, SourceLocation Loc, ArrayRef< const Expr * > Privates, ArrayRef< const Expr * > LHSExprs, ArrayRef< const Expr * > RHSExprs, ArrayRef< const Expr * > ReductionOps, bool WithNowait, bool SimpleReduction)
Emit a code for reduction clause.
virtual llvm::Value * emitForNext(CodeGenFunction &CGF, SourceLocation Loc, unsigned IVSize, bool IVSigned, Address IL, Address LB, Address UB, Address ST)
Call __kmpc_dispatch_next( ident_t *loc, kmp_int32 tid, kmp_int32 *p_lastiter, kmp_int[32|64] *p_lowe...
virtual llvm::Value * emitTaskOutlinedFunction(const OMPExecutableDirective &D, const VarDecl *ThreadIDVar, const VarDecl *PartIDVar, const VarDecl *TaskTVar, OpenMPDirectiveKind InnermostKind, const RegionCodeGenTy &CodeGen, bool Tied, unsigned &NumberOfParts)
Emits outlined function for the OpenMP task directive D.
i32 captured_struct **param SharedsTy A type which contains references the shared variables *param Shareds Context with the list of shared variables from the p *TaskFunction *param IfCond Not a nullptr if if clause was nullptr *otherwise *param Data Additional data for task generation like final list of privates etc *virtual void emitTaskCall(CodeGenFunction &CGF, SourceLocation Loc, const OMPExecutableDirective &D, llvm::Value *TaskFunction, QualType SharedsTy, Address Shareds, const Expr *IfCond, const OMPTaskDataTy &Data)
virtual void emitOrderedRegion(CodeGenFunction &CGF, const RegionCodeGenTy &OrderedOpGen, SourceLocation Loc, bool IsThreads)
Emit an ordered region.
llvm::Constant * createForStaticInitFunction(unsigned IVSize, bool IVSigned)
Returns __kmpc_for_static_init_* runtime function for the specified size IVSize and sign IVSigned...
virtual void emitBarrierCall(CodeGenFunction &CGF, SourceLocation Loc, OpenMPDirectiveKind Kind, bool EmitChecks=true, bool ForceSimpleCall=false)
Emit an implicit/explicit barrier for OpenMP threads.
llvm::Constant * createDispatchFiniFunction(unsigned IVSize, bool IVSigned)
Returns __kmpc_dispatch_fini_* runtime function for the specified size IVSize and sign IVSigned...
QualType getTgtDeviceImageQTy()
Returns __tgt_device_image type.
This represents implicit clause 'depend' for the '#pragma omp task' directive.
unsigned getOrder() const
RegionCodeGenTy(Callable &&CodeGen, typename std::enable_if< !std::is_same< typename std::remove_reference< Callable >::type, RegionCodeGenTy >::value >::type *=nullptr)
Expr - This represents one expression.
virtual void emitDoacrossOrdered(CodeGenFunction &CGF, const OMPDependClause *C)
Emit code for doacross ordered directive with 'depend' clause.
void loadOffloadInfoMetadata()
Loads all the offload entries information from the host IR metadata.
void emitKmpRoutineEntryT(QualType KmpInt32Ty)
Build type kmp_routine_entry_t (if not built yet).
virtual ~CGOpenMPRuntime()
virtual void emitCriticalRegion(CodeGenFunction &CGF, StringRef CriticalName, const RegionCodeGenTy &CriticalOpGen, SourceLocation Loc, const Expr *Hint=nullptr)
Emits a critical region.
SmallVector< const Expr *, 4 > FirstprivateVars
virtual void emitTargetOutlinedFunctionHelper(const OMPExecutableDirective &D, StringRef ParentName, llvm::Function *&OutlinedFn, llvm::Constant *&OutlinedFnID, bool IsOffloadEntry, const RegionCodeGenTy &CodeGen)
Helper to emit outlined function for 'target' directive.
CGOpenMPRuntime(CodeGenModule &CGM)
OpenMPProcBindClauseKind
OpenMP attributes for 'proc_bind' clause.
virtual llvm::Function * emitRegistrationFunction()
Creates the offloading descriptor in the event any target region was emitted in the current module an...
llvm::Constant * createDispatchInitFunction(unsigned IVSize, bool IVSigned)
Returns __kmpc_dispatch_init_* runtime function for the specified size IVSize and sign IVSigned...
virtual void emitTaskwaitCall(CodeGenFunction &CGF, SourceLocation Loc)
Emit code for 'taskwait' directive.
GlobalDecl - represents a global declaration.
QualType KmpDependInfoTy
Type typedef struct kmp_depend_info { kmp_intptr_t base_addr; size_t len; struct { bool in:1; bool ou...
virtual void emitTargetDataCalls(CodeGenFunction &CGF, const OMPExecutableDirective &D, const Expr *IfCond, const Expr *Device, const RegionCodeGenTy &CodeGen)
Emit the target data mapping code associated with D.
QualType TgtBinaryDescriptorQTy
struct __tgt_bin_desc{ int32_t NumDevices; // Number of devices supported.
The l-value was considered opaque, so the alignment was determined from a type.
virtual ~PrePostActionTy()
OffloadingEntryInfoKinds Kind
llvm::Constant * getID() const
llvm::Value * emitUpdateLocation(CodeGenFunction &CGF, SourceLocation Loc, unsigned Flags=0)
Emits object of ident_t type with info for source location.
void functionFinished(CodeGenFunction &CGF)
Cleans up references to the objects in finished function.
Encodes a location in the source.
llvm::function_ref< void(unsigned, unsigned, StringRef, unsigned, OffloadEntryInfoTargetRegion &)> OffloadTargetRegionEntryInfoActTy
brief Applies action Action on all registered entries.
This represents '#pragma omp declare reduction ...' directive.
llvm::PointerIntPair< llvm::Value *, 1, bool > Final
virtual void emitNumTeamsClause(CodeGenFunction &CGF, const Expr *NumTeams, const Expr *ThreadLimit, SourceLocation Loc)
Emits call to void __kmpc_push_num_teams(ident_t *loc, kmp_int32 global_tid, kmp_int32 num_teams...
This is a basic class for representing single OpenMP executable directive.
i32 captured_struct **param SharedsTy A type which contains references the shared variables *param Shareds Context with the list of shared variables from the p *TaskFunction *param IfCond Not a nullptr if if clause was nullptr *otherwise *param Data Additional data for task generation like final list of privates etc *virtual void emitTaskLoopCall(CodeGenFunction &CGF, SourceLocation Loc, const OMPLoopDirective &D, llvm::Value *TaskFunction, QualType SharedsTy, Address Shareds, const Expr *IfCond, const OMPTaskDataTy &Data)
OffloadingEntryInfoKinds getKind() const
OpenMPDirectiveKind
OpenMP directives.
virtual void emitTaskyieldCall(CodeGenFunction &CGF, SourceLocation Loc)
Emits code for a taskyield directive.
Target region entries related.
OffloadEntryInfoTargetRegion(unsigned Order, llvm::Constant *Addr, llvm::Constant *ID)
virtual void emitTargetDataStandAloneCall(CodeGenFunction &CGF, const OMPExecutableDirective &D, const Expr *IfCond, const Expr *Device)
Emit the data mapping/movement code associated with the directive D that should be of the form 'targe...
virtual void Enter(CodeGenFunction &CGF)
void setAction(PrePostActionTy &Action) const
void emitThreadPrivateVarInit(CodeGenFunction &CGF, Address VDAddr, llvm::Value *Ctor, llvm::Value *CopyCtor, llvm::Value *Dtor, SourceLocation Loc)
Emits initialization code for the threadprivate variables.
i32 captured_struct **param SharedsTy A type which contains references the shared variables *param Shareds Context with the list of shared variables from the p *TaskFunction *param Data Additional data for task generation like final list of privates etc *TaskResultTy emitTaskInit(CodeGenFunction &CGF, SourceLocation Loc, const OMPExecutableDirective &D, llvm::Value *TaskFunction, QualType SharedsTy, Address Shareds, const OMPTaskDataTy &Data)
virtual Address emitThreadIDAddress(CodeGenFunction &CGF, SourceLocation Loc)
Emits address of the word in a memory where current thread id is stored.
An opaque identifier used by SourceManager which refers to a source file (MemoryBuffer) along with it...
This class organizes the cross-function state that is used while generating LLVM code.
Class provides a way to call simple version of codegen for OpenMP region, or an advanced with possibl...
void setAddress(llvm::Constant *V)
virtual void emitForStaticFinish(CodeGenFunction &CGF, SourceLocation Loc)
Call the appropriate runtime routine to notify that we finished all the work with current loop...
const internal::VariadicAllOfMatcher< Type > type
Matches Types in the clang AST.
A basic class for pre|post-action for advanced codegen sequence for OpenMP region.
virtual void emitMasterRegion(CodeGenFunction &CGF, const RegionCodeGenTy &MasterOpGen, SourceLocation Loc)
Emits a master region.
llvm::Function * createOffloadingBinaryDescriptorRegistration()
Creates and registers offloading binary descriptor for the current compilation unit.
virtual void emitTargetCall(CodeGenFunction &CGF, const OMPExecutableDirective &D, llvm::Value *OutlinedFn, llvm::Value *OutlinedFnID, const Expr *IfCond, const Expr *Device, ArrayRef< llvm::Value * > CapturedVars)
Emit the target offloading code associated with D.
llvm::PointerIntPair< llvm::Value *, 1, bool > Priority
virtual llvm::Function * emitThreadPrivateVarDefinition(const VarDecl *VD, Address VDAddr, SourceLocation Loc, bool PerformInit, CodeGenFunction *CGF=nullptr)
Emit a code for initialization of threadprivate variable.
virtual void emitTargetOutlinedFunction(const OMPExecutableDirective &D, StringRef ParentName, llvm::Function *&OutlinedFn, llvm::Constant *&OutlinedFnID, bool IsOffloadEntry, const RegionCodeGenTy &CodeGen)
Emit outilined function for 'target' directive.
OffloadEntriesInfoManagerTy OffloadEntriesInfoManager
static bool classof(const OffloadEntryInfo *Info)
virtual llvm::Value * emitParallelOrTeamsOutlinedFunction(const OMPExecutableDirective &D, const VarDecl *ThreadIDVar, OpenMPDirectiveKind InnermostKind, const RegionCodeGenTy &CodeGen)
Emits outlined function for the specified OpenMP parallel directive D.
virtual void emitInlinedDirective(CodeGenFunction &CGF, OpenMPDirectiveKind InnermostKind, const RegionCodeGenTy &CodeGen, bool HasCancel=false)
Emit code for the directive that does not require outlining.
OpenMPScheduleClauseKind
OpenMP attributes for 'schedule' clause.
Entity that registers the offloading constants that were emitted so far.
virtual bool isStaticNonchunked(OpenMPScheduleClauseKind ScheduleKind, bool Chunked) const
Check if the specified ScheduleKind is static non-chunked.
llvm::Constant * createDispatchNextFunction(unsigned IVSize, bool IVSigned)
Returns __kmpc_dispatch_next_* runtime function for the specified size IVSize and sign IVSigned...
virtual void emitCancelCall(CodeGenFunction &CGF, SourceLocation Loc, const Expr *IfCond, OpenMPDirectiveKind CancelRegion)
Emit code for 'cancel' construct.
virtual void emitTeamsCall(CodeGenFunction &CGF, const OMPExecutableDirective &D, SourceLocation Loc, llvm::Value *OutlinedFn, ArrayRef< llvm::Value * > CapturedVars)
Emits code for teams call of the OutlinedFn with variables captured in a record which address is stor...
Defines the clang::SourceLocation class and associated facilities.
llvm::PointerIntPair< llvm::Value *, 1, bool > Schedule
void setID(llvm::Constant *V)
Privates[]
Gets the list of initial values for linear variables.
virtual void emitForOrderedIterationEnd(CodeGenFunction &CGF, SourceLocation Loc, unsigned IVSize, bool IVSigned)
Call the appropriate runtime routine to notify that we finished iteration of the ordered loop with th...
virtual void emitNumThreadsClause(CodeGenFunction &CGF, llvm::Value *NumThreads, SourceLocation Loc)
Emits call to void __kmpc_push_num_threads(ident_t *loc, kmp_int32 global_tid, kmp_int32 num_threads)...
virtual Address getAddrOfThreadPrivate(CodeGenFunction &CGF, const VarDecl *VD, Address VDAddr, SourceLocation Loc)
Returns address of the threadprivate variable for the current thread.
virtual void emitProcBindClause(CodeGenFunction &CGF, OpenMPProcBindClauseKind ProcBind, SourceLocation Loc)
Emit call to void __kmpc_push_proc_bind(ident_t *loc, kmp_int32 global_tid, int proc_bind) to generat...
virtual void emitDoacrossInit(CodeGenFunction &CGF, const OMPLoopDirective &D)
Emit initialization for doacross loop nesting support.
QualType KmpDimTy
struct kmp_dim { // loop bounds info casted to kmp_int64 kmp_int64 lo; // lower kmp_int64 up; // uppe...
LValue - This represents an lvalue references.
llvm::Constant * createRuntimeFunction(unsigned Function)
Returns specified OpenMP runtime function.
virtual void emitTaskgroupRegion(CodeGenFunction &CGF, const RegionCodeGenTy &TaskgroupOpGen, SourceLocation Loc)
Emit a taskgroup region.
void operator()(CodeGenFunction &CGF) const
virtual void emitSingleRegion(CodeGenFunction &CGF, const RegionCodeGenTy &SingleOpGen, SourceLocation Loc, ArrayRef< const Expr * > CopyprivateVars, ArrayRef< const Expr * > DestExprs, ArrayRef< const Expr * > SrcExprs, ArrayRef< const Expr * > AssignmentOps)
Emits a single region.
SmallVector< const Expr *, 4 > FirstprivateInits
llvm::Constant * getOrCreateThreadPrivateCache(const VarDecl *VD)
If the specified mangled name is not in the module, create and return threadprivate cache object...
virtual void emitParallelCall(CodeGenFunction &CGF, SourceLocation Loc, llvm::Value *OutlinedFn, ArrayRef< llvm::Value * > CapturedVars, const Expr *IfCond)
Emits code for parallel or serial call of the OutlinedFn with variables captured in a record which ad...