clang
3.9.0
|
#include "CGValue.h"
#include "clang/AST/Type.h"
#include "clang/Basic/OpenMPKinds.h"
#include "clang/Basic/SourceLocation.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/ValueHandle.h"
Go to the source code of this file.
Classes | |
class | clang::CodeGen::PrePostActionTy |
A basic class for pre|post-action for advanced codegen sequence for OpenMP region. More... | |
class | clang::CodeGen::RegionCodeGenTy |
Class provides a way to call simple version of codegen for OpenMP region, or an advanced with possible pre|post-actions in codegen. More... | |
struct | clang::CodeGen::OMPTaskDataTy |
class | clang::CodeGen::CGOpenMPRuntime |
class | clang::CodeGen::OffloadEntriesInfoManagerTy |
Entity that registers the offloading constants that were emitted so far. More... | |
class | clang::CodeGen::OffloadEntriesInfoManagerTy::OffloadEntryInfo |
Base class of the entries info. More... | |
class | clang::CodeGen::OffloadEntriesInfoManagerTy::OffloadEntryInfoTargetRegion |
Target region entries related. More... | |
struct | clang::CodeGen::TaskResultTy |
Namespaces | |
llvm | |
DominatorTree GraphTraits specialization so the DominatorTree can be iterable by generic graph iterators. | |
clang | |
Dataflow Directional Tag Classes. | |
clang::CodeGen | |
Functions | |
llvm::Function * | clang::CodeGen::createOffloadingBinaryDescriptorRegistration () |
Creates and registers offloading binary descriptor for the current compilation unit. More... | |
void | clang::CodeGen::createOffloadEntriesAndInfoMetadata () |
Creates all the offload entries in the current compilation unit along with the associated metadata. More... | |
void | clang::CodeGen::loadOffloadInfoMetadata () |
Loads all the offload entries information from the host IR metadata. More... | |
QualType | clang::CodeGen::getTgtOffloadEntryQTy () |
Returns __tgt_offload_entry type. More... | |
QualType | clang::CodeGen::getTgtDeviceImageQTy () |
Returns __tgt_device_image type. More... | |
QualType | clang::CodeGen::getTgtBinaryDescriptorQTy () |
Returns __tgt_bin_desc type. More... | |
void | clang::CodeGen::scanForTargetRegionsFunctions (const Stmt *S, StringRef ParentName) |
Start scanning from statement S and and emit all target regions found along the way. More... | |
void | clang::CodeGen::emitKmpRoutineEntryT (QualType KmpInt32Ty) |
Build type kmp_routine_entry_t (if not built yet). More... | |
llvm::Value * | clang::CodeGen::emitUpdateLocation (CodeGenFunction &CGF, SourceLocation Loc, unsigned Flags=0) |
Emits object of ident_t type with info for source location. More... | |
llvm::Type * | clang::CodeGen::getIdentTyPointerTy () |
Returns pointer to ident_t type. More... | |
llvm::Type * | clang::CodeGen::getKmpc_MicroPointerTy () |
Returns pointer to kmpc_micro type. More... | |
llvm::Constant * | clang::CodeGen::createRuntimeFunction (unsigned Function) |
Returns specified OpenMP runtime function. More... | |
llvm::Constant * | clang::CodeGen::createForStaticInitFunction (unsigned IVSize, bool IVSigned) |
Returns __kmpc_for_static_init_* runtime function for the specified size IVSize and sign IVSigned. More... | |
llvm::Constant * | clang::CodeGen::createDispatchInitFunction (unsigned IVSize, bool IVSigned) |
Returns __kmpc_dispatch_init_* runtime function for the specified size IVSize and sign IVSigned. More... | |
llvm::Constant * | clang::CodeGen::createDispatchNextFunction (unsigned IVSize, bool IVSigned) |
Returns __kmpc_dispatch_next_* runtime function for the specified size IVSize and sign IVSigned. More... | |
llvm::Constant * | clang::CodeGen::createDispatchFiniFunction (unsigned IVSize, bool IVSigned) |
Returns __kmpc_dispatch_fini_* runtime function for the specified size IVSize and sign IVSigned. More... | |
llvm::Constant * | clang::CodeGen::getOrCreateThreadPrivateCache (const VarDecl *VD) |
If the specified mangled name is not in the module, create and return threadprivate cache object. More... | |
virtual Address | clang::CodeGen::emitThreadIDAddress (CodeGenFunction &CGF, SourceLocation Loc) |
Emits address of the word in a memory where current thread id is stored. More... | |
llvm::Value * | clang::CodeGen::getThreadID (CodeGenFunction &CGF, SourceLocation Loc) |
Gets thread id value for the current thread. More... | |
llvm::Constant * | clang::CodeGen::getOrCreateInternalVariable (llvm::Type *Ty, const llvm::Twine &Name) |
Gets (if variable with the given name already exist) or creates internal global variable with the specified Name. More... | |
void | clang::CodeGen::emitThreadPrivateVarInit (CodeGenFunction &CGF, Address VDAddr, llvm::Value *Ctor, llvm::Value *CopyCtor, llvm::Value *Dtor, SourceLocation Loc) |
Emits initialization code for the threadprivate variables. More... | |
llvm::Value * | clang::CodeGen::getCriticalRegionLock (StringRef CriticalName) |
Returns corresponding lock object for the specified critical region name. 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 Data Additional data for task generation like final list of privates etc *TaskResultTy | clang::CodeGen::emitTaskInit (CodeGenFunction &CGF, SourceLocation Loc, const OMPExecutableDirective &D, llvm::Value *TaskFunction, QualType SharedsTy, Address Shareds, const OMPTaskDataTy &Data) |
clang::CodeGen::CGOpenMPRuntime (CodeGenModule &CGM) | |
virtual | clang::CodeGen::~CGOpenMPRuntime () |
virtual void | clang::CodeGen::clear () |
virtual void | clang::CodeGen::emitUserDefinedReduction (CodeGenFunction *CGF, const OMPDeclareReductionDecl *D) |
Emit code for the specified user defined reduction construct. More... | |
virtual std::pair < llvm::Function *, llvm::Function * > | clang::CodeGen::getUserDefinedReduction (const OMPDeclareReductionDecl *D) |
Get combiner/initializer for the specified user-defined reduction, if any. More... | |
virtual llvm::Value * | clang::CodeGen::emitParallelOrTeamsOutlinedFunction (const OMPExecutableDirective &D, const VarDecl *ThreadIDVar, OpenMPDirectiveKind InnermostKind, const RegionCodeGenTy &CodeGen) |
Emits outlined function for the specified OpenMP parallel directive D. More... | |
virtual llvm::Value * | clang::CodeGen::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. More... | |
void | clang::CodeGen::functionFinished (CodeGenFunction &CGF) |
Cleans up references to the objects in finished function. More... | |
virtual void | clang::CodeGen::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 address is stored in CapturedStruct. More... | |
virtual void | clang::CodeGen::emitCriticalRegion (CodeGenFunction &CGF, StringRef CriticalName, const RegionCodeGenTy &CriticalOpGen, SourceLocation Loc, const Expr *Hint=nullptr) |
Emits a critical region. More... | |
virtual void | clang::CodeGen::emitMasterRegion (CodeGenFunction &CGF, const RegionCodeGenTy &MasterOpGen, SourceLocation Loc) |
Emits a master region. More... | |
virtual void | clang::CodeGen::emitTaskyieldCall (CodeGenFunction &CGF, SourceLocation Loc) |
Emits code for a taskyield directive. More... | |
virtual void | clang::CodeGen::emitTaskgroupRegion (CodeGenFunction &CGF, const RegionCodeGenTy &TaskgroupOpGen, SourceLocation Loc) |
Emit a taskgroup region. More... | |
virtual void | clang::CodeGen::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. More... | |
virtual void | clang::CodeGen::emitOrderedRegion (CodeGenFunction &CGF, const RegionCodeGenTy &OrderedOpGen, SourceLocation Loc, bool IsThreads) |
Emit an ordered region. More... | |
virtual void | clang::CodeGen::emitBarrierCall (CodeGenFunction &CGF, SourceLocation Loc, OpenMPDirectiveKind Kind, bool EmitChecks=true, bool ForceSimpleCall=false) |
Emit an implicit/explicit barrier for OpenMP threads. More... | |
virtual bool | clang::CodeGen::isStaticNonchunked (OpenMPScheduleClauseKind ScheduleKind, bool Chunked) const |
Check if the specified ScheduleKind is static non-chunked. More... | |
virtual bool | clang::CodeGen::isStaticNonchunked (OpenMPDistScheduleClauseKind ScheduleKind, bool Chunked) const |
Check if the specified ScheduleKind is static non-chunked. More... | |
virtual bool | clang::CodeGen::isDynamic (OpenMPScheduleClauseKind ScheduleKind) const |
Check if the specified ScheduleKind is dynamic. More... | |
virtual void | clang::CodeGen::emitForDispatchInit (CodeGenFunction &CGF, SourceLocation Loc, const OpenMPScheduleTy &ScheduleKind, unsigned IVSize, bool IVSigned, bool Ordered, llvm::Value *UB, llvm::Value *Chunk=nullptr) |
virtual void | clang::CodeGen::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. More... | |
virtual void | clang::CodeGen::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 void | clang::CodeGen::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 the dynamic scheduling. More... | |
virtual void | clang::CodeGen::emitForStaticFinish (CodeGenFunction &CGF, SourceLocation Loc) |
Call the appropriate runtime routine to notify that we finished all the work with current loop. More... | |
virtual llvm::Value * | clang::CodeGen::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_lower, kmp_int[32|64] *p_upper, kmp_int[32|64] *p_stride);. More... | |
virtual void | clang::CodeGen::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) to generate code for 'num_threads' clause. More... | |
virtual void | clang::CodeGen::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 generate code for 'proc_bind' clause. More... | |
virtual Address | clang::CodeGen::getAddrOfThreadPrivate (CodeGenFunction &CGF, const VarDecl *VD, Address VDAddr, SourceLocation Loc) |
Returns address of the threadprivate variable for the current thread. More... | |
virtual llvm::Function * | clang::CodeGen::emitThreadPrivateVarDefinition (const VarDecl *VD, Address VDAddr, SourceLocation Loc, bool PerformInit, CodeGenFunction *CGF=nullptr) |
Emit a code for initialization of threadprivate variable. More... | |
virtual void | clang::CodeGen::emitFlush (CodeGenFunction &CGF, ArrayRef< const Expr * > Vars, SourceLocation Loc) |
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 *virtual void | clang::CodeGen::emitTaskCall (CodeGenFunction &CGF, SourceLocation Loc, const OMPExecutableDirective &D, llvm::Value *TaskFunction, QualType SharedsTy, Address Shareds, const Expr *IfCond, const OMPTaskDataTy &Data) |
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 | clang::CodeGen::emitTaskLoopCall (CodeGenFunction &CGF, SourceLocation Loc, const OMPLoopDirective &D, llvm::Value *TaskFunction, QualType SharedsTy, Address Shareds, const Expr *IfCond, const OMPTaskDataTy &Data) |
virtual void | clang::CodeGen::emitInlinedDirective (CodeGenFunction &CGF, OpenMPDirectiveKind InnermostKind, const RegionCodeGenTy &CodeGen, bool HasCancel=false) |
Emit code for the directive that does not require outlining. More... | |
virtual void | clang::CodeGen::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. More... | |
virtual void | clang::CodeGen::emitTaskwaitCall (CodeGenFunction &CGF, SourceLocation Loc) |
Emit code for 'taskwait' directive. More... | |
virtual void | clang::CodeGen::emitCancellationPointCall (CodeGenFunction &CGF, SourceLocation Loc, OpenMPDirectiveKind CancelRegion) |
Emit code for 'cancellation point' construct. More... | |
virtual void | clang::CodeGen::emitCancelCall (CodeGenFunction &CGF, SourceLocation Loc, const Expr *IfCond, OpenMPDirectiveKind CancelRegion) |
Emit code for 'cancel' construct. More... | |
virtual void | clang::CodeGen::emitTargetOutlinedFunction (const OMPExecutableDirective &D, StringRef ParentName, llvm::Function *&OutlinedFn, llvm::Constant *&OutlinedFnID, bool IsOffloadEntry, const RegionCodeGenTy &CodeGen) |
Emit outilined function for 'target' directive. More... | |
virtual void | clang::CodeGen::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. More... | |
virtual bool | clang::CodeGen::emitTargetFunctions (GlobalDecl GD) |
Emit the target regions enclosed in GD function definition or the function itself in case it is a valid device function. More... | |
virtual bool | clang::CodeGen::emitTargetGlobalVariable (GlobalDecl GD) |
Emit the global variable if it is a valid device global variable. More... | |
virtual bool | clang::CodeGen::emitTargetGlobal (GlobalDecl GD) |
Emit the global GD if it is meaningful for the target. More... | |
virtual llvm::Function * | clang::CodeGen::emitRegistrationFunction () |
Creates the offloading descriptor in the event any target region was emitted in the current module and return the function that registers it. More... | |
virtual void | clang::CodeGen::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 stored in CapturedStruct. More... | |
virtual void | clang::CodeGen::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, kmp_int32 thread_limit) to generate code for num_teams clause. More... | |
virtual void | clang::CodeGen::emitTargetDataCalls (CodeGenFunction &CGF, const OMPExecutableDirective &D, const Expr *IfCond, const Expr *Device, const RegionCodeGenTy &CodeGen) |
Emit the target data mapping code associated with D. More... | |
virtual void | clang::CodeGen::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 'target [{enter|exit} data | update]'. More... | |
virtual void | clang::CodeGen::emitDeclareSimdFunction (const FunctionDecl *FD, llvm::Function *Fn) |
Marks function Fn with properly mangled versions of vector functions. More... | |
virtual void | clang::CodeGen::emitDoacrossInit (CodeGenFunction &CGF, const OMPLoopDirective &D) |
Emit initialization for doacross loop nesting support. More... | |
virtual void | clang::CodeGen::emitDoacrossOrdered (CodeGenFunction &CGF, const OMPDependClause *C) |
Emit code for doacross ordered directive with 'depend' clause. More... | |
Variables | |
class clang::CodeGen::CGOpenMPRuntime | clang::CodeGen::kmp_task_t |
*QualType | clang::CodeGen::KmpTaskTQTy |
QualType | clang::CodeGen::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;. More... | |
QualType | clang::CodeGen::KmpDimTy |
struct kmp_dim { // loop bounds info casted to kmp_int64 kmp_int64 lo; // lower kmp_int64 up; // upper kmp_int64 st; // stride }; More... | |
QualType | clang::CodeGen::TgtOffloadEntryQTy |
Type struct __tgt_offload_entry{ void *addr; // Pointer to the offload entry info. More... | |
QualType | clang::CodeGen::TgtDeviceImageQTy |
struct __tgt_device_image{ void *ImageStart; // Pointer to the target code start. More... | |
QualType | clang::CodeGen::TgtBinaryDescriptorQTy |
struct __tgt_bin_desc{ int32_t NumDevices; // Number of devices supported. More... | |
OffloadEntriesInfoManagerTy | clang::CodeGen::OffloadEntriesInfoManager |
llvm::SmallPtrSet< const VarDecl *, 4 > | clang::CodeGen::ThreadPrivateWithDefinition |
Set of threadprivate variables with the generated initializer. 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 Data Additional data for task generation like | clang::CodeGen::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 Data Additional data for task generation like final * | clang::CodeGen::state |
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::CodeGen::specified |