clang
6.0.0
|
Class supports emissionof SIMD-only code. More...
#include "/work/www-prereleases/6.0.0/rc3/llvm.src/tools/clang/lib/CodeGen/CGOpenMPRuntime.h"
Public Member Functions | |
CGOpenMPSIMDRuntime (CodeGenModule &CGM) | |
~CGOpenMPSIMDRuntime () override | |
llvm::Value * | emitParallelOutlinedFunction (const OMPExecutableDirective &D, const VarDecl *ThreadIDVar, OpenMPDirectiveKind InnermostKind, const RegionCodeGenTy &CodeGen) override |
Emits outlined function for the specified OpenMP parallel directive D. More... | |
llvm::Value * | emitTeamsOutlinedFunction (const OMPExecutableDirective &D, const VarDecl *ThreadIDVar, OpenMPDirectiveKind InnermostKind, const RegionCodeGenTy &CodeGen) override |
Emits outlined function for the specified OpenMP teams directive D. More... | |
llvm::Value * | emitTaskOutlinedFunction (const OMPExecutableDirective &D, const VarDecl *ThreadIDVar, const VarDecl *PartIDVar, const VarDecl *TaskTVar, OpenMPDirectiveKind InnermostKind, const RegionCodeGenTy &CodeGen, bool Tied, unsigned &NumberOfParts) override |
Emits outlined function for the OpenMP task directive D. More... | |
void | emitParallelCall (CodeGenFunction &CGF, SourceLocation Loc, llvm::Value *OutlinedFn, ArrayRef< llvm::Value *> CapturedVars, const Expr *IfCond) override |
Emits code for parallel or serial call of the OutlinedFn with variables captured in a record which address is stored in CapturedStruct. More... | |
void | emitCriticalRegion (CodeGenFunction &CGF, StringRef CriticalName, const RegionCodeGenTy &CriticalOpGen, SourceLocation Loc, const Expr *Hint=nullptr) override |
Emits a critical region. More... | |
void | emitMasterRegion (CodeGenFunction &CGF, const RegionCodeGenTy &MasterOpGen, SourceLocation Loc) override |
Emits a master region. More... | |
void | emitTaskyieldCall (CodeGenFunction &CGF, SourceLocation Loc) override |
Emits code for a taskyield directive. More... | |
void | emitTaskgroupRegion (CodeGenFunction &CGF, const RegionCodeGenTy &TaskgroupOpGen, SourceLocation Loc) override |
Emit a taskgroup region. More... | |
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) override |
Emits a single region. More... | |
void | emitOrderedRegion (CodeGenFunction &CGF, const RegionCodeGenTy &OrderedOpGen, SourceLocation Loc, bool IsThreads) override |
Emit an ordered region. More... | |
void | emitBarrierCall (CodeGenFunction &CGF, SourceLocation Loc, OpenMPDirectiveKind Kind, bool EmitChecks=true, bool ForceSimpleCall=false) override |
Emit an implicit/explicit barrier for OpenMP threads. More... | |
void | emitForDispatchInit (CodeGenFunction &CGF, SourceLocation Loc, const OpenMPScheduleTy &ScheduleKind, unsigned IVSize, bool IVSigned, bool Ordered, const DispatchRTInput &DispatchValues) override |
This is used for non static scheduled types and when the ordered clause is present on the loop construct. More... | |
void | emitForStaticInit (CodeGenFunction &CGF, SourceLocation Loc, OpenMPDirectiveKind DKind, const OpenMPScheduleTy &ScheduleKind, const StaticRTInput &Values) override |
Call the appropriate runtime routine to initialize it before start of loop. More... | |
void | emitDistributeStaticInit (CodeGenFunction &CGF, SourceLocation Loc, OpenMPDistScheduleClauseKind SchedKind, const StaticRTInput &Values) override |
void | emitForOrderedIterationEnd (CodeGenFunction &CGF, SourceLocation Loc, unsigned IVSize, bool IVSigned) override |
Call the appropriate runtime routine to notify that we finished iteration of the ordered loop with the dynamic scheduling. More... | |
void | emitForStaticFinish (CodeGenFunction &CGF, SourceLocation Loc, OpenMPDirectiveKind DKind) override |
Call the appropriate runtime routine to notify that we finished all the work with current loop. More... | |
llvm::Value * | emitForNext (CodeGenFunction &CGF, SourceLocation Loc, unsigned IVSize, bool IVSigned, Address IL, Address LB, Address UB, Address ST) override |
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);. More... | |
void | emitNumThreadsClause (CodeGenFunction &CGF, llvm::Value *NumThreads, SourceLocation Loc) override |
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. More... | |
void | emitProcBindClause (CodeGenFunction &CGF, OpenMPProcBindClauseKind ProcBind, SourceLocation Loc) override |
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. More... | |
Address | getAddrOfThreadPrivate (CodeGenFunction &CGF, const VarDecl *VD, Address VDAddr, SourceLocation Loc) override |
Returns address of the threadprivate variable for the current thread. More... | |
llvm::Function * | emitThreadPrivateVarDefinition (const VarDecl *VD, Address VDAddr, SourceLocation Loc, bool PerformInit, CodeGenFunction *CGF=nullptr) override |
Emit a code for initialization of threadprivate variable. More... | |
Address | getAddrOfArtificialThreadPrivate (CodeGenFunction &CGF, QualType VarType, StringRef Name) override |
Creates artificial threadprivate variable with name Name and type VarType . More... | |
void | emitFlush (CodeGenFunction &CGF, ArrayRef< const Expr *> Vars, SourceLocation Loc) override |
Emit flush of the variables specified in 'omp flush' directive. More... | |
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 *void | emitTaskCall (CodeGenFunction &CGF, SourceLocation Loc, const OMPExecutableDirective &D, llvm::Value *TaskFunction, QualType SharedsTy, Address Shareds, const Expr *IfCond, const OMPTaskDataTy &Data) override |
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 *void | emitTaskLoopCall (CodeGenFunction &CGF, SourceLocation Loc, const OMPLoopDirective &D, llvm::Value *TaskFunction, QualType SharedsTy, Address Shareds, const Expr *IfCond, const OMPTaskDataTy &Data) override |
void | emitReduction (CodeGenFunction &CGF, SourceLocation Loc, ArrayRef< const Expr *> Privates, ArrayRef< const Expr *> LHSExprs, ArrayRef< const Expr *> RHSExprs, ArrayRef< const Expr *> ReductionOps, ReductionOptionsTy Options) override |
Emit a code for reduction clause. More... | |
llvm::Value * | emitTaskReductionInit (CodeGenFunction &CGF, SourceLocation Loc, ArrayRef< const Expr *> LHSExprs, ArrayRef< const Expr *> RHSExprs, const OMPTaskDataTy &Data) override |
Emit a code for initialization of task reduction clause. More... | |
void | emitTaskReductionFixups (CodeGenFunction &CGF, SourceLocation Loc, ReductionCodeGen &RCG, unsigned N) override |
Required to resolve existing problems in the runtime. More... | |
Address | getTaskReductionItem (CodeGenFunction &CGF, SourceLocation Loc, llvm::Value *ReductionsPtr, LValue SharedLVal) override |
Get the address of void * type of the privatue copy of the reduction item specified by the SharedLVal . More... | |
void | emitTaskwaitCall (CodeGenFunction &CGF, SourceLocation Loc) override |
Emit code for 'taskwait' directive. More... | |
void | emitCancellationPointCall (CodeGenFunction &CGF, SourceLocation Loc, OpenMPDirectiveKind CancelRegion) override |
Emit code for 'cancellation point' construct. More... | |
void | emitCancelCall (CodeGenFunction &CGF, SourceLocation Loc, const Expr *IfCond, OpenMPDirectiveKind CancelRegion) override |
Emit code for 'cancel' construct. More... | |
void | emitTargetOutlinedFunction (const OMPExecutableDirective &D, StringRef ParentName, llvm::Function *&OutlinedFn, llvm::Constant *&OutlinedFnID, bool IsOffloadEntry, const RegionCodeGenTy &CodeGen) override |
Emit outilined function for 'target' directive. More... | |
void | emitTargetCall (CodeGenFunction &CGF, const OMPExecutableDirective &D, llvm::Value *OutlinedFn, llvm::Value *OutlinedFnID, const Expr *IfCond, const Expr *Device, ArrayRef< llvm::Value *> CapturedVars) override |
Emit the target offloading code associated with D. More... | |
bool | emitTargetFunctions (GlobalDecl GD) override |
Emit the target regions enclosed in GD function definition or the function itself in case it is a valid device function. More... | |
bool | emitTargetGlobalVariable (GlobalDecl GD) override |
Emit the global variable if it is a valid device global variable. More... | |
bool | emitTargetGlobal (GlobalDecl GD) override |
Emit the global GD if it is meaningful for the target. More... | |
llvm::Function * | emitRegistrationFunction () override |
Creates the offloading descriptor in the event any target region was emitted in the current module and return the function that registers it. More... | |
void | emitTeamsCall (CodeGenFunction &CGF, const OMPExecutableDirective &D, SourceLocation Loc, llvm::Value *OutlinedFn, ArrayRef< llvm::Value *> CapturedVars) override |
Emits code for teams call of the OutlinedFn with variables captured in a record which address is stored in CapturedStruct. More... | |
void | emitNumTeamsClause (CodeGenFunction &CGF, const Expr *NumTeams, const Expr *ThreadLimit, SourceLocation Loc) override |
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. More... | |
void | emitTargetDataCalls (CodeGenFunction &CGF, const OMPExecutableDirective &D, const Expr *IfCond, const Expr *Device, const RegionCodeGenTy &CodeGen, TargetDataInfo &Info) override |
Emit the target data mapping code associated with D. More... | |
void | emitTargetDataStandAloneCall (CodeGenFunction &CGF, const OMPExecutableDirective &D, const Expr *IfCond, const Expr *Device) override |
Emit the data mapping/movement code associated with the directive D that should be of the form 'target [{enter|exit} data | update]'. More... | |
void | emitDoacrossInit (CodeGenFunction &CGF, const OMPLoopDirective &D) override |
Emit initialization for doacross loop nesting support. More... | |
void | emitDoacrossOrdered (CodeGenFunction &CGF, const OMPDependClause *C) override |
Emit code for doacross ordered directive with 'depend' clause. More... | |
const VarDecl * | translateParameter (const FieldDecl *FD, const VarDecl *NativeParam) const override |
Translates the native parameter of outlined function if this is required for target. More... | |
Address | getParameterAddress (CodeGenFunction &CGF, const VarDecl *NativeParam, const VarDecl *TargetParam) const override |
Gets the address of the native argument basing on the address of the target-specific parameter. More... | |
Public Attributes | |
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 | specified |
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 | tiednsee |
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 * | state |
Class supports emissionof SIMD-only code.
Definition at line 1368 of file CGOpenMPRuntime.h.
|
inlineexplicit |
Definition at line 1370 of file CGOpenMPRuntime.h.
|
inlineoverride |
Definition at line 1371 of file CGOpenMPRuntime.h.
References clang::CodeGen::emitBarrierCall(), clang::CodeGen::emitCriticalRegion(), clang::CodeGen::emitDistributeStaticInit(), clang::CodeGen::emitForDispatchInit(), clang::CodeGen::emitForNext(), clang::CodeGen::emitForOrderedIterationEnd(), clang::CodeGen::emitForStaticFinish(), clang::CodeGen::emitForStaticInit(), clang::CodeGen::emitMasterRegion(), clang::CodeGen::emitNumThreadsClause(), clang::CodeGen::emitOrderedRegion(), clang::CodeGen::emitParallelCall(), clang::CodeGen::emitParallelOutlinedFunction(), clang::CodeGen::emitProcBindClause(), clang::CodeGen::emitSingleRegion(), clang::CodeGen::emitTaskgroupRegion(), clang::CodeGen::emitTaskOutlinedFunction(), clang::CodeGen::emitTaskyieldCall(), clang::CodeGen::emitTeamsOutlinedFunction(), clang::CodeGen::emitThreadPrivateVarDefinition(), clang::CodeGen::getAddrOfArtificialThreadPrivate(), and clang::CodeGen::getAddrOfThreadPrivate().
|
override |
Emit an implicit/explicit barrier for OpenMP threads.
Kind | Directive for which this implicit barrier call must be generated. Must be OMPD_barrier for explicit barrier generation. |
EmitChecks | true if need to emit checks for cancellation barriers. |
ForceSimpleCall | true simple barrier call must be emitted, false if runtime class decides which one to emit (simple or with cancellation checks). |
Definition at line 8089 of file CGOpenMPRuntime.cpp.
|
override |
Emit code for 'cancel' construct.
IfCond | Condition in the associated 'if' clause, if it was specified, nullptr otherwise. |
CancelRegion | Region kind for which the cancel must be emitted. |
Definition at line 8229 of file CGOpenMPRuntime.cpp.
|
override |
Emit code for 'cancellation point' construct.
CancelRegion | Region kind for which the cancellation point must be emitted. |
Definition at line 8223 of file CGOpenMPRuntime.cpp.
|
override |
Emits a critical region.
CriticalName | Name of the critical region. |
CriticalOpGen | Generator for the statement associated with the given critical region. |
Hint | Value of the 'hint' clause (optional). |
Definition at line 8050 of file CGOpenMPRuntime.cpp.
|
override |
CGF | Reference to current CodeGenFunction. |
Loc | Clang source location. |
SchedKind | Schedule kind, specified by the 'dist_schedule' clause. |
Values | Input arguments for the construct. |
Definition at line 8110 of file CGOpenMPRuntime.cpp.
|
override |
Emit initialization for doacross loop nesting support.
D | Loop-based construct used in doacross nesting construct. |
Definition at line 8294 of file CGOpenMPRuntime.cpp.
|
override |
Emit code for doacross ordered directive with 'depend' clause.
C | 'depend' clause with 'sink|source' dependency kind. |
Definition at line 8299 of file CGOpenMPRuntime.cpp.
|
override |
Emit flush of the variables specified in 'omp flush' directive.
Vars | List of variables to flush. |
Definition at line 8167 of file CGOpenMPRuntime.cpp.
|
override |
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 LB and UB and stride ST.
CGF | Reference to current CodeGenFunction. |
Loc | Clang source location. |
ScheduleKind | Schedule kind, specified by the 'schedule' clause. |
IVSize | Size of the iteration variable in bits. |
IVSigned | Sign of the iteration variable. |
Ordered | true if loop is ordered, false otherwise. |
DispatchValues | struct containing llvm values for lower bound, upper bound, and chunk expression. For the default (nullptr) value, the chunk 1 will be used. |
Definition at line 8097 of file CGOpenMPRuntime.cpp.
|
override |
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);.
IVSize | Size of the iteration variable in bits. |
IVSigned | Sign of the iteration variable. |
IL | Address of the output variable in which the flag of the last iteration is returned. |
LB | Address of the output variable in which the lower iteration number is returned. |
UB | Address of the output variable in which the upper iteration number is returned. |
ST | Address of the output variable in which the stride value is returned. |
Definition at line 8129 of file CGOpenMPRuntime.cpp.
|
override |
Call the appropriate runtime routine to notify that we finished iteration of the ordered loop with the dynamic scheduling.
CGF | Reference to current CodeGenFunction. |
Loc | Clang source location. |
IVSize | Size of the iteration variable in bits. |
IVSigned | Sign of the iteration variable. |
Definition at line 8116 of file CGOpenMPRuntime.cpp.
|
override |
Call the appropriate runtime routine to notify that we finished all the work with current loop.
CGF | Reference to current CodeGenFunction. |
Loc | Clang source location. |
DKind | Kind of the directive for which the static finish is emitted. |
Definition at line 8123 of file CGOpenMPRuntime.cpp.
|
override |
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.
CGF | Reference to current CodeGenFunction. |
Loc | Clang source location. |
DKind | Kind of the directive. |
ScheduleKind | Schedule kind, specified by the 'schedule' clause. |
Values | Input arguments for the construct. |
Definition at line 8104 of file CGOpenMPRuntime.cpp.
|
override |
Emits a master region.
MasterOpGen | Generator for the statement associated with the given master region. |
Definition at line 8057 of file CGOpenMPRuntime.cpp.
|
override |
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.
NumTeams | An integer expression of teams. |
ThreadLimit | An integer expression of threads. |
Definition at line 8275 of file CGOpenMPRuntime.cpp.
|
override |
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.
NumThreads | An integer value of threads. |
Definition at line 8137 of file CGOpenMPRuntime.cpp.
|
override |
Emit an ordered region.
OrderedOpGen | Generator for the statement associated with the given ordered region. |
Definition at line 8082 of file CGOpenMPRuntime.cpp.
|
override |
Emits code for parallel or serial call of the OutlinedFn with variables captured in a record which address is stored in CapturedStruct.
OutlinedFn | Outlined function to be run in parallel threads. Type of this function is void(*)(kmp_int32 *, kmp_int32, struct context_vars*). |
CapturedVars | A pointer to the record with the references to variables used in OutlinedFn function. |
IfCond | Condition in the associated 'if' clause, if it was specified, nullptr otherwise. |
Definition at line 8042 of file CGOpenMPRuntime.cpp.
|
override |
Emits outlined function for the specified OpenMP parallel directive D.
This outlined function has type void(*)(kmp_int32 ThreadID, kmp_int32 BoundID, struct context_vars).
D | OpenMP directive. |
ThreadIDVar | Variable for thread id in the current OpenMP region. |
InnermostKind | Kind of innermost directive (for simple directives it is a directive itself, for combined - its innermost directive). |
CodeGen | Code generation sequence for the D directive. |
Definition at line 8022 of file CGOpenMPRuntime.cpp.
|
override |
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.
Definition at line 8143 of file CGOpenMPRuntime.cpp.
|
override |
Emit a code for reduction clause.
Next code should be emitted for reduction:
Privates | List of private copies for original reduction arguments. |
LHSExprs | List of LHS in ReductionOps reduction operations. |
RHSExprs | List of RHS in ReductionOps reduction operations. |
ReductionOps | List of reduction operations in form 'LHS binop RHS' or 'operator binop(LHS, RHS)'. |
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. |
Definition at line 8189 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::emitReduction(), and clang::CodeGen::ReductionOptionsTy::SimpleReduction.
|
override |
Creates the offloading descriptor in the event any target region was emitted in the current module and return the function that registers it.
Definition at line 8263 of file CGOpenMPRuntime.cpp.
|
override |
Emits a single region.
SingleOpGen | Generator for the statement associated with the given single region. |
Definition at line 8074 of file CGOpenMPRuntime.cpp.
|
override |
Emit the target offloading code associated with D.
The emitted code attempts offloading the execution to the device, an the event of a failure it executes the host version outlined in OutlinedFn.
D | Directive to emit. |
OutlinedFn | Host version of the code to be offloaded. |
OutlinedFnID | ID of host version of the code to be offloaded. |
IfCond | Expression evaluated in if clause associated with the target directive, or null if no if clause is used. |
Device | Expression evaluated in device clause associated with the target directive, or null if no device clause is used. |
CapturedVars | Values captured in the current region. |
Definition at line 8242 of file CGOpenMPRuntime.cpp.
|
override |
Emit the target data mapping code associated with D.
D | Directive to emit. |
IfCond | Expression evaluated in if clause associated with the target directive, or null if no device clause is used. |
Device | Expression evaluated in device clause associated with the target directive, or null if no device clause is used. |
Info | A record used to store information that needs to be preserved until the region is closed. |
Definition at line 8282 of file CGOpenMPRuntime.cpp.
|
override |
Emit the data mapping/movement code associated with the directive D that should be of the form 'target [{enter|exit} data | update]'.
D | Directive to emit. |
IfCond | Expression evaluated in if clause associated with the target directive, or null if no if clause is used. |
Device | Expression evaluated in device clause associated with the target directive, or null if no device clause is used. |
Definition at line 8288 of file CGOpenMPRuntime.cpp.
|
override |
Emit the target regions enclosed in GD function definition or the function itself in case it is a valid device function.
Returns true if GD was dealt with successfully.
GD | Function to scan. |
Definition at line 8251 of file CGOpenMPRuntime.cpp.
|
override |
Emit the global GD if it is meaningful for the target.
Returns if it was emitted successfully.
GD | Global to scan. |
Definition at line 8259 of file CGOpenMPRuntime.cpp.
|
override |
Emit the global variable if it is a valid device global variable.
Returns true if GD was dealt with successfully.
GD | Variable declaration to emit. |
Definition at line 8255 of file CGOpenMPRuntime.cpp.
|
override |
Emit outilined function for 'target' directive.
D | Directive to emit. |
ParentName | Name of the function that encloses the target region. |
OutlinedFn | Outlined function value to be defined by this call. |
OutlinedFnID | Outlined function ID value to be defined by this call. |
IsOffloadEntry | True if the outlined function is an offload entry. |
CodeGen | Code generation sequence for the D directive. An outlined function may not be an entry if, e.g. the if clause always evaluates to false. |
Definition at line 8235 of file CGOpenMPRuntime.cpp.
|
override |
Definition at line 8173 of file CGOpenMPRuntime.cpp.
|
override |
Emit a taskgroup region.
TaskgroupOpGen | Generator for the statement associated with the given taskgroup region. |
Definition at line 8068 of file CGOpenMPRuntime.cpp.
|
override |
Definition at line 8182 of file CGOpenMPRuntime.cpp.
|
override |
Emits outlined function for the OpenMP task directive D.
This outlined function has type void(*)(kmp_int32 ThreadID, struct task_t* TaskT).
D | OpenMP directive. |
ThreadIDVar | Variable for thread id in the current OpenMP region. |
PartIDVar | Variable for partition id in the current OpenMP untied task region. |
TaskTVar | Variable for task_t argument. |
InnermostKind | Kind of innermost directive (for simple directives it is a directive itself, for combined - its innermost directive). |
CodeGen | Code generation sequence for the D directive. |
Tied | true if task is generated for tied task, false otherwise. |
NumberOfParts | Number of parts in untied task. Ignored for tied tasks. |
Definition at line 8034 of file CGOpenMPRuntime.cpp.
|
override |
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 + emits threadprivate variable to store the pointer to the original reduction item for the custom initializer defined by declare reduction construct.
RCG | Allows to reuse an existing data for the reductions. |
N | Reduction item for which fixups must be emitted. |
Definition at line 8204 of file CGOpenMPRuntime.cpp.
|
override |
Emit a code for initialization of task reduction clause.
Next code should be emitted for reduction:
LHSExprs | List of LHS in Data.ReductionOps reduction operations. |
RHSExprs | List of RHS in Data.ReductionOps reduction operations. |
Data | Additional data for task generation like tiedness, final state, list of privates, reductions etc. |
Definition at line 8198 of file CGOpenMPRuntime.cpp.
|
override |
Emit code for 'taskwait' directive.
Definition at line 8218 of file CGOpenMPRuntime.cpp.
|
override |
Emits code for a taskyield directive.
Definition at line 8063 of file CGOpenMPRuntime.cpp.
|
override |
Emits code for teams call of the OutlinedFn with variables captured in a record which address is stored in CapturedStruct.
OutlinedFn | Outlined function to be run by team masters. Type of this function is void(*)(kmp_int32 *, kmp_int32, struct context_vars*). |
CapturedVars | A pointer to the record with the references to variables used in OutlinedFn function. |
Definition at line 8267 of file CGOpenMPRuntime.cpp.
|
override |
Emits outlined function for the specified OpenMP teams directive D.
This outlined function has type void(*)(kmp_int32 ThreadID, kmp_int32 BoundID, struct context_vars).
D | OpenMP directive. |
ThreadIDVar | Variable for thread id in the current OpenMP region. |
InnermostKind | Kind of innermost directive (for simple directives it is a directive itself, for combined - its innermost directive). |
CodeGen | Code generation sequence for the D directive. |
Definition at line 8028 of file CGOpenMPRuntime.cpp.
|
override |
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).
VD | Threadprivate variable. |
VDAddr | Address of the global variable VD. |
Loc | Location of threadprivate declaration. |
PerformInit | true if initialization expression is not constant. |
Definition at line 8156 of file CGOpenMPRuntime.cpp.
|
override |
Creates artificial threadprivate variable with name Name
and type VarType
.
VarType | Type of the artificial threadprivate variable. |
Name | Name of the artificial threadprivate variable. |
Definition at line 8162 of file CGOpenMPRuntime.cpp.
|
override |
Returns address of the threadprivate variable for the current thread.
VD | Threadprivate variable. |
VDAddr | Address of the global variable VD. |
Loc | Location of the reference to threadprivate var. |
Definition at line 8149 of file CGOpenMPRuntime.cpp.
|
override |
Gets the address of the native argument basing on the address of the target-specific parameter.
NativeParam | Parameter itself. |
TargetParam | Corresponding target-specific parameter. |
Definition at line 8311 of file CGOpenMPRuntime.cpp.
|
override |
Get the address of void *
type of the privatue copy of the reduction item specified by the SharedLVal
.
ReductionsPtr | Pointer to the reduction data returned by the emitTaskReductionInit function. |
SharedLVal | Address of the original reduction item. |
Definition at line 8211 of file CGOpenMPRuntime.cpp.
|
override |
Translates the native parameter of outlined function if this is required for target.
FD | Field decl from captured record for the paramater. |
NativeParam | Parameter itself. |
Definition at line 8305 of file CGOpenMPRuntime.cpp.
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 clang::CGOpenMPSIMDRuntime::specified |
Definition at line 1649 of file CGOpenMPRuntime.h.
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 * clang::CGOpenMPSIMDRuntime::state |
Definition at line 1649 of file CGOpenMPRuntime.h.
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 clang::CGOpenMPSIMDRuntime::tiednsee |
Definition at line 1649 of file CGOpenMPRuntime.h.