clang
9.0.0
|
Namespaces | |
swiftcall | |
Classes | |
class | ABIArgInfo |
ABIArgInfo - Helper class to encapsulate information about how a specific C type should be passed to or returned from a function. More... | |
class | ABIInfo |
ABIInfo - Target specific hooks for defining how a type should be passed or returned from functions. More... | |
class | Address |
An aligned address. More... | |
class | AggValueSlot |
An aggregate value slot. More... | |
class | ApplyDebugLocation |
A scoped helper to set the current debug location to the specified location or preferred location of the specified Expr. More... | |
class | ApplyInlineDebugLocation |
A scoped helper to set the current debug location to an inlined location. More... | |
class | BlockByrefHelpers |
A pair of helper functions for a __block variable. More... | |
class | BlockByrefInfo |
Information about the layout of a __block variable. More... | |
class | BlockFieldFlags |
class | BlockFlags |
struct | BranchFixup |
A branch fixup. More... | |
struct | CallArg |
class | CallArgList |
CallArgList - Type for representing both the value and type of arguments in a call. More... | |
struct | CatchRetScope |
struct | CatchTypeInfo |
The MS C++ ABI needs a pointer to RTTI data plus some flags to describe the type of a catch handler, so we use this wrapper. More... | |
struct | CGBitFieldInfo |
Structure with information about how a bitfield should be accessed. More... | |
class | CGBlockInfo |
CGBlockInfo - Information to generate a block literal. More... | |
class | CGBuilderInserter |
This is an IRBuilder insertion helper that forwards to CodeGenFunction::InsertHelper, which adds necessary metadata to instructions. More... | |
class | CGBuilderTy |
class | CGCallee |
All available information about a concrete callee. More... | |
class | CGCalleeInfo |
Abstract information about a function or function prototype. More... | |
struct | CGCoroData |
class | CGCUDARuntime |
class | CGCXXABI |
Implements C++ ABI-specific code generation functions. More... | |
class | CGDebugInfo |
This class gathers all debug information during compilation and is responsible for emitting to llvm globals or pass directly to the backend. More... | |
class | CGFunctionInfo |
CGFunctionInfo - Class to encapsulate the information about a function definition. More... | |
struct | CGFunctionInfoArgInfo |
class | CGObjCRuntime |
Implements runtime-specific code generation functions. More... | |
class | CGOpenCLRuntime |
class | CGOpenMPRuntime |
class | CGOpenMPRuntimeNVPTX |
class | CGRecordLayout |
CGRecordLayout - This class handles struct and union layout info while lowering AST types to LLVM types. More... | |
class | CodeGenFunction |
CodeGenFunction - This class organizes the per-function state that is used while generating LLVM code. More... | |
class | CodeGenModule |
This class organizes the cross-function state that is used while generating LLVM code. More... | |
class | CodeGenPGO |
Per-function PGO state. More... | |
class | CodeGenTBAA |
CodeGenTBAA - This class organizes the cross-module state that is used while lowering AST types to LLVM types. More... | |
struct | CodeGenTypeCache |
This structure provides a set of types that are commonly used during IR emission. More... | |
class | CodeGenTypes |
This class organizes the cross-module state that is used while lowering AST types to LLVM types. More... | |
class | CodeGenVTables |
class | ConstantAddress |
A specialization of Address that requires the address to be an LLVM Constant. More... | |
class | ConstantAggregateBuilderBase |
A concrete base class for struct and array aggregate initializer builders. More... | |
class | ConstantAggregateBuilderTemplateBase |
class | ConstantArrayBuilder |
A helper class of ConstantInitBuilder, used for building constant array initializers. More... | |
class | ConstantArrayBuilderTemplateBase |
class | ConstantEmitter |
class | ConstantInitBuilder |
The standard implementation of ConstantInitBuilder used in Clang. More... | |
class | ConstantInitBuilderBase |
class | ConstantInitBuilderTemplateBase |
A template class designed to allow other frontends to easily customize the builder classes used by ConstantInitBuilder, and thus to extend the API to work with the abstractions they prefer. More... | |
struct | ConstantInitBuilderTraits |
class | ConstantInitFuture |
A "future" for a completed constant initializer, which can be passed around independently of any sub-builders (but not the original parent). More... | |
class | ConstantStructBuilder |
A helper class of ConstantInitBuilder, used for building constant struct initializers. More... | |
class | ConstantStructBuilderTemplateBase |
A template class designed to allow other frontends to easily customize the builder classes used by ConstantInitBuilder, and thus to extend the API to work with the abstractions they prefer. More... | |
class | CoverageMappingGen |
Organizes the per-function state that is used while generating code coverage mapping data. More... | |
class | CoverageMappingModuleGen |
Organizes the cross-function state that is used while generating code coverage mapping data. More... | |
struct | DispatchRTInput |
struct with the values to be passed to the dispatch runtime function More... | |
struct | DominatingLLVMValue |
Helper class with most of the code for saving a value for a conditional expression cleanup. More... | |
struct | DominatingPointer |
struct | DominatingPointer< T, false > |
struct | DominatingPointer< T, true > |
A partial specialization of DominatingValue for llvm::Values that might be llvm::Instructions. More... | |
struct | DominatingValue |
A metaprogramming class for ensuring that a value will dominate an arbitrary position in a function. More... | |
struct | DominatingValue< Address > |
A specialization of DominatingValue for Address. More... | |
struct | DominatingValue< RValue > |
A specialization of DominatingValue for RValue. More... | |
struct | DominatingValue< T * > |
class | EHCatchScope |
A scope which attempts to handle some, possibly all, types of exceptions. More... | |
class | EHCleanupScope |
A cleanup scope which generates the cleanup blocks lazily. More... | |
class | EHFilterScope |
An exceptions scope which filters exceptions thrown through it. More... | |
class | EHPadEndScope |
struct | EHPersonality |
The exceptions personality for a function. More... | |
class | EHScope |
A protected scope for zero-cost EH handling. More... | |
class | EHScopeStack |
A stack of scopes which respond to exceptions, including cleanups and catch blocks. More... | |
class | EHTerminateScope |
An exceptions scope which calls std::terminate if any exception reaches it. More... | |
class | FunctionArgList |
FunctionArgList - Type for representing both the decl and type of parameters to a function. More... | |
class | InstrProfStats |
This class records statistics on instrumentation based profiling. More... | |
struct | InvariantValue |
struct | LoopAttributes |
Attributes that may be specified on loops. More... | |
class | LoopInfo |
Information used when generating a structured loop. More... | |
class | LoopInfoStack |
A stack of loop information corresponding to loop nesting levels. More... | |
class | LValue |
LValue - This represents an lvalue references. More... | |
class | LValueBaseInfo |
struct | ObjCEntrypoints |
class | OffloadEntriesInfoManagerTy |
Entity that registers the offloading constants that were emitted so far. More... | |
struct | OMPTaskDataTy |
struct | OrderGlobalInits |
class | PrePostActionTy |
A basic class for pre|post-action for advanced codegen sequence for OpenMP region. More... | |
class | ReductionCodeGen |
Class intended to support codegen of all kind of the reduction clauses. More... | |
struct | ReductionOptionsTy |
class | 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... | |
class | RequiredArgs |
A class for recording the number of arguments that a function signature requires. More... | |
class | ReturnValueSlot |
ReturnValueSlot - Contains the address where the return value of a function can be stored, and whether the address is volatile or not. More... | |
class | RValue |
RValue - This trivial value class is used to represent the result of an expression that is evaluated. More... | |
class | SanitizerMetadata |
struct | StaticRTInput |
Struct with the values to be passed to the static runtime function. More... | |
class | SwiftABIInfo |
A refining implementation of ABIInfo for targets that support swiftcall. More... | |
class | TargetCodeGenInfo |
TargetCodeGenInfo - This class organizes various target-specific codegeneration issues, like target-specific attributes, builtins and so on. More... | |
class | TargetDataInfo |
Struct that keeps all the relevant information that should be kept throughout a 'target data' region. More... | |
struct | TaskResultTy |
struct | TBAAAccessInfo |
class | VarBypassDetector |
The class detects jumps which bypass local variables declaration: goto L; int a; L: More... | |
Typedefs | |
typedef CGBuilderInserter | CGBuilderInserterTy |
typedef llvm::IRBuilder< llvm::ConstantFolder, CGBuilderInserterTy > | CGBuilderBaseTy |
Functions | |
const CGFunctionInfo & | arrangeObjCMessageSendSignature (CodeGenModule &CGM, const ObjCMethodDecl *MD, QualType receiverType) |
const CGFunctionInfo & | arrangeFreeFunctionType (CodeGenModule &CGM, CanQual< FunctionProtoType > Ty) |
const CGFunctionInfo & | arrangeFreeFunctionType (CodeGenModule &CGM, CanQual< FunctionNoProtoType > Ty) |
const CGFunctionInfo & | arrangeCXXMethodType (CodeGenModule &CGM, const CXXRecordDecl *RD, const FunctionProtoType *FTP, const CXXMethodDecl *MD) |
const CGFunctionInfo & | arrangeFreeFunctionCall (CodeGenModule &CGM, CanQualType returnType, ArrayRef< CanQualType > argTypes, FunctionType::ExtInfo info, RequiredArgs args) |
llvm::FunctionType * | convertFreeFunctionType (CodeGenModule &CGM, const FunctionDecl *FD) |
Returns null if the function type is incomplete and can't be lowered. More... | |
llvm::Type * | convertTypeForMemory (CodeGenModule &CGM, QualType T) |
unsigned | getLLVMFieldNumber (CodeGenModule &CGM, const RecordDecl *RD, const FieldDecl *FD) |
Given a non-bitfield struct field, return its index within the elements of the struct's converted type. More... | |
llvm::Function * | getNonTrivialCStructDefaultConstructor (CodeGenModule &GCM, CharUnits DstAlignment, bool IsVolatile, QualType QT) |
Returns the default constructor for a C struct with non-trivially copyable fields, generating it if necessary. More... | |
llvm::Function * | getNonTrivialCStructCopyConstructor (CodeGenModule &CGM, CharUnits DstAlignment, CharUnits SrcAlignment, bool IsVolatile, QualType QT) |
Returns the copy constructor for a C struct with non-trivially copyable fields, generating it if necessary. More... | |
llvm::Function * | getNonTrivialCStructMoveConstructor (CodeGenModule &CGM, CharUnits DstAlignment, CharUnits SrcAlignment, bool IsVolatile, QualType QT) |
Returns the move constructor for a C struct with non-trivially copyable fields, generating it if necessary. More... | |
llvm::Function * | getNonTrivialCStructCopyAssignmentOperator (CodeGenModule &CGM, CharUnits DstAlignment, CharUnits SrcAlignment, bool IsVolatile, QualType QT) |
Returns the copy assignment operator for a C struct with non-trivially copyable fields, generating it if necessary. More... | |
llvm::Function * | getNonTrivialCStructMoveAssignmentOperator (CodeGenModule &CGM, CharUnits DstAlignment, CharUnits SrcAlignment, bool IsVolatile, QualType QT) |
Return the move assignment operator for a C struct with non-trivially copyable fields, generating it if necessary. More... | |
llvm::Function * | getNonTrivialCStructDestructor (CodeGenModule &CGM, CharUnits DstAlignment, bool IsVolatile, QualType QT) |
Returns the destructor for a C struct with non-trivially copyable fields, generating it if necessary. More... | |
BlockFlags | operator| (BlockLiteralFlags l, BlockLiteralFlags r) |
BlockFieldFlags | operator| (BlockFieldFlag_t l, BlockFieldFlag_t r) |
void | computeSPIRKernelABIInfo (CodeGenModule &CGM, CGFunctionInfo &FI) |
CGCUDARuntime * | CreateNVCUDARuntime (CodeGenModule &CGM) |
Creates an instance of a CUDA runtime class. More... | |
CGCXXABI * | CreateItaniumCXXABI (CodeGenModule &CGM) |
Creates an Itanium-family ABI. More... | |
CGCXXABI * | CreateMicrosoftCXXABI (CodeGenModule &CGM) |
Creates a Microsoft-family ABI. More... | |
CGObjCRuntime * | CreateGNUObjCRuntime (CodeGenModule &CGM) |
Creates an instance of an Objective-C runtime class. More... | |
CGObjCRuntime * | CreateMacObjCRuntime (CodeGenModule &CGM) |
llvm::Function * | createOffloadingBinaryDescriptorRegistration () |
Creates and registers offloading binary descriptor for the current compilation unit. More... | |
void | createOffloadEntriesAndInfoMetadata () |
Creates all the offload entries in the current compilation unit along with the associated metadata. More... | |
void | loadOffloadInfoMetadata () |
Loads all the offload entries information from the host IR metadata. More... | |
QualType | getTgtOffloadEntryQTy () |
Returns __tgt_offload_entry type. More... | |
QualType | getTgtDeviceImageQTy () |
Returns __tgt_device_image type. More... | |
QualType | getTgtBinaryDescriptorQTy () |
Returns __tgt_bin_desc type. More... | |
void | scanForTargetRegionsFunctions (const Stmt *S, StringRef ParentName) |
Start scanning from statement S and and emit all target regions found along the way. More... | |
void | emitKmpRoutineEntryT (QualType KmpInt32Ty) |
Build type kmp_routine_entry_t (if not built yet). More... | |
llvm::Type * | getKmpc_MicroPointerTy () |
Returns pointer to kmpc_micro type. More... | |
llvm::FunctionCallee | createRuntimeFunction (unsigned Function) |
Returns specified OpenMP runtime function. More... | |
llvm::FunctionCallee | createForStaticInitFunction (unsigned IVSize, bool IVSigned) |
Returns __kmpc_for_static_init_* runtime function for the specified size IVSize and sign IVSigned. More... | |
llvm::FunctionCallee | createDispatchInitFunction (unsigned IVSize, bool IVSigned) |
Returns __kmpc_dispatch_init_* runtime function for the specified size IVSize and sign IVSigned. More... | |
llvm::FunctionCallee | createDispatchNextFunction (unsigned IVSize, bool IVSigned) |
Returns __kmpc_dispatch_next_* runtime function for the specified size IVSize and sign IVSigned. More... | |
llvm::FunctionCallee | createDispatchFiniFunction (unsigned IVSize, bool IVSigned) |
Returns __kmpc_dispatch_fini_* runtime function for the specified size IVSize and sign IVSigned. More... | |
llvm::Constant * | getOrCreateThreadPrivateCache (const VarDecl *VD) |
If the specified mangled name is not in the module, create and return threadprivate cache object. More... | |
llvm::Constant * | getOrCreateInternalVariable (llvm::Type *Ty, const llvm::Twine &Name, unsigned AddressSpace=0) |
Gets (if variable with the given name already exist) or creates internal global variable with the specified Name. More... | |
void | emitThreadPrivateVarInit (CodeGenFunction &CGF, Address VDAddr, llvm::Value *Ctor, llvm::Value *CopyCtor, llvm::Value *Dtor, SourceLocation Loc) |
Emits initialization code for the threadprivate variables. 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 | emitTaskInit (CodeGenFunction &CGF, SourceLocation Loc, const OMPExecutableDirective &D, llvm::Function *TaskFunction, QualType SharedsTy, Address Shareds, const OMPTaskDataTy &Data) |
virtual unsigned | getDefaultFirstprivateAddressSpace () const |
Returns default address space for the constant firstprivates, 0 by default. More... | |
CGOpenMPRuntime (CodeGenModule &CGM) | |
virtual | ~CGOpenMPRuntime () |
virtual void | clear () |
static const Stmt * | getSingleCompoundChild (ASTContext &Ctx, const Stmt *Body) |
Checks if the Body is the CompoundStmt and returns its child statement iff there is only one that is not evaluatable at the compile time. More... | |
std::string | getName (ArrayRef< StringRef > Parts) const |
Get the platform-specific name separator. More... | |
virtual void | emitUserDefinedReduction (CodeGenFunction *CGF, const OMPDeclareReductionDecl *D) |
Emit code for the specified user defined reduction construct. More... | |
virtual std::pair< llvm::Function *, llvm::Function * > | getUserDefinedReduction (const OMPDeclareReductionDecl *D) |
Get combiner/initializer for the specified user-defined reduction, if any. More... | |
virtual llvm::Function * | emitParallelOutlinedFunction (const OMPExecutableDirective &D, const VarDecl *ThreadIDVar, OpenMPDirectiveKind InnermostKind, const RegionCodeGenTy &CodeGen) |
Emits outlined function for the specified OpenMP parallel directive D. More... | |
virtual llvm::Function * | emitTeamsOutlinedFunction (const OMPExecutableDirective &D, const VarDecl *ThreadIDVar, OpenMPDirectiveKind InnermostKind, const RegionCodeGenTy &CodeGen) |
Emits outlined function for the specified OpenMP teams directive D. More... | |
virtual llvm::Function * | 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... | |
virtual void | functionFinished (CodeGenFunction &CGF) |
Cleans up references to the objects in finished function. More... | |
virtual void | emitParallelCall (CodeGenFunction &CGF, SourceLocation Loc, llvm::Function *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 | emitCriticalRegion (CodeGenFunction &CGF, StringRef CriticalName, const RegionCodeGenTy &CriticalOpGen, SourceLocation Loc, const Expr *Hint=nullptr) |
Emits a critical region. More... | |
virtual void | emitMasterRegion (CodeGenFunction &CGF, const RegionCodeGenTy &MasterOpGen, SourceLocation Loc) |
Emits a master region. More... | |
virtual void | emitTaskyieldCall (CodeGenFunction &CGF, SourceLocation Loc) |
Emits code for a taskyield directive. More... | |
virtual void | emitTaskgroupRegion (CodeGenFunction &CGF, const RegionCodeGenTy &TaskgroupOpGen, SourceLocation Loc) |
Emit a taskgroup region. More... | |
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. More... | |
virtual void | emitOrderedRegion (CodeGenFunction &CGF, const RegionCodeGenTy &OrderedOpGen, SourceLocation Loc, bool IsThreads) |
Emit an ordered region. More... | |
virtual void | emitBarrierCall (CodeGenFunction &CGF, SourceLocation Loc, OpenMPDirectiveKind Kind, bool EmitChecks=true, bool ForceSimpleCall=false) |
Emit an implicit/explicit barrier for OpenMP threads. More... | |
virtual bool | isStaticNonchunked (OpenMPScheduleClauseKind ScheduleKind, bool Chunked) const |
Check if the specified ScheduleKind is static non-chunked. More... | |
virtual bool | isStaticNonchunked (OpenMPDistScheduleClauseKind ScheduleKind, bool Chunked) const |
Check if the specified ScheduleKind is static non-chunked. More... | |
virtual bool | isStaticChunked (OpenMPScheduleClauseKind ScheduleKind, bool Chunked) const |
Check if the specified ScheduleKind is static chunked. More... | |
virtual bool | isStaticChunked (OpenMPDistScheduleClauseKind ScheduleKind, bool Chunked) const |
Check if the specified ScheduleKind is static non-chunked. More... | |
virtual bool | isDynamic (OpenMPScheduleClauseKind ScheduleKind) const |
Check if the specified ScheduleKind is dynamic. More... | |
virtual void | emitForDispatchInit (CodeGenFunction &CGF, SourceLocation Loc, const OpenMPScheduleTy &ScheduleKind, unsigned IVSize, bool IVSigned, bool Ordered, const DispatchRTInput &DispatchValues) |
Call the appropriate runtime routine to initialize it before start of loop. More... | |
virtual void | emitForStaticInit (CodeGenFunction &CGF, SourceLocation Loc, OpenMPDirectiveKind DKind, const OpenMPScheduleTy &ScheduleKind, const StaticRTInput &Values) |
Call the appropriate runtime routine to initialize it before start of loop. More... | |
virtual void | emitDistributeStaticInit (CodeGenFunction &CGF, SourceLocation Loc, OpenMPDistScheduleClauseKind SchedKind, const StaticRTInput &Values) |
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 the dynamic scheduling. More... | |
virtual void | emitForStaticFinish (CodeGenFunction &CGF, SourceLocation Loc, OpenMPDirectiveKind DKind) |
Call the appropriate runtime routine to notify that we finished all the work with current loop. More... | |
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_lower, kmp_int[32|64] *p_upper, kmp_int[32|64] *p_stride);. More... | |
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) to generate code for 'num_threads' clause. More... | |
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 generate code for 'proc_bind' clause. More... | |
virtual Address | getAddrOfThreadPrivate (CodeGenFunction &CGF, const VarDecl *VD, Address VDAddr, SourceLocation Loc) |
Returns address of the threadprivate variable for the current thread. More... | |
virtual Address | getAddrOfDeclareTargetVar (const VarDecl *VD) |
Returns the address of the variable marked as declare target with link clause OR as declare target with to clause and unified memory. More... | |
virtual llvm::Function * | emitThreadPrivateVarDefinition (const VarDecl *VD, Address VDAddr, SourceLocation Loc, bool PerformInit, CodeGenFunction *CGF=nullptr) |
Emit a code for initialization of threadprivate variable. More... | |
virtual bool | emitDeclareTargetVarDefinition (const VarDecl *VD, llvm::GlobalVariable *Addr, bool PerformInit) |
Emit a code for initialization of declare target variable. More... | |
virtual Address | getAddrOfArtificialThreadPrivate (CodeGenFunction &CGF, QualType VarType, StringRef Name) |
Creates artificial threadprivate variable with name Name and type VarType . More... | |
virtual void | 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 | emitTaskCall (CodeGenFunction &CGF, SourceLocation Loc, const OMPExecutableDirective &D, llvm::Function *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 | emitTaskLoopCall (CodeGenFunction &CGF, SourceLocation Loc, const OMPLoopDirective &D, llvm::Function *TaskFunction, QualType SharedsTy, Address Shareds, const Expr *IfCond, const OMPTaskDataTy &Data) |
virtual void | emitInlinedDirective (CodeGenFunction &CGF, OpenMPDirectiveKind InnermostKind, const RegionCodeGenTy &CodeGen, bool HasCancel=false) |
Emit code for the directive that does not require outlining. More... | |
llvm::Function * | emitReductionFunction (SourceLocation Loc, llvm::Type *ArgsType, ArrayRef< const Expr *> Privates, ArrayRef< const Expr *> LHSExprs, ArrayRef< const Expr *> RHSExprs, ArrayRef< const Expr *> ReductionOps) |
Emits reduction function. More... | |
void | emitSingleReductionCombiner (CodeGenFunction &CGF, const Expr *ReductionOp, const Expr *PrivateRef, const DeclRefExpr *LHS, const DeclRefExpr *RHS) |
Emits single reduction combiner. More... | |
virtual void | emitReduction (CodeGenFunction &CGF, SourceLocation Loc, ArrayRef< const Expr *> Privates, ArrayRef< const Expr *> LHSExprs, ArrayRef< const Expr *> RHSExprs, ArrayRef< const Expr *> ReductionOps, ReductionOptionsTy Options) |
Emit a code for reduction clause. More... | |
virtual llvm::Value * | emitTaskReductionInit (CodeGenFunction &CGF, SourceLocation Loc, ArrayRef< const Expr *> LHSExprs, ArrayRef< const Expr *> RHSExprs, const OMPTaskDataTy &Data) |
Emit a code for initialization of task reduction clause. More... | |
virtual void | emitTaskReductionFixups (CodeGenFunction &CGF, SourceLocation Loc, ReductionCodeGen &RCG, unsigned N) |
Required to resolve existing problems in the runtime. More... | |
virtual Address | getTaskReductionItem (CodeGenFunction &CGF, SourceLocation Loc, llvm::Value *ReductionsPtr, LValue SharedLVal) |
Get the address of void * type of the privatue copy of the reduction item specified by the SharedLVal . More... | |
virtual void | emitTaskwaitCall (CodeGenFunction &CGF, SourceLocation Loc) |
Emit code for 'taskwait' directive. More... | |
virtual void | emitCancellationPointCall (CodeGenFunction &CGF, SourceLocation Loc, OpenMPDirectiveKind CancelRegion) |
Emit code for 'cancellation point' construct. More... | |
virtual void | emitCancelCall (CodeGenFunction &CGF, SourceLocation Loc, const Expr *IfCond, OpenMPDirectiveKind CancelRegion) |
Emit code for 'cancel' construct. More... | |
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. More... | |
virtual void | emitTargetNumIterationsCall (CodeGenFunction &CGF, const OMPExecutableDirective &D, const Expr *Device, const llvm::function_ref< llvm::Value *(CodeGenFunction &CGF, const OMPLoopDirective &D)> &SizeEmitter) |
Emit code that pushes the trip count of loops associated with constructs 'target teams distribute' and 'teams distribute parallel for'. More... | |
virtual void | emitTargetCall (CodeGenFunction &CGF, const OMPExecutableDirective &D, llvm::Function *OutlinedFn, llvm::Value *OutlinedFnID, const Expr *IfCond, const Expr *Device) |
Emit the target offloading code associated with D. More... | |
virtual bool | 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 | emitTargetGlobalVariable (GlobalDecl GD) |
Emit the global variable if it is a valid device global variable. More... | |
virtual void | registerTargetGlobalVariable (const VarDecl *VD, llvm::Constant *Addr) |
Checks if the provided global decl GD is a declare target variable and registers it when emitting code for the host. More... | |
llvm::Constant * | registerTargetFirstprivateCopy (CodeGenFunction &CGF, const VarDecl *VD) |
Registers provided target firstprivate variable as global on the target. More... | |
virtual bool | emitTargetGlobal (GlobalDecl GD) |
Emit the global GD if it is meaningful for the target. More... | |
llvm::Function * | emitRequiresDirectiveRegFun () |
Creates and returns a registration function for when at least one requires directives was used in the current module. More... | |
virtual llvm::Function * | 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 | emitTeamsCall (CodeGenFunction &CGF, const OMPExecutableDirective &D, SourceLocation Loc, llvm::Function *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 | 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 | emitTargetDataCalls (CodeGenFunction &CGF, const OMPExecutableDirective &D, const Expr *IfCond, const Expr *Device, const RegionCodeGenTy &CodeGen, TargetDataInfo &Info) |
Emit the target data mapping code associated with D. More... | |
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 'target [{enter|exit} data | update]'. More... | |
virtual void | emitDeclareSimdFunction (const FunctionDecl *FD, llvm::Function *Fn) |
Marks function Fn with properly mangled versions of vector functions. More... | |
virtual void | emitDoacrossInit (CodeGenFunction &CGF, const OMPLoopDirective &D, ArrayRef< Expr *> NumIterations) |
Emit initialization for doacross loop nesting support. More... | |
virtual void | emitDoacrossOrdered (CodeGenFunction &CGF, const OMPDependClause *C) |
Emit code for doacross ordered directive with 'depend' clause. More... | |
virtual const VarDecl * | translateParameter (const FieldDecl *FD, const VarDecl *NativeParam) const |
Translates the native parameter of outlined function if this is required for target. More... | |
virtual Address | getParameterAddress (CodeGenFunction &CGF, const VarDecl *NativeParam, const VarDecl *TargetParam) const |
Gets the address of the native argument basing on the address of the target-specific parameter. More... | |
virtual void | getDefaultDistScheduleAndChunk (CodeGenFunction &CGF, const OMPLoopDirective &S, OpenMPDistScheduleClauseKind &ScheduleKind, llvm::Value *&Chunk) const |
Choose default schedule type and chunk value for the dist_schedule clause. More... | |
virtual void | getDefaultScheduleAndChunk (CodeGenFunction &CGF, const OMPLoopDirective &S, OpenMPScheduleClauseKind &ScheduleKind, const Expr *&ChunkExpr) const |
Choose default schedule type and chunk value for the schedule clause. More... | |
virtual void | emitOutlinedFunctionCall (CodeGenFunction &CGF, SourceLocation Loc, llvm::FunctionCallee OutlinedFn, ArrayRef< llvm::Value *> Args=llvm::None) const |
Emits call of the outlined function with the provided arguments, translating these arguments to correct target-specific arguments. More... | |
virtual void | emitFunctionProlog (CodeGenFunction &CGF, const Decl *D) |
Emits OpenMP-specific function prolog. More... | |
virtual Address | getAddressOfLocalVariable (CodeGenFunction &CGF, const VarDecl *VD) |
Gets the OpenMP-specific address of the local variable. More... | |
bool | markAsGlobalTarget (GlobalDecl GD) |
Marks the declaration as already emitted for the device code and returns true, if it was marked already, and false, otherwise. More... | |
void | emitDeferredTargetDecls () const |
Emit deferred declare target variables marked for deferred emission. More... | |
virtual void | adjustTargetSpecificDataForLambdas (CodeGenFunction &CGF, const OMPExecutableDirective &D) const |
Adjust some parameters for the target-based directives, like addresses of the variables captured by reference in lambdas. More... | |
virtual void | checkArchForUnifiedAddressing (const OMPRequiresDecl *D) |
Perform check on requires decl to ensure that target architecture supports unified addressing. More... | |
virtual bool | hasAllocateAttributeForGlobalVar (const VarDecl *VD, LangAS &AS) |
Checks if the variable has associated OMPAllocateDeclAttr attribute with the predefined allocator and translates it into the corresponding address space. More... | |
bool | hasRequiresUnifiedSharedMemory () const |
Return whether the unified_shared_memory has been specified. More... | |
static AlignmentSource | getFieldAlignmentSource (AlignmentSource Source) |
Given that the base address has the given alignment source, what's our confidence in the alignment of the field? More... | |
llvm::Constant * | initializationPatternFor (CodeGenModule &, llvm::Type *) |
Variables | |
true | |
A convenience builder class for complex constant initializers, especially for anonymous global structures used by various language runtimes. More... | |
class clang::CodeGen::CGOpenMPRuntime | kmp_task_t |
*QualType | KmpTaskTQTy |
QualType | SavedKmpTaskTQTy |
Saved kmp_task_t for task directive. More... | |
QualType | SavedKmpTaskloopTQTy |
Saved kmp_task_t for taskloop-based directive. More... | |
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;. More... | |
QualType | 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 | TgtOffloadEntryQTy |
Type struct __tgt_offload_entry{ void *addr; // Pointer to the offload entry info. More... | |
QualType | TgtDeviceImageQTy |
struct __tgt_device_image{ void *ImageStart; // Pointer to the target code start. More... | |
QualType | TgtBinaryDescriptorQTy |
struct __tgt_bin_desc{ int32_t NumDevices; // Number of devices supported. More... | |
OffloadEntriesInfoManagerTy | OffloadEntriesInfoManager |
bool | ShouldMarkAsGlobal = true |
llvm::StringSet | AlreadyEmittedTargetFunctions |
List of the emitted functions. More... | |
llvm::StringMap< llvm::WeakTrackingVH > | EmittedNonTargetVariables |
List of the global variables with their addresses that should not be emitted for the target. More... | |
llvm::SmallDenseSet< const VarDecl * > | DeferredGlobalVariables |
List of variables that can become declare target implicitly and, thus, must be emitted. More... | |
bool | HasRequiresUnifiedSharedMemory = false |
Flag for keeping track of weather a requires unified_shared_memory directive is present. More... | |
bool | HasEmittedTargetRegion = false |
Flag for keeping track of weather a target region has been emitted. More... | |
bool | HasEmittedDeclareTargetRegion = false |
Flag for keeping track of weather a device routine has been emitted. More... | |
llvm::StringSet | ThreadPrivateWithDefinition |
Set of threadprivate variables with the generated initializer. More... | |
llvm::StringSet | DeclareTargetWithDefinition |
Set of declare target 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 | 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 * | 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 | specified |
typedef llvm::IRBuilder<llvm::ConstantFolder, CGBuilderInserterTy> clang::CodeGen::CGBuilderBaseTy |
Definition at line 42 of file CGBuilder.h.
Definition at line 39 of file CGBuilder.h.
|
strong |
The source of the alignment of an l-value; an expression of confidence in the alignment actually matching the estimate.
Definition at line 45 of file CGBlocks.h.
Enumerator | |
---|---|
BLOCK_FIELD_IS_OBJECT | |
BLOCK_FIELD_IS_BLOCK | |
BLOCK_FIELD_IS_BYREF | |
BLOCK_FIELD_IS_WEAK | |
BLOCK_FIELD_IS_ARC | |
BLOCK_BYREF_CALLER | |
BLOCK_BYREF_CURRENT_MAX |
Definition at line 94 of file CGBlocks.h.
Enumerator | |
---|---|
BLOCK_IS_NOESCAPE | |
BLOCK_HAS_COPY_DISPOSE | |
BLOCK_HAS_CXX_OBJ | |
BLOCK_IS_GLOBAL | |
BLOCK_USE_STRET | |
BLOCK_HAS_SIGNATURE | |
BLOCK_HAS_EXTENDED_LAYOUT |
Definition at line 55 of file CGBlocks.h.
enum clang::CodeGen::CleanupKind : unsigned |
Definition at line 77 of file EHScopeStack.h.
Enumerator | |
---|---|
NotForDefinition | |
ForDefinition |
Definition at line 97 of file CodeGenModule.h.
Enumerator | |
---|---|
LIST_SANITIZER_CHECKS |
Definition at line 136 of file CodeGenFunction.h.
|
strong |
Enumerator | |
---|---|
Ordinary | |
MayAlias | |
Incomplete |
Definition at line 35 of file CodeGenTBAA.h.
The kind of evaluation to perform on values of a particular type.
Basically, is the code in CGExprScalar, CGExprComplex, or CGExprAgg?
TODO: should vectors maybe be split out into their own thing?
Enumerator | |
---|---|
TEK_Scalar | |
TEK_Complex | |
TEK_Aggregate |
Definition at line 104 of file CodeGenFunction.h.
|
virtual |
Adjust some parameters for the target-based directives, like addresses of the variables captured by reference in lambdas.
Referenced by emitDeferredTargetDecls().
const CGFunctionInfo & clang::CodeGen::arrangeCXXMethodType | ( | CodeGenModule & | CGM, |
const CXXRecordDecl * | RD, | ||
const FunctionProtoType * | FTP, | ||
const CXXMethodDecl * | MD | ||
) |
Definition at line 48 of file CodeGenABITypes.cpp.
References clang::CodeGen::CodeGenTypes::arrangeCXXMethodType(), and clang::CodeGen::CodeGenModule::getTypes().
Referenced by clang::CodeGen::CodeGenTypes::getLLVMContext().
const CGFunctionInfo & clang::CodeGen::arrangeFreeFunctionCall | ( | CodeGenModule & | CGM, |
CanQualType | returnType, | ||
ArrayRef< CanQualType > | argTypes, | ||
FunctionType::ExtInfo | info, | ||
RequiredArgs | args | ||
) |
Definition at line 56 of file CodeGenABITypes.cpp.
References clang::CodeGen::CodeGenTypes::arrangeLLVMFunctionInfo(), and clang::CodeGen::CodeGenModule::getTypes().
Referenced by clang::CodeGen::CodeGenTypes::getLLVMContext().
const CGFunctionInfo & clang::CodeGen::arrangeFreeFunctionType | ( | CodeGenModule & | CGM, |
CanQual< FunctionProtoType > | Ty | ||
) |
Definition at line 36 of file CodeGenABITypes.cpp.
References clang::CodeGen::CodeGenTypes::arrangeFreeFunctionType(), and clang::CodeGen::CodeGenModule::getTypes().
Referenced by clang::CodeGen::CodeGenTypes::getLLVMContext().
const CGFunctionInfo & clang::CodeGen::arrangeFreeFunctionType | ( | CodeGenModule & | CGM, |
CanQual< FunctionNoProtoType > | Ty | ||
) |
Definition at line 42 of file CodeGenABITypes.cpp.
References clang::CodeGen::CodeGenTypes::arrangeFreeFunctionType(), and clang::CodeGen::CodeGenModule::getTypes().
const CGFunctionInfo & clang::CodeGen::arrangeObjCMessageSendSignature | ( | CodeGenModule & | CGM, |
const ObjCMethodDecl * | MD, | ||
QualType | receiverType | ||
) |
Definition at line 29 of file CodeGenABITypes.cpp.
References clang::CodeGen::CodeGenTypes::arrangeObjCMessageSendSignature(), and clang::CodeGen::CodeGenModule::getTypes().
Referenced by clang::CodeGen::CodeGenTypes::getLLVMContext().
|
explicit |
Definition at line 781 of file CGOpenMPRuntime.h.
Referenced by clang::CodeGen::CodeGenModule::~CodeGenModule().
|
virtual |
Perform check on requires decl to ensure that target architecture supports unified addressing.
Referenced by clang::CodeGen::CGOpenMPRuntimeNVPTX::checkArchForUnifiedAddressing(), and emitDeferredTargetDecls().
|
virtual |
Referenced by clang::driver::JobList::addJob(), clang::RewriteRope::assign(), clang::CodeGen::CGOpenMPRuntime::CGOpenMPRuntime(), clang::CXXBasePath::clear(), clang::CodeGen::CGOpenMPRuntimeNVPTX::clear(), clang::MacroArgs::destroy(), clang::RopePieceBTree::empty(), clang::ForwardingDiagnosticConsumer::ForwardingDiagnosticConsumer(), clang::TemplateSpecCandidateSet::getLocation(), clang::Parser::AngleBracketTracker::Loc::isActiveOrNested(), clang::OverloadCandidateSet::isNewCandidate(), clang::CXXBasePaths::setOrigin(), and ~CGOpenMPRuntime().
void clang::CodeGen::computeSPIRKernelABIInfo | ( | CodeGenModule & | CGM, |
CGFunctionInfo & | FI | ||
) |
Definition at line 8842 of file TargetInfo.cpp.
References appendType(), and clang::CodeGen::CodeGenModule::getTypes().
Referenced by clang::CodeGen::CodeGenTypes::arrangeCall(), and clang::CodeGen::CodeGenTypes::arrangeLLVMFunctionInfo().
llvm::FunctionType * clang::CodeGen::convertFreeFunctionType | ( | CodeGenModule & | CGM, |
const FunctionDecl * | FD | ||
) |
Returns null if the function type is incomplete and can't be lowered.
Definition at line 67 of file CodeGenABITypes.cpp.
References clang::CodeGen::CodeGenTypes::ConvertType(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), and Type.
llvm::Type * clang::CodeGen::convertTypeForMemory | ( | CodeGenModule & | CGM, |
QualType | T | ||
) |
Definition at line 78 of file CodeGenABITypes.cpp.
References clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), and clang::CodeGen::CodeGenModule::getTypes().
llvm::FunctionCallee CGOpenMPRuntime::createDispatchFiniFunction | ( | unsigned | IVSize, |
bool | IVSigned | ||
) |
Returns __kmpc_dispatch_fini_* runtime function for the specified size IVSize and sign IVSigned.
Definition at line 2516 of file CGOpenMPRuntime.cpp.
Referenced by emitForStaticInitCall().
llvm::FunctionCallee CGOpenMPRuntime::createDispatchInitFunction | ( | unsigned | IVSize, |
bool | IVSigned | ||
) |
Returns __kmpc_dispatch_init_* runtime function for the specified size IVSize and sign IVSigned.
Definition at line 2494 of file CGOpenMPRuntime.cpp.
Referenced by addMonoNonMonoModifier().
llvm::FunctionCallee CGOpenMPRuntime::createDispatchNextFunction | ( | unsigned | IVSize, |
bool | IVSigned | ||
) |
Returns __kmpc_dispatch_next_* runtime function for the specified size IVSize and sign IVSigned.
Definition at line 2533 of file CGOpenMPRuntime.cpp.
Referenced by emitForStaticInitCall().
llvm::FunctionCallee CGOpenMPRuntime::createForStaticInitFunction | ( | unsigned | IVSize, |
bool | IVSigned | ||
) |
Returns __kmpc_for_static_init_* runtime function for the specified size IVSize and sign IVSigned.
Definition at line 2468 of file CGOpenMPRuntime.cpp.
Referenced by emitForStaticInitCall().
CGObjCRuntime * clang::CodeGen::CreateGNUObjCRuntime | ( | CodeGenModule & | CGM | ) |
Creates an instance of an Objective-C runtime class.
Definition at line 4102 of file CGObjCGNU.cpp.
References clang::ObjCRuntime::FragileMacOSX, clang::ObjCRuntime::GCC, clang::CodeGen::CodeGenModule::getLangOpts(), clang::ObjCRuntime::GNUstep, clang::ObjCRuntime::iOS, clang::ObjCRuntime::MacOSX, clang::LangOptions::ObjCRuntime, clang::ObjCRuntime::ObjFW, and clang::ObjCRuntime::WatchOS.
Referenced by clang::CodeGen::CGObjCRuntime::MessageSendInfo::MessageSendInfo(), and clang::CodeGen::CodeGenModule::~CodeGenModule().
CodeGen::CGCXXABI * clang::CodeGen::CreateItaniumCXXABI | ( | CodeGenModule & | CGM | ) |
Creates an Itanium-family ABI.
Definition at line 467 of file ItaniumCXXABI.cpp.
References clang::TargetCXXABI::GenericAArch64, clang::TargetCXXABI::GenericARM, clang::TargetCXXABI::GenericItanium, clang::TargetCXXABI::GenericMIPS, clang::CodeGen::CodeGenModule::getContext(), clang::TargetInfo::getCXXABI(), clang::TargetCXXABI::getKind(), clang::CodeGen::CodeGenModule::getTarget(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::TargetCXXABI::iOS, clang::TargetCXXABI::iOS64, clang::MemberPointerType::isMemberDataPointer(), clang::TargetCXXABI::Microsoft, Type, clang::TargetCXXABI::WatchOS, and clang::TargetCXXABI::WebAssembly.
Referenced by clang::CodeGen::CGCXXABI::adjustCallArgsForDestructorThunk(), and createCXXABI().
CGObjCRuntime* clang::CodeGen::CreateMacObjCRuntime | ( | CodeGenModule & | CGM | ) |
CGCXXABI * clang::CodeGen::CreateMicrosoftCXXABI | ( | CodeGenModule & | CGM | ) |
Creates a Microsoft-family ABI.
Definition at line 3374 of file MicrosoftCXXABI.cpp.
Referenced by clang::CodeGen::CGCXXABI::adjustCallArgsForDestructorThunk(), and createCXXABI().
CGCUDARuntime * clang::CodeGen::CreateNVCUDARuntime | ( | CodeGenModule & | CGM | ) |
Creates an instance of a CUDA runtime class.
Definition at line 801 of file CGCUDANV.cpp.
Referenced by clang::CodeGen::CodeGenModule::~CodeGenModule().
void CGOpenMPRuntime::createOffloadEntriesAndInfoMetadata | ( | ) |
Creates all the offload entries in the current compilation unit along with the associated metadata.
Definition at line 4084 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::OffloadEntriesInfoManagerTy::actOnDeviceGlobalVarEntriesInfo(), clang::CodeGen::OffloadEntriesInfoManagerTy::actOnTargetRegionEntriesInfo(), clang::CodeGen::CGOpenMPRuntime::CGM, clang::CodeGen::CGOpenMPRuntime::createOffloadEntry(), clang::CodeGen::OffloadEntriesInfoManagerTy::empty(), clang::DiagnosticsEngine::Error, clang::DiagnosticsEngine::getCustomDiagID(), clang::CodeGen::CodeGenModule::getDiags(), clang::CodeGen::CodeGenModule::GetGlobalValue(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::CodeGen::CodeGenTypeCache::Int32Ty, Line, OffloadEntriesInfoManager, clang::CodeGen::OffloadEntriesInfoManagerTy::OMPTargetGlobalVarEntryLink, clang::CodeGen::OffloadEntriesInfoManagerTy::OMPTargetGlobalVarEntryTo, clang::DiagnosticsEngine::Report(), clang::CodeGen::OffloadEntriesInfoManagerTy::size(), and V.
Referenced by emitRequiresDirectiveRegFun().
llvm::Function * CGOpenMPRuntime::createOffloadingBinaryDescriptorRegistration | ( | ) |
Creates and registers offloading binary descriptor for the current compilation unit.
The function that does the registration is returned.
Definition at line 3903 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::ConstantAggregateBuilderTemplateBase< Impl, Traits >::beginArray(), clang::CodeGen::CGOpenMPRuntime::CGM, clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), createConstantGlobalStructAndAddToParent(), clang::CodeGen::OffloadEntriesInfoManagerTy::empty(), clang::ExternalLinkage, clang::CodeGen::ConstantAggregateBuilderTemplateBase< Impl, Traits >::finishAndCreateGlobal(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::CodeGen::CodeGenModule::getModule(), getName(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), getTgtDeviceImageQTy(), getTgtOffloadEntryQTy(), clang::CodeGen::CodeGenModule::getTypes(), clang::CodeGen::CodeGenTypeCache::Int8Ty, OffloadEntriesInfoManager, clang::LangOptions::OMPTargetTriples, and Type.
Referenced by emitRequiresDirectiveRegFun().
llvm::FunctionCallee CGOpenMPRuntime::createRuntimeFunction | ( | unsigned | Function | ) |
Returns specified OpenMP runtime function.
Function | OpenMP runtime function. |
Definition at line 1705 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CGOpenMPRuntime::CGM, clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CGOpenMPRuntime::getIdentTyPointerTy(), getKmpc_MicroPointerTy(), clang::ASTContext::getPointerType(), getTgtBinaryDescriptorQTy(), clang::CodeGen::CodeGenModule::getTypes(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::CodeGenTypeCache::Int64Ty, clang::CodeGen::CodeGenTypeCache::IntPtrTy, clang::CodeGen::CodeGenTypeCache::IntTy, OMPRTL__kmpc_alloc, OMPRTL__kmpc_barrier, OMPRTL__kmpc_cancel, OMPRTL__kmpc_cancel_barrier, OMPRTL__kmpc_cancellationpoint, OMPRTL__kmpc_copyprivate, OMPRTL__kmpc_critical, OMPRTL__kmpc_critical_with_hint, OMPRTL__kmpc_doacross_fini, OMPRTL__kmpc_doacross_init, OMPRTL__kmpc_doacross_post, OMPRTL__kmpc_doacross_wait, OMPRTL__kmpc_end_critical, OMPRTL__kmpc_end_master, OMPRTL__kmpc_end_ordered, OMPRTL__kmpc_end_reduce, OMPRTL__kmpc_end_reduce_nowait, OMPRTL__kmpc_end_serialized_parallel, OMPRTL__kmpc_end_single, OMPRTL__kmpc_end_taskgroup, OMPRTL__kmpc_flush, OMPRTL__kmpc_for_static_fini, OMPRTL__kmpc_fork_call, OMPRTL__kmpc_fork_teams, OMPRTL__kmpc_free, OMPRTL__kmpc_global_thread_num, OMPRTL__kmpc_master, OMPRTL__kmpc_omp_target_task_alloc, OMPRTL__kmpc_omp_task, OMPRTL__kmpc_omp_task_alloc, OMPRTL__kmpc_omp_task_begin_if0, OMPRTL__kmpc_omp_task_complete_if0, OMPRTL__kmpc_omp_task_with_deps, OMPRTL__kmpc_omp_taskwait, OMPRTL__kmpc_omp_taskyield, OMPRTL__kmpc_omp_wait_deps, OMPRTL__kmpc_ordered, OMPRTL__kmpc_push_num_teams, OMPRTL__kmpc_push_num_threads, OMPRTL__kmpc_push_proc_bind, OMPRTL__kmpc_push_target_tripcount, OMPRTL__kmpc_reduce, OMPRTL__kmpc_reduce_nowait, OMPRTL__kmpc_serialized_parallel, OMPRTL__kmpc_single, OMPRTL__kmpc_task_reduction_get_th_data, OMPRTL__kmpc_task_reduction_init, OMPRTL__kmpc_taskgroup, OMPRTL__kmpc_taskloop, OMPRTL__kmpc_threadprivate_cached, OMPRTL__kmpc_threadprivate_register, OMPRTL__tgt_register_lib, OMPRTL__tgt_register_requires, OMPRTL__tgt_target, OMPRTL__tgt_target_data_begin, OMPRTL__tgt_target_data_begin_nowait, OMPRTL__tgt_target_data_end, OMPRTL__tgt_target_data_end_nowait, OMPRTL__tgt_target_data_update, OMPRTL__tgt_target_data_update_nowait, OMPRTL__tgt_target_nowait, OMPRTL__tgt_target_teams, OMPRTL__tgt_target_teams_nowait, OMPRTL__tgt_unregister_lib, clang::CodeGen::CodeGenTypeCache::SizeTy, Type, clang::CodeGen::CodeGenTypeCache::VoidPtrPtrTy, clang::CodeGen::CodeGenTypeCache::VoidPtrTy, and clang::CodeGen::CodeGenTypeCache::VoidTy.
Referenced by emitDeclareSimdFunction(), emitForStaticInitCall(), emitParallelOrTeamsOutlinedFunction(), emitReduceFiniFunction(), emitRequiresDirectiveRegFun(), emitTargetNumIterationsCall(), emitTaskInit(), emitThreadPrivateVarInit(), getCancellationKind(), clang::CodeGen::CGOpenMPRuntime::getCriticalRegionLock(), getOrCreateThreadPrivateCache(), and clang::CodeGen::CGOpenMPRuntime::getThreadID().
|
virtual |
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). |
Referenced by ~CGOpenMPRuntime(), and clang::CGOpenMPSIMDRuntime::~CGOpenMPSIMDRuntime().
|
virtual |
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. |
|
virtual |
Emit code for 'cancellation point' construct.
CancelRegion | Region kind for which the cancellation point must be emitted. |
Referenced by getCancellationKind().
|
virtual |
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). |
Referenced by clang::CodeGen::CGOpenMPRuntimeNVPTX::emitCriticalRegion(), clang::CodeGen::CGOpenMPRuntime::getCriticalRegionLock(), ~CGOpenMPRuntime(), and clang::CGOpenMPSIMDRuntime::~CGOpenMPSIMDRuntime().
|
virtual |
Marks function Fn with properly mangled versions of vector functions.
FD | Function marked as 'declare simd'. |
Fn | LLVM function that must be marked with 'declare simd' attributes. |
Definition at line 10217 of file CGOpenMPRuntime.cpp.
References addFieldToRecordDecl(), clang::CodeGen::CodeGenFunction::Builder, clang::ASTContext::buildImplicitRecord(), clang::RecordDecl::completeDefinition(), clang::CodeGen::CGBuilderTy::CreateConstArrayGEP(), clang::CodeGen::CodeGenFunction::CreateMemTemp(), clang::CodeGen::CGBuilderTy::CreatePointerBitCastOrAddrSpaceCast(), createRuntimeFunction(), clang::CodeGen::CodeGenFunction::EHStack, emitAArch64DeclareSimdFunction(), emitDoacrossInit(), emitDoacrossOrdered(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CodeGen::CodeGenFunction::EmitNullInitialization(), clang::CodeGen::CodeGenFunction::EmitRuntimeCall(), clang::CodeGen::CodeGenFunction::EmitScalarConversion(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::CodeGenFunction::EmitStoreOfScalar(), clang::CodeGen::CGOpenMPRuntime::emitUpdateLocation(), emitX86DeclareSimdFunction(), clang::Expr::EvaluateKnownConstInt(), clang::RecordDecl::field_begin(), clang::Type::getAsTagDecl(), clang::OMPExecutableDirective::getBeginLoc(), getCanonicalDecl(), clang::ASTContext::getConstantArrayType(), OMPDependClause::getDependencyKind(), clang::OMPExecutableDirective::getEndLoc(), clang::Expr::getExprLoc(), clang::APValue::getInt(), clang::ASTContext::getIntTypeForBitwidth(), OMPDependClause::getLoopData(), clang::Redeclarable< decl_type >::getMostRecentDecl(), clang::OMPLoopDirective::getNumIterations(), OMPDependClause::getNumLoops(), clang::ASTContext::getOpenMPDefaultSimdAlign(), clang::CodeGen::Address::getPointer(), clang::Redeclarable< decl_type >::getPreviousDecl(), clang::ASTContext::getRecordType(), clang::CodeGen::CGOpenMPRuntime::getThreadID(), clang::Expr::getType(), clang::CodeGen::CodeGenFunction::HaveInsertPoint(), clang::Expr::IgnoreParenImpCasts(), clang::QualType::isNull(), KmpDimTy, clang::CodeGen::CodeGenFunction::MakeAddrLValue(), clang::ArrayType::Normal, NormalAndEHCleanup, OMPRTL__kmpc_doacross_fini, OMPRTL__kmpc_doacross_init, OMPRTL__kmpc_doacross_post, OMPRTL__kmpc_doacross_wait, P, clang::FunctionDecl::parameters(), clang::Expr::SE_AllowSideEffects, clang::Decl::specific_attrs(), clang::TagDecl::startDefinition(), State, clang::ASTContext::toCharUnitsFromBits(), and clang::Expr::EvalResult::Val.
Referenced by clang::CodeGen::TargetDataInfo::requiresDevicePointerInfo().
|
virtual |
Emit a code for initialization of declare target variable.
VD | Declare target variable. |
Addr | Address of the global variable VD. |
PerformInit | true if initialization expression is not constant. |
Definition at line 2778 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenModule::addUsedGlobal(), clang::CodeGen::CodeGenTypes::arrangeNullaryFunction(), clang::CodeGen::CGOpenMPRuntime::CGM, clang::CodeGen::ApplyDebugLocation::CreateArtificial(), clang::CodeGen::ApplyDebugLocation::CreateEmpty(), clang::CodeGen::CodeGenModule::CreateGlobalInitOrDestructFunction(), DeclareTargetWithDefinition, clang::QualType::DK_none, clang::CodeGen::CodeGenFunction::EmitAnyExprToMem(), clang::CodeGen::CodeGenFunction::emitDestroy(), clang::CodeGen::CodeGenFunction::FinishFunction(), getAddrOfArtificialThreadPrivate(), clang::VarDecl::getAnyInitializer(), clang::DeclaratorDecl::getBeginLoc(), clang::VarDecl::getCanonicalDecl(), clang::CodeGen::CodeGenModule::getContext(), clang::ASTContext::getDeclAlign(), clang::VarDecl::getDefinition(), clang::CodeGen::CodeGenFunction::getDestroyer(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::CodeGen::CodeGenModule::getMangledName(), clang::CodeGen::CodeGenModule::getModule(), clang::NamedDecl::getName(), clang::QualType::getQualifiers(), getTargetEntryUniqueInfo(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), HasRequiresUnifiedSharedMemory, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::CodeGenTypeCache::Int8Ty, clang::QualType::isDestructedType(), Line, clang::CodeGen::CodeGenFunction::needsEHCleanup(), OffloadEntriesInfoManager, clang::CodeGen::OffloadEntriesInfoManagerTy::OMPTargetRegionEntryCtor, clang::CodeGen::OffloadEntriesInfoManagerTy::OMPTargetRegionEntryDtor, clang::CodeGen::OffloadEntriesInfoManagerTy::registerTargetRegionEntryInfo(), clang::CodeGen::CodeGenFunction::StartFunction(), and clang::ASTContext::VoidTy.
Referenced by clang::CodeGen::StaticRTInput::StaticRTInput().
void CGOpenMPRuntime::emitDeferredTargetDecls | ( | ) | const |
Emit deferred declare target variables marked for deferred emission.
Definition at line 9298 of file CGOpenMPRuntime.cpp.
References adjustTargetSpecificDataForLambdas(), clang::CodeGen::CGOpenMPRuntime::CGM, checkArchForUnifiedAddressing(), clang::OMPRequiresDecl::clauselists(), clang::Default, DeferredGlobalVariables, clang::CodeGen::CodeGenModule::EmitGlobal(), clang::Decl::getAttr(), clang::OMPExecutableDirective::getDirectiveKind(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), hasAllocateAttributeForGlobalVar(), clang::Decl::hasAttr(), HasRequiresUnifiedSharedMemory, and clang::isOpenMPTargetExecutionDirective().
|
virtual |
CGF | Reference to current CodeGenFunction. |
Loc | Clang source location. |
SchedKind | Schedule kind, specified by the 'dist_schedule' clause. |
Values | Input arguments for the construct. |
Referenced by emitForStaticInitCall(), clang::CodeGen::StaticRTInput::StaticRTInput(), and clang::CGOpenMPSIMDRuntime::~CGOpenMPSIMDRuntime().
|
virtual |
Emit initialization for doacross loop nesting support.
D | Loop-based construct used in doacross nesting construct. |
Referenced by emitDeclareSimdFunction(), and clang::CodeGen::TargetDataInfo::requiresDevicePointerInfo().
|
virtual |
Emit code for doacross ordered directive with 'depend' clause.
C | 'depend' clause with 'sink|source' dependency kind. |
Referenced by emitDeclareSimdFunction(), and clang::CodeGen::TargetDataInfo::requiresDevicePointerInfo().
|
virtual |
Emit flush of the variables specified in 'omp flush' directive.
Vars | List of variables to flush. |
Referenced by emitForStaticInitCall(), and clang::CGOpenMPSIMDRuntime::~CGOpenMPSIMDRuntime().
|
virtual |
Call the appropriate runtime routine to initialize it before start of loop.
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. |
Referenced by addMonoNonMonoModifier(), clang::CodeGen::DispatchRTInput::DispatchRTInput(), and clang::CGOpenMPSIMDRuntime::~CGOpenMPSIMDRuntime().
|
virtual |
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. |
Referenced by emitForStaticInitCall(), clang::CodeGen::StaticRTInput::StaticRTInput(), and clang::CGOpenMPSIMDRuntime::~CGOpenMPSIMDRuntime().
|
virtual |
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. |
Referenced by emitForStaticInitCall(), clang::CodeGen::StaticRTInput::StaticRTInput(), and clang::CGOpenMPSIMDRuntime::~CGOpenMPSIMDRuntime().
|
virtual |
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. |
Referenced by emitForStaticInitCall(), clang::CodeGen::StaticRTInput::StaticRTInput(), and clang::CGOpenMPSIMDRuntime::~CGOpenMPSIMDRuntime().
|
virtual |
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. |
Referenced by emitForStaticInitCall(), clang::CodeGen::StaticRTInput::StaticRTInput(), and clang::CGOpenMPSIMDRuntime::~CGOpenMPSIMDRuntime().
|
virtual |
Emits OpenMP-specific function prolog.
Required for device constructs.
Referenced by clang::CodeGen::CGOpenMPRuntime::emitCall().
|
virtual |
Emit code for the directive that does not require outlining.
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. |
HasCancel | true if region has inner cancel directive, false otherwise. |
Definition at line 6371 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::CapturedStmtInfo, clang::CodeGen::CodeGenFunction::CGCapturedStmtInfo::EmitBody(), and clang::CodeGen::CodeGenFunction::HaveInsertPoint().
Referenced by emitRequiresDirectiveRegFun(), emitTargetNumIterationsCall(), and clang::CodeGen::CGOpenMPRuntime::getCriticalRegionLock().
void CGOpenMPRuntime::emitKmpRoutineEntryT | ( | QualType | KmpInt32Ty | ) |
Build type kmp_routine_entry_t (if not built yet).
Definition at line 4311 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CGOpenMPRuntime::CGM, clang::CodeGen::CodeGenTypes::ConvertType(), clang::CodeGen::CodeGenModule::getContext(), clang::ASTContext::getFunctionType(), clang::ASTContext::getPointerType(), clang::CodeGen::CodeGenModule::getTypes(), and clang::ASTContext::VoidPtrTy.
Referenced by emitTaskInit().
|
virtual |
Emits a master region.
MasterOpGen | Generator for the statement associated with the given master region. |
Referenced by clang::CodeGen::CGOpenMPRuntime::getCriticalRegionLock(), ~CGOpenMPRuntime(), and clang::CGOpenMPSIMDRuntime::~CGOpenMPSIMDRuntime().
|
virtual |
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. |
Referenced by emitRequiresDirectiveRegFun().
|
virtual |
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. |
Referenced by emitForStaticInitCall(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitNumThreadsClause(), clang::CodeGen::StaticRTInput::StaticRTInput(), and clang::CGOpenMPSIMDRuntime::~CGOpenMPSIMDRuntime().
|
virtual |
Emit an ordered region.
OrderedOpGen | Generator for the statement associated with the given ordered region. |
Referenced by ~CGOpenMPRuntime(), and clang::CGOpenMPSIMDRuntime::~CGOpenMPSIMDRuntime().
|
virtual |
Emits call of the outlined function with the provided arguments, translating these arguments to correct target-specific arguments.
Referenced by clang::CodeGen::CGOpenMPRuntime::emitCall(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitOutlinedFunctionCall(), and emitTargetNumIterationsCall().
|
virtual |
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. |
Referenced by clang::CodeGen::CGOpenMPRuntime::emitOMPIfClause(), ~CGOpenMPRuntime(), and clang::CGOpenMPSIMDRuntime::~CGOpenMPSIMDRuntime().
|
virtual |
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. |
Referenced by emitParallelOrTeamsOutlinedFunction(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitParallelOutlinedFunction(), ~CGOpenMPRuntime(), and clang::CGOpenMPSIMDRuntime::~CGOpenMPSIMDRuntime().
|
virtual |
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.
Referenced by emitForStaticInitCall(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitProcBindClause(), clang::CodeGen::StaticRTInput::StaticRTInput(), and clang::CGOpenMPSIMDRuntime::~CGOpenMPSIMDRuntime().
|
virtual |
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. |
Referenced by clang::CGOpenMPSIMDRuntime::emitReduction(), and emitSingleReductionCombiner().
llvm::Function* clang::CodeGen::emitReductionFunction | ( | SourceLocation | Loc, |
llvm::Type * | ArgsType, | ||
ArrayRef< const Expr *> | Privates, | ||
ArrayRef< const Expr *> | LHSExprs, | ||
ArrayRef< const Expr *> | RHSExprs, | ||
ArrayRef< const Expr *> | ReductionOps | ||
) |
Emits reduction function.
ArgsType | Array type containing pointers to reduction variables. |
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)'. |
Referenced by emitReductionCombiner().
|
virtual |
Creates the offloading descriptor in the event any target region was emitted in the current module and return the function that registers it.
Referenced by emitRequiresDirectiveRegFun().
llvm::Function * CGOpenMPRuntime::emitRequiresDirectiveRegFun | ( | ) |
Creates and returns a registration function for when at least one requires directives was used in the current module.
Definition at line 9395 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenTypes::arrangeNullaryFunction(), clang::CodeGen::TargetDataInfo::BasePointersArray, clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CGBuilderTy::CreateBitCast(), clang::CodeGen::CodeGenModule::CreateGlobalInitOrDestructFunction(), createOffloadEntriesAndInfoMetadata(), createOffloadingBinaryDescriptorRegistration(), createRuntimeFunction(), emitInlinedDirective(), emitNumTeamsClause(), emitOffloadingArrays(), emitOffloadingArraysArgument(), clang::CodeGen::CGOpenMPRuntime::emitOMPIfClause(), emitRegistrationFunction(), clang::CodeGen::CodeGenFunction::EmitRuntimeCall(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), emitTargetDataCalls(), emitTargetDataStandAloneCall(), emitTeamsCall(), clang::CodeGen::CGOpenMPRuntime::emitUpdateLocation(), clang::CodeGen::OffloadEntriesInfoManagerTy::empty(), clang::CodeGen::CodeGenFunction::FinishFunction(), clang::CodeGen::CodeGenModule::getContext(), clang::OMPExecutableDirective::getDirectiveKind(), clang::CodeGen::CodeGenTypes::GetFunctionType(), getKmpc_MicroPointerTy(), clang::CodeGen::CodeGenModule::getLangOpts(), getName(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), clang::CodeGen::CGOpenMPRuntime::getThreadID(), clang::CodeGen::CodeGenModule::getTypes(), clang::OMPExecutableDirective::hasClausesOfKind(), HasEmittedDeclareTargetRegion, HasEmittedTargetRegion, HasRequiresUnifiedSharedMemory, clang::CodeGen::CodeGenFunction::HaveInsertPoint(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::CodeGenTypeCache::Int64Ty, clang::CodeGen::TargetDataInfo::MapTypesArray, clang::CodeGen::TargetDataInfo::NumberOfPtrs, OffloadEntriesInfoManager, clang::OMPD_unknown, OMPRTL__kmpc_fork_teams, OMPRTL__kmpc_push_num_teams, OMPRTL__tgt_register_requires, OMPRTL__tgt_target_data_begin, OMPRTL__tgt_target_data_begin_nowait, OMPRTL__tgt_target_data_end, OMPRTL__tgt_target_data_end_nowait, OMPRTL__tgt_target_data_update, OMPRTL__tgt_target_data_update_nowait, clang::LangOptions::OMPTargetTriples, clang::CodeGen::TargetDataInfo::PointersArray, clang::CodeGen::TargetDataInfo::SizesArray, clang::CodeGen::CodeGenFunction::StartFunction(), and clang::ASTContext::VoidTy.
void CGOpenMPRuntime::emitSingleReductionCombiner | ( | CodeGenFunction & | CGF, |
const Expr * | ReductionOp, | ||
const Expr * | PrivateRef, | ||
const DeclRefExpr * | LHS, | ||
const DeclRefExpr * | RHS | ||
) |
Emits single reduction combiner.
Definition at line 5672 of file CGOpenMPRuntime.cpp.
References EmitOMPAggregateReduction(), emitReduction(), emitReductionCombiner(), clang::DeclRefExpr::getDecl(), clang::Expr::getType(), and clang::Type::isArrayType().
|
virtual |
Emits a single region.
SingleOpGen | Generator for the statement associated with the given single region. |
Referenced by ~CGOpenMPRuntime(), and clang::CGOpenMPSIMDRuntime::~CGOpenMPSIMDRuntime().
|
virtual |
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. |
Referenced by emitTargetNumIterationsCall().
|
virtual |
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. |
Referenced by emitRequiresDirectiveRegFun(), and clang::CodeGen::TargetDataInfo::requiresDevicePointerInfo().
|
virtual |
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. |
Referenced by emitRequiresDirectiveRegFun(), and clang::CodeGen::TargetDataInfo::requiresDevicePointerInfo().
|
virtual |
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. |
Referenced by registerTargetGlobalVariable().
|
virtual |
Emit the global GD if it is meaningful for the target.
Returns if it was emitted successfully.
GD | Global to scan. |
Referenced by registerTargetGlobalVariable().
|
virtual |
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. |
Referenced by registerTargetGlobalVariable().
|
virtual |
Emit code that pushes the trip count of loops associated with constructs 'target teams distribute' and 'teams distribute parallel for'.
SizeEmitter | Emits the int64 value for the number of iterations of the associated loop. |
Definition at line 8695 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::TargetDataInfo::BasePointersArray, clang::CodeGen::CGOpenMPRuntime::CGM, createRuntimeFunction(), emitInlinedDirective(), emitNumTeamsForTargetDirective(), emitNumThreadsForTargetDirective(), emitOffloadingArrays(), emitOffloadingArraysArgument(), clang::CodeGen::CGOpenMPRuntime::emitOMPIfClause(), emitOutlinedFunctionCall(), emitTargetCall(), clang::OMPExecutableDirective::getCapturedStmt(), clang::CodeGen::CodeGenModule::getContext(), clang::OMPExecutableDirective::getDirectiveKind(), getNestedDistributeDirective(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), clang::OMPExecutableDirective::hasClausesOfKind(), clang::CodeGen::CodeGenFunction::HaveInsertPoint(), clang::isOpenMPDistributeDirective(), clang::isOpenMPTeamsDirective(), clang::CodeGen::TargetDataInfo::MapTypesArray, clang::CodeGen::TargetDataInfo::NumberOfPtrs, clang::OMPD_unknown, OMPRTL__kmpc_push_target_tripcount, OMPRTL__tgt_target, OMPRTL__tgt_target_nowait, OMPRTL__tgt_target_teams, OMPRTL__tgt_target_teams_nowait, clang::CodeGen::TargetDataInfo::PointersArray, and clang::CodeGen::TargetDataInfo::SizesArray.
|
virtual |
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. |
|
virtual |
Referenced by emitTaskInit().
|
virtual |
Emit a taskgroup region.
TaskgroupOpGen | Generator for the statement associated with the given taskgroup region. |
Referenced by clang::CodeGen::CGOpenMPRuntime::getCriticalRegionLock(), ~CGOpenMPRuntime(), and clang::CGOpenMPSIMDRuntime::~CGOpenMPSIMDRuntime().
CGOpenMPRuntime::TaskResultTy CGOpenMPRuntime::emitTaskInit | ( | CodeGenFunction & | CGF, |
SourceLocation | Loc, | ||
const OMPExecutableDirective & | D, | ||
llvm::Function * | TaskFunction, | ||
QualType | SharedsTy, | ||
Address | Shareds, | ||
const OMPTaskDataTy & | Data | ||
) |
Definition at line 4984 of file CGOpenMPRuntime.cpp.
References addFieldToRecordDecl(), clang::ASTContext::BoolTy, clang::CodeGen::CodeGenFunction::Builder, clang::ASTContext::buildImplicitRecord(), clang::CodeGen::CGOpenMPRuntime::CGM, checkDestructorsRequired(), checkInitIsRequired(), clang::RecordDecl::completeDefinition(), clang::CodeGen::CodeGenFunction::ConvertType(), clang::CodeGen::CodeGenFunction::ConvertTypeForMem(), clang::CodeGen::CGBuilderTy::CreateConstArrayGEP(), createKmpTaskTRecordDecl(), createKmpTaskTWithPrivatesRecordDecl(), clang::CodeGen::CodeGenFunction::CreateMemTemp(), clang::CodeGen::CGBuilderTy::CreatePointerBitCastOrAddrSpaceCast(), createRuntimeFunction(), clang::CodeGen::OMPTaskDataTy::Dependences, clang::CodeGen::AggValueSlot::DoesNotOverlap, clang::CodeGen::CodeGenFunction::EmitAggregateCopy(), clang::CodeGen::CodeGenFunction::EmitAnyExprToMem(), emitDestructorsFunction(), emitKmpRoutineEntryT(), clang::CodeGen::CodeGenFunction::EmitLoadOfScalar(), clang::CodeGen::CodeGenFunction::EmitLValue(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CodeGen::CodeGenFunction::EmitNullInitialization(), clang::CodeGen::CodeGenFunction::EmitOMPArraySectionExpr(), clang::CodeGen::CGOpenMPRuntime::emitOMPIfClause(), emitPrivatesInit(), emitProxyTaskFunction(), clang::CodeGen::CodeGenFunction::EmitRuntimeCall(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::CodeGenFunction::EmitStoreOfScalar(), emitTaskCall(), emitTaskDupFunction(), emitTaskLoopCall(), emitTaskPrivateMappingFunction(), clang::CodeGen::CGOpenMPRuntime::emitUpdateLocation(), clang::CodeGen::CodeGenFunction::EvaluateExprAsBool(), clang::RecordDecl::field_begin(), clang::RecordDecl::field_empty(), clang::CodeGen::OMPTaskDataTy::Final, clang::CodeGen::OMPTaskDataTy::FirstprivateCopies, clang::CodeGen::OMPTaskDataTy::FirstprivateInits, clang::CodeGen::OMPTaskDataTy::FirstprivateVars, clang::CodeGen::LValue::getAddress(), clang::Type::getAsStructureType(), clang::Type::getAsTagDecl(), clang::ASTContext::getConstantArrayType(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenFunction::getContext(), clang::RecordType::getDecl(), clang::ASTContext::getDeclAlign(), clang::OMPExecutableDirective::getDirectiveKind(), clang::ASTContext::getIntPtrType(), clang::ASTContext::getIntTypeForBitwidth(), clang::OMPLoopDirective::getLowerBoundVariable(), clang::CodeGen::CodeGenFunction::getNaturalTypeAlignment(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::CodeGen::Address::getPointer(), clang::CodeGen::LValue::getPointer(), clang::ASTContext::getPointerType(), clang::CodeGen::LValue::getQuals(), clang::ASTContext::getRecordType(), clang::OMPExecutableDirective::getSingleClause(), clang::CodeGen::CodeGenModule::getSize(), clang::ASTContext::getSizeType(), clang::OMPLoopDirective::getStrideVariable(), clang::CodeGen::CGOpenMPRuntime::getThreadID(), clang::Expr::getType(), clang::ASTContext::getTypeSize(), clang::CodeGen::CodeGenFunction::getTypeSize(), clang::ASTContext::getTypeSizeInChars(), clang::OMPLoopDirective::getUpperBoundVariable(), clang::OMPExecutableDirective::hasClausesOfKind(), clang::CodeGen::CodeGenFunction::HaveInsertPoint(), clang::Expr::IgnoreParenImpCasts(), clang::CodeGen::CodeGenTypeCache::Int64Ty, clang::CodeGen::CodeGenTypeCache::IntPtrTy, clang::CodeGen::CodeGenTypeCache::IntTy, clang::CodeGen::Address::invalid(), clang::QualType::isNull(), clang::isOpenMPTargetDataManagementDirective(), clang::isOpenMPTargetExecutionDirective(), clang::isOpenMPTaskLoopDirective(), KmpDependInfoTy, KmpTaskTQTy, clang::CodeGen::TaskResultTy::KmpTaskTQTyRD, clang::CodeGen::OMPTaskDataTy::LastprivateCopies, clang::CodeGen::OMPTaskDataTy::LastprivateVars, clang::CodeGen::CodeGenFunction::MakeAddrLValue(), clang::CodeGen::CodeGenFunction::MakeNaturalAlignAddrLValue(), clang::CodeGen::TaskResultTy::NewTask, clang::CodeGen::TaskResultTy::NewTaskNewTaskTTy, clang::ArrayType::Normal, clang::OMPC_DEPEND_unknown, OMPRTL__kmpc_omp_target_task_alloc, OMPRTL__kmpc_omp_task, OMPRTL__kmpc_omp_task_alloc, OMPRTL__kmpc_omp_task_begin_if0, OMPRTL__kmpc_omp_task_complete_if0, OMPRTL__kmpc_omp_task_with_deps, OMPRTL__kmpc_omp_wait_deps, OMPRTL__kmpc_taskloop, clang::CodeGen::OMPTaskDataTy::Priority, clang::CodeGen::OMPTaskDataTy::PrivateCopies, Privates, clang::CodeGen::OMPTaskDataTy::PrivateVars, clang::CodeGen::OMPTaskDataTy::Reductions, SavedKmpTaskloopTQTy, SavedKmpTaskTQTy, clang::CodeGen::OMPTaskDataTy::Schedule, clang::CodeGen::RegionCodeGenTy::setAction(), clang::CodeGen::CodeGenTypeCache::SizeTy, clang::TagDecl::startDefinition(), clang::CodeGen::TaskResultTy::TaskDupFn, clang::CodeGen::TaskResultTy::TaskEntry, clang::CodeGen::TaskResultTy::TDBase, clang::CodeGen::OMPTaskDataTy::Tied, Type, clang::CodeGen::CodeGenTypeCache::VoidPtrTy, and clang::ASTContext::VoidPtrTy.
|
virtual |
Referenced by emitTaskInit().
|
virtual |
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. |
Referenced by emitParallelOrTeamsOutlinedFunction(), ~CGOpenMPRuntime(), and clang::CGOpenMPSIMDRuntime::~CGOpenMPSIMDRuntime().
|
virtual |
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. |
Referenced by emitReduceFiniFunction().
|
virtual |
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. |
Referenced by emitReduceFiniFunction().
|
virtual |
Emit code for 'taskwait' directive.
Referenced by emitReduceFiniFunction().
|
virtual |
Emits code for a taskyield directive.
Referenced by clang::CodeGen::CGOpenMPRuntime::getCriticalRegionLock(), ~CGOpenMPRuntime(), and clang::CGOpenMPSIMDRuntime::~CGOpenMPSIMDRuntime().
|
virtual |
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. |
Referenced by emitRequiresDirectiveRegFun().
|
virtual |
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. |
Referenced by emitParallelOrTeamsOutlinedFunction(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitTeamsOutlinedFunction(), ~CGOpenMPRuntime(), and clang::CGOpenMPSIMDRuntime::~CGOpenMPSIMDRuntime().
|
virtual |
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. |
Referenced by clang::CodeGen::CodeGenModule::EmitOMPThreadPrivateDecl(), emitThreadPrivateVarInit(), clang::CodeGen::StaticRTInput::StaticRTInput(), and clang::CGOpenMPSIMDRuntime::~CGOpenMPSIMDRuntime().
void CGOpenMPRuntime::emitThreadPrivateVarInit | ( | CodeGenFunction & | CGF, |
Address | VDAddr, | ||
llvm::Value * | Ctor, | ||
llvm::Value * | CopyCtor, | ||
llvm::Value * | Dtor, | ||
SourceLocation | Loc | ||
) |
Emits initialization code for the threadprivate variables.
VDAddr | Address of the global variable VD. |
Ctor | Pointer to a global init function for VD. |
CopyCtor | Pointer to a global copy function for VD. |
Dtor | Pointer to a global destructor function for VD. |
Loc | Location of threadprivate declaration. |
Definition at line 2615 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CGOpenMPRuntime::CGM, createRuntimeFunction(), clang::CodeGen::CodeGenFunction::EmitRuntimeCall(), emitThreadPrivateVarDefinition(), clang::CodeGen::CGOpenMPRuntime::emitUpdateLocation(), clang::VarDecl::getAnyInitializer(), clang::CodeGen::CodeGenModule::getContext(), clang::VarDecl::getDefinition(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::CodeGen::CodeGenModule::getMangledName(), clang::CodeGen::Address::getPointer(), clang::ASTContext::getTargetInfo(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::TargetInfo::isTLSSupported(), OMPRTL__kmpc_global_thread_num, OMPRTL__kmpc_threadprivate_register, clang::ImplicitParamDecl::Other, ThreadPrivateWithDefinition, clang::CodeGen::CodeGenTypeCache::VoidPtrTy, and clang::ASTContext::VoidPtrTy.
|
virtual |
Emit code for the specified user defined reduction construct.
Definition at line 1345 of file CGOpenMPRuntime.cpp.
References clang::OMPDeclareReductionDecl::CallInit, clang::CodeGen::CGOpenMPRuntime::CGM, clang::CodeGen::CodeGenFunction::CurFn, emitCombinerOrInitializer(), clang::OMPDeclareReductionDecl::getCombiner(), clang::OMPDeclareReductionDecl::getCombinerIn(), clang::OMPDeclareReductionDecl::getCombinerOut(), clang::OMPDeclareReductionDecl::getInitializer(), clang::OMPDeclareReductionDecl::getInitializerKind(), clang::OMPDeclareReductionDecl::getInitOrig(), clang::OMPDeclareReductionDecl::getInitPriv(), clang::ValueDecl::getType(), and clang::Initializer.
Referenced by getUserDefinedReduction(), and ~CGOpenMPRuntime().
|
virtual |
Cleans up references to the objects in finished function.
Referenced by clang::CodeGen::CGOpenMPRuntimeNVPTX::functionFinished(), clang::CodeGen::CGOpenMPRuntime::getThreadID(), and ~CGOpenMPRuntime().
|
virtual |
Gets the OpenMP-specific address of the local variable.
Referenced by clang::CodeGen::CGOpenMPRuntime::emitCall().
|
virtual |
Creates artificial threadprivate variable with name Name
and type VarType
.
VarType | Type of the artificial threadprivate variable. |
Name | Name of the artificial threadprivate variable. |
Referenced by emitDeclareTargetVarDefinition(), emitReduceFiniFunction(), clang::CodeGen::StaticRTInput::StaticRTInput(), and clang::CGOpenMPSIMDRuntime::~CGOpenMPSIMDRuntime().
Returns the address of the variable marked as declare target with link clause OR as declare target with to clause and unified memory.
Definition at line 2555 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenModule::addUsedGlobal(), clang::CodeGen::CGOpenMPRuntime::CGM, clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), clang::ExternalLinkage, clang::CodeGen::CodeGenModule::GetAddrOfGlobal(), clang::CodeGen::CodeGenModule::getContext(), clang::ASTContext::getDeclAlign(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::CodeGen::CodeGenModule::getMangledName(), clang::CodeGen::CodeGenModule::getModule(), getOrCreateInternalVariable(), clang::ASTContext::getPointerType(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), HasRequiresUnifiedSharedMemory, clang::CodeGen::Address::invalid(), and registerTargetGlobalVariable().
Referenced by registerTargetGlobalVariable(), and clang::CodeGen::StaticRTInput::StaticRTInput().
|
virtual |
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. |
Referenced by getOrCreateThreadPrivateCache(), clang::CodeGen::StaticRTInput::StaticRTInput(), and clang::CGOpenMPSIMDRuntime::~CGOpenMPSIMDRuntime().
|
virtual |
Choose default schedule type and chunk value for the dist_schedule clause.
Definition at line 1580 of file CGOpenMPRuntime.h.
|
virtual |
Returns default address space for the constant firstprivates, 0 by default.
Definition at line 778 of file CGOpenMPRuntime.h.
Referenced by registerTargetFirstprivateCopy().
|
virtual |
Choose default schedule type and chunk value for the schedule clause.
Referenced by clang::CodeGen::CGOpenMPRuntime::getDefaultFlagsForBarriers().
|
inlinestatic |
Given that the base address has the given alignment source, what's our confidence in the alignment of the field?
Definition at line 143 of file CGValue.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitLValueForField(), and clang::CodeGen::CodeGenFunction::EmitLValueForFieldInitialization().
llvm::Type * CGOpenMPRuntime::getKmpc_MicroPointerTy | ( | ) |
Returns pointer to kmpc_micro type.
Definition at line 1695 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CGOpenMPRuntime::CGM, clang::CodeGen::CodeGenTypeCache::Int32Ty, Type, and clang::CodeGen::CodeGenTypeCache::VoidTy.
Referenced by createRuntimeFunction(), and emitRequiresDirectiveRegFun().
unsigned clang::CodeGen::getLLVMFieldNumber | ( | CodeGenModule & | CGM, |
const RecordDecl * | RD, | ||
const FieldDecl * | FD | ||
) |
Given a non-bitfield struct field, return its index within the elements of the struct's converted type.
The returned index refers to a field number in the complete object type which is returned by convertTypeForMemory. FD must be a field in RD directly (i.e. not an inherited field).
Definition at line 82 of file CodeGenABITypes.cpp.
References clang::CodeGen::CodeGenTypes::getCGRecordLayout(), clang::CodeGen::CGRecordLayout::getLLVMFieldNo(), and clang::CodeGen::CodeGenModule::getTypes().
std::string clang::CodeGen::getName | ( | ArrayRef< StringRef > | Parts | ) | const |
Get the platform-specific name separator.
Referenced by clang::CodeGen::CGOpenMPRuntime::createOffloadEntry(), createOffloadingBinaryDescriptorRegistration(), emitReductionCombiner(), emitRequiresDirectiveRegFun(), clang::CodeGen::CGOpenMPRuntime::emitTargetOutlinedFunctionHelper(), clang::CodeGen::CGOpenMPRuntime::getCriticalRegionLock(), clang::CodeGen::CodeGenModule::getFunctionFeatureMap(), getOrCreateThreadPrivateCache(), and registerTargetGlobalVariable().
llvm::Function * clang::CodeGen::getNonTrivialCStructCopyAssignmentOperator | ( | CodeGenModule & | CGM, |
CharUnits | DstAlignment, | ||
CharUnits | SrcAlignment, | ||
bool | IsVolatile, | ||
QualType | QT | ||
) |
Returns the copy assignment operator for a C struct with non-trivially copyable fields, generating it if necessary.
The returned function uses the cdecl
calling convention, returns void, and takes two arguments: pointers to the addresses of the destination and source structs, respectively.
Definition at line 968 of file CGNonTrivialStruct.cpp.
References clang::CodeGen::CodeGenModule::getContext(), and getSpecialFunction().
llvm::Function * clang::CodeGen::getNonTrivialCStructCopyConstructor | ( | CodeGenModule & | CGM, |
CharUnits | DstAlignment, | ||
CharUnits | SrcAlignment, | ||
bool | IsVolatile, | ||
QualType | QT | ||
) |
Returns the copy constructor for a C struct with non-trivially copyable fields, generating it if necessary.
The returned function uses the cdecl
calling convention, returns void, and takes two arguments: pointers to the addresses of the destination and source structs, respectively.
Definition at line 944 of file CGNonTrivialStruct.cpp.
References clang::CodeGen::CodeGenModule::getContext(), and getSpecialFunction().
llvm::Function * clang::CodeGen::getNonTrivialCStructDefaultConstructor | ( | CodeGenModule & | GCM, |
CharUnits | DstAlignment, | ||
bool | IsVolatile, | ||
QualType | QT | ||
) |
Returns the default constructor for a C struct with non-trivially copyable fields, generating it if necessary.
The returned function uses the cdecl
calling convention, returns void, and takes a single argument that is a pointer to the address of the struct.
Definition at line 935 of file CGNonTrivialStruct.cpp.
References clang::CodeGen::CodeGenModule::getContext(), and getSpecialFunction().
llvm::Function * clang::CodeGen::getNonTrivialCStructDestructor | ( | CodeGenModule & | CGM, |
CharUnits | DstAlignment, | ||
bool | IsVolatile, | ||
QualType | QT | ||
) |
Returns the destructor for a C struct with non-trivially copyable fields, generating it if necessary.
The returned function uses the cdecl
calling convention, returns void, and takes a single argument that is a pointer to the address of the struct.
Definition at line 992 of file CGNonTrivialStruct.cpp.
References clang::CodeGen::CodeGenModule::getContext(), and getSpecialFunction().
llvm::Function * clang::CodeGen::getNonTrivialCStructMoveAssignmentOperator | ( | CodeGenModule & | CGM, |
CharUnits | DstAlignment, | ||
CharUnits | SrcAlignment, | ||
bool | IsVolatile, | ||
QualType | QT | ||
) |
Return the move assignment operator for a C struct with non-trivially copyable fields, generating it if necessary.
The returned function uses the cdecl
calling convention, returns void, and takes two arguments: pointers to the addresses of the destination and source structs, respectively.
Definition at line 980 of file CGNonTrivialStruct.cpp.
References clang::CodeGen::CodeGenModule::getContext(), and getSpecialFunction().
llvm::Function * clang::CodeGen::getNonTrivialCStructMoveConstructor | ( | CodeGenModule & | CGM, |
CharUnits | DstAlignment, | ||
CharUnits | SrcAlignment, | ||
bool | IsVolatile, | ||
QualType | QT | ||
) |
Returns the move constructor for a C struct with non-trivially copyable fields, generating it if necessary.
The returned function uses the cdecl
calling convention, returns void, and takes two arguments: pointers to the addresses of the destination and source structs, respectively.
Definition at line 956 of file CGNonTrivialStruct.cpp.
References clang::CodeGen::CodeGenModule::getContext(), and getSpecialFunction().
llvm::Constant * CGOpenMPRuntime::getOrCreateInternalVariable | ( | llvm::Type * | Ty, |
const llvm::Twine & | Name, | ||
unsigned | AddressSpace = 0 |
||
) |
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.
Ty | Type of the global variable. If it is exist already the type must be the same. |
Name | Name of the variable. |
Definition at line 3032 of file CGOpenMPRuntime.cpp.
Referenced by getAddrOfDeclareTargetVar(), clang::CodeGen::CGOpenMPRuntime::getCriticalRegionLock(), getOrCreateThreadPrivateCache(), registerTargetFirstprivateCopy(), and registerTargetGlobalVariable().
llvm::Constant * CGOpenMPRuntime::getOrCreateThreadPrivateCache | ( | const VarDecl * | VD | ) |
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.
VD | Threadprivate variable. |
Definition at line 2587 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CGOpenMPRuntime::CGM, createRuntimeFunction(), clang::CodeGen::CodeGenFunction::EmitRuntimeCall(), clang::CodeGen::CGOpenMPRuntime::emitUpdateLocation(), getAddrOfThreadPrivate(), clang::CodeGen::Address::getAlignment(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::Address::getElementType(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::CodeGen::CodeGenModule::getMangledName(), getName(), getOrCreateInternalVariable(), clang::CodeGen::Address::getPointer(), clang::CodeGen::CodeGenModule::getSize(), clang::ASTContext::getTargetInfo(), clang::CodeGen::CodeGenModule::GetTargetTypeStoreSize(), clang::CodeGen::CGOpenMPRuntime::getThreadID(), clang::CodeGen::CodeGenTypeCache::Int8PtrPtrTy, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::TargetInfo::isTLSSupported(), OMPRTL__kmpc_threadprivate_cached, and Type.
|
virtual |
Gets the address of the native argument basing on the address of the target-specific parameter.
NativeParam | Parameter itself. |
TargetParam | Corresponding target-specific parameter. |
Referenced by clang::CodeGen::CGOpenMPRuntime::emitCall(), and translateParameter().
|
static |
Checks if the Body
is the CompoundStmt and returns its child statement iff there is only one that is not evaluatable at the compile time.
Definition at line 6570 of file CGOpenMPRuntime.cpp.
References clang::Stmt::IgnoreContainers(), and isTrivial().
Referenced by emitNumTeamsForTargetDirective(), emitNumThreadsForTargetDirective(), getNestedDistributeDirective(), getNumThreads(), hasNestedLightweightDirective(), hasNestedSPMDDirective(), and ~CGOpenMPRuntime().
|
virtual |
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. |
Referenced by emitReduceFiniFunction().
QualType CGOpenMPRuntime::getTgtBinaryDescriptorQTy | ( | ) |
Returns __tgt_bin_desc type.
Definition at line 4378 of file CGOpenMPRuntime.cpp.
References addFieldToRecordDecl(), clang::ASTContext::buildImplicitRecord(), clang::CodeGen::CGOpenMPRuntime::CGM, clang::RecordDecl::completeDefinition(), clang::CodeGen::CodeGenModule::getContext(), clang::ASTContext::getIntTypeForBitwidth(), clang::ASTContext::getPointerType(), clang::ASTContext::getRecordType(), getTgtDeviceImageQTy(), getTgtOffloadEntryQTy(), clang::QualType::isNull(), clang::TagDecl::startDefinition(), and TgtBinaryDescriptorQTy.
Referenced by createRuntimeFunction().
QualType CGOpenMPRuntime::getTgtDeviceImageQTy | ( | ) |
Returns __tgt_device_image type.
Definition at line 4352 of file CGOpenMPRuntime.cpp.
References addFieldToRecordDecl(), clang::ASTContext::buildImplicitRecord(), clang::CodeGen::CGOpenMPRuntime::CGM, clang::RecordDecl::completeDefinition(), clang::CodeGen::CodeGenModule::getContext(), clang::ASTContext::getPointerType(), clang::ASTContext::getRecordType(), getTgtOffloadEntryQTy(), clang::QualType::isNull(), clang::TagDecl::startDefinition(), TgtDeviceImageQTy, and clang::ASTContext::VoidPtrTy.
Referenced by createOffloadingBinaryDescriptorRegistration(), and getTgtBinaryDescriptorQTy().
QualType CGOpenMPRuntime::getTgtOffloadEntryQTy | ( | ) |
Returns __tgt_offload_entry type.
Definition at line 4323 of file CGOpenMPRuntime.cpp.
References clang::Decl::addAttr(), addFieldToRecordDecl(), clang::ASTContext::buildImplicitRecord(), clang::CodeGen::CGOpenMPRuntime::CGM, clang::ASTContext::CharTy, clang::RecordDecl::completeDefinition(), clang::CodeGen::CodeGenModule::getContext(), clang::ASTContext::getIntTypeForBitwidth(), clang::ASTContext::getPointerType(), clang::ASTContext::getRecordType(), clang::ASTContext::getSizeType(), clang::QualType::isNull(), clang::TagDecl::startDefinition(), TgtOffloadEntryQTy, and clang::ASTContext::VoidPtrTy.
Referenced by clang::CodeGen::CGOpenMPRuntime::createOffloadEntry(), createOffloadingBinaryDescriptorRegistration(), getTgtBinaryDescriptorQTy(), and getTgtDeviceImageQTy().
|
virtual |
Get combiner/initializer for the specified user-defined reduction, if any.
Definition at line 1372 of file CGOpenMPRuntime.cpp.
References emitUserDefinedReduction().
Referenced by ~CGOpenMPRuntime().
|
virtual |
Checks if the variable has associated OMPAllocateDeclAttr attribute with the predefined allocator and translates it into the corresponding address space.
Referenced by emitDeferredTargetDecls().
bool CGOpenMPRuntime::hasRequiresUnifiedSharedMemory | ( | ) | const |
Return whether the unified_shared_memory has been specified.
Definition at line 9357 of file CGOpenMPRuntime.cpp.
References HasRequiresUnifiedSharedMemory.
llvm::Constant * clang::CodeGen::initializationPatternFor | ( | CodeGenModule & | CGM, |
llvm::Type * | Ty | ||
) |
Definition at line 14 of file PatternInit.cpp.
References clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenModule::getLLVMContext(), clang::TargetInfo::getMaxPointerWidth(), clang::TargetInfo::getPointerWidth(), and clang::ASTContext::getTargetInfo().
Referenced by emitStoresForPatternInit(), initializeAlloca(), clang::CodeGen::CodeGenFunction::isTrivialInitializer(), and patternOrZeroFor().
|
virtual |
Check if the specified ScheduleKind is dynamic.
This kind of worksharing directive is emitted without outer loop.
ScheduleKind | Schedule Kind specified in the 'schedule' clause. |
Definition at line 3468 of file CGOpenMPRuntime.cpp.
References getRuntimeSchedule(), OMP_sch_static, and OMP_sch_static_chunked.
Referenced by ~CGOpenMPRuntime().
|
virtual |
Check if the specified ScheduleKind is static chunked.
ScheduleKind | Schedule kind specified in the 'schedule' clause. |
Chunked | True if chunk is specified in the clause. |
Definition at line 3455 of file CGOpenMPRuntime.cpp.
References getRuntimeSchedule(), and OMP_sch_static_chunked.
|
virtual |
Check if the specified ScheduleKind is static non-chunked.
ScheduleKind | Schedule kind specified in the 'dist_schedule' clause. |
Chunked | True if chunk is specified in the clause. |
Definition at line 3462 of file CGOpenMPRuntime.cpp.
References getRuntimeSchedule(), and OMP_dist_sch_static_chunked.
Referenced by ~CGOpenMPRuntime().
|
virtual |
Check if the specified ScheduleKind is static non-chunked.
This kind of worksharing directive is emitted without outer loop.
ScheduleKind | Schedule kind specified in the 'schedule' clause. |
Chunked | True if chunk is specified in the clause. |
Definition at line 3442 of file CGOpenMPRuntime.cpp.
References getRuntimeSchedule(), and OMP_sch_static.
|
virtual |
Check if the specified ScheduleKind is static non-chunked.
This kind of distribute directive is emitted without outer loop.
ScheduleKind | Schedule kind specified in the 'dist_schedule' clause. |
Chunked | True if chunk is specified in the clause. |
Definition at line 3449 of file CGOpenMPRuntime.cpp.
References getRuntimeSchedule(), and OMP_dist_sch_static.
Referenced by ~CGOpenMPRuntime().
void CGOpenMPRuntime::loadOffloadInfoMetadata | ( | ) |
Loads all the offload entries information from the host IR metadata.
Definition at line 4244 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CGOpenMPRuntime::CGM, clang::DiagnosticsEngine::Error, clang::DiagnosticsEngine::getCustomDiagID(), clang::CodeGen::CodeGenModule::getDiags(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::CodeGen::OffloadEntriesInfoManagerTy::initializeDeviceGlobalVarEntryInfo(), clang::CodeGen::OffloadEntriesInfoManagerTy::initializeTargetRegionEntryInfo(), OffloadEntriesInfoManager, clang::CodeGen::OffloadEntriesInfoManagerTy::OffloadEntryInfo::OffloadingEntryInfoDeviceGlobalVar, clang::CodeGen::OffloadEntriesInfoManagerTy::OffloadEntryInfo::OffloadingEntryInfoTargetRegion, clang::LangOptions::OMPHostIRFile, and clang::DiagnosticsEngine::Report().
Referenced by clang::CodeGen::CGOpenMPRuntime::CGOpenMPRuntime().
bool CGOpenMPRuntime::markAsGlobalTarget | ( | GlobalDecl | GD | ) |
Marks the declaration as already emitted for the device code and returns true, if it was marked already, and false, otherwise.
Definition at line 9375 of file CGOpenMPRuntime.cpp.
References AlreadyEmittedTargetFunctions, clang::GlobalDecl::getDecl(), clang::CodeGen::CodeGenModule::GetGlobalValue(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::CodeGen::CodeGenModule::getMangledName(), clang::Decl::hasBody(), and ShouldMarkAsGlobal.
|
inline |
Definition at line 90 of file CGBlocks.h.
|
inline |
Definition at line 138 of file CGBlocks.h.
llvm::Constant * CGOpenMPRuntime::registerTargetFirstprivateCopy | ( | CodeGenFunction & | CGF, |
const VarDecl * | VD | ||
) |
Registers provided target firstprivate variable as global on the target.
Definition at line 9189 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenModule::addCompilerUsedGlobal(), clang::CodeGen::CGOpenMPRuntime::CGM, clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), clang::CodeGen::CodeGenModule::getContext(), getDefaultFirstprivateAddressSpace(), clang::Decl::getLocation(), clang::NamedDecl::getName(), getOrCreateInternalVariable(), getTargetEntryUniqueInfo(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::ASTContext::getTypeSizeInChars(), clang::InternalLinkage, clang::QualType::isConstant(), Line, OffloadEntriesInfoManager, clang::CodeGen::OffloadEntriesInfoManagerTy::OMPTargetGlobalVarEntryTo, and clang::CodeGen::OffloadEntriesInfoManagerTy::registerDeviceGlobalVarEntryInfo().
|
virtual |
Checks if the provided global decl GD is a declare target variable and registers it when emitting code for the host.
Definition at line 9222 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenModule::addCompilerUsedGlobal(), clang::CodeGen::CGOpenMPRuntime::CGM, clang::VarDecl::DeclarationOnly, emitTargetFunctions(), emitTargetGlobal(), emitTargetGlobalVariable(), EmittedNonTargetVariables, getAddrOfDeclareTargetVar(), clang::CodeGen::CodeGenModule::getContext(), clang::GlobalDecl::getDecl(), clang::CodeGen::CodeGenModule::GetGlobalValue(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::CodeGen::CodeGenModule::getLLVMLinkageVarDefinition(), clang::CodeGen::CodeGenModule::getMangledName(), clang::CodeGen::Address::getName(), getName(), getOrCreateInternalVariable(), clang::CodeGen::Address::getPointer(), clang::CodeGen::CodeGenTypeCache::getPointerSize(), clang::ValueDecl::getType(), clang::ASTContext::getTypeSizeInChars(), clang::VarDecl::hasDefinition(), HasRequiresUnifiedSharedMemory, clang::InternalLinkage, clang::NamedDecl::isExternallyVisible(), clang::CharUnits::isZero(), OffloadEntriesInfoManager, clang::CodeGen::OffloadEntriesInfoManagerTy::OMPTargetGlobalVarEntryLink, clang::CodeGen::OffloadEntriesInfoManagerTy::OMPTargetGlobalVarEntryTo, clang::CodeGen::OffloadEntriesInfoManagerTy::registerDeviceGlobalVarEntryInfo(), and clang::CharUnits::Zero().
Referenced by getAddrOfDeclareTargetVar().
void CGOpenMPRuntime::scanForTargetRegionsFunctions | ( | const Stmt * | S, |
StringRef | ParentName | ||
) |
Start scanning from statement S and and emit all target regions found along the way.
S | Starting statement. |
ParentName | Name of the function declaration that is being scanned. |
Definition at line 8999 of file CGOpenMPRuntime.cpp.
|
virtual |
Translates the native parameter of outlined function if this is required for target.
FD | Field decl from captured record for the parameter. |
NativeParam | Parameter itself. |
Definition at line 1565 of file CGOpenMPRuntime.h.
References getParameterAddress().
|
virtual |
Definition at line 783 of file CGOpenMPRuntime.h.
References clear(), emitBarrierCall(), emitCriticalRegion(), emitMasterRegion(), emitOrderedRegion(), emitParallelCall(), emitParallelOutlinedFunction(), emitSingleRegion(), emitTaskgroupRegion(), emitTaskOutlinedFunction(), emitTaskyieldCall(), emitTeamsOutlinedFunction(), emitUserDefinedReduction(), functionFinished(), getName(), getSingleCompoundChild(), getUserDefinedReduction(), isDynamic(), isStaticChunked(), and isStaticNonchunked().
llvm::StringSet clang::CodeGen::AlreadyEmittedTargetFunctions |
List of the emitted functions.
Definition at line 630 of file CGOpenMPRuntime.h.
Referenced by markAsGlobalTarget().
llvm::StringSet clang::CodeGen::DeclareTargetWithDefinition |
Set of declare target variables with the generated initializer.
Definition at line 729 of file CGOpenMPRuntime.h.
Referenced by emitDeclareTargetVarDefinition().
llvm::SmallDenseSet<const VarDecl *> clang::CodeGen::DeferredGlobalVariables |
List of variables that can become declare target implicitly and, thus, must be emitted.
Definition at line 637 of file CGOpenMPRuntime.h.
Referenced by emitDeferredTargetDecls().
llvm::StringMap<llvm::WeakTrackingVH> clang::CodeGen::EmittedNonTargetVariables |
List of the global variables with their addresses that should not be emitted for the target.
Definition at line 633 of file CGOpenMPRuntime.h.
Referenced by clang::CodeGen::CGOpenMPRuntime::CGOpenMPRuntime(), and registerTargetGlobalVariable().
Flag for keeping track of weather a device routine has been emitted.
Device routines are specific to the
Definition at line 648 of file CGOpenMPRuntime.h.
Referenced by clang::CodeGen::CGOpenMPRuntime::emitCall(), and emitRequiresDirectiveRegFun().
Flag for keeping track of weather a target region has been emitted.
Definition at line 644 of file CGOpenMPRuntime.h.
Referenced by emitRequiresDirectiveRegFun().
Flag for keeping track of weather a requires unified_shared_memory directive is present.
Definition at line 641 of file CGOpenMPRuntime.h.
Referenced by emitDeclareTargetVarDefinition(), emitDeferredTargetDecls(), emitRequiresDirectiveRegFun(), getAddrOfDeclareTargetVar(), hasRequiresUnifiedSharedMemory(), and registerTargetGlobalVariable().
class clang::CodeGen::CGOpenMPRuntime clang::CodeGen::kmp_task_t |
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;.
Definition at line 383 of file CGOpenMPRuntime.h.
Referenced by emitTaskInit().
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 };
Definition at line 389 of file CGOpenMPRuntime.h.
Referenced by emitDeclareSimdFunction().
* QualType clang::CodeGen::KmpTaskTQTy |
Definition at line 370 of file CGOpenMPRuntime.h.
Referenced by emitTaskInit().
OffloadEntriesInfoManagerTy clang::CodeGen::OffloadEntriesInfoManager |
Definition at line 626 of file CGOpenMPRuntime.h.
Referenced by createOffloadEntriesAndInfoMetadata(), createOffloadingBinaryDescriptorRegistration(), emitDeclareTargetVarDefinition(), emitRequiresDirectiveRegFun(), loadOffloadInfoMetadata(), registerTargetFirstprivateCopy(), and registerTargetGlobalVariable().
QualType clang::CodeGen::SavedKmpTaskloopTQTy |
Saved kmp_task_t for taskloop-based directive.
Definition at line 374 of file CGOpenMPRuntime.h.
Referenced by emitTaskInit().
QualType clang::CodeGen::SavedKmpTaskTQTy |
Saved kmp_task_t for task directive.
Definition at line 372 of file CGOpenMPRuntime.h.
Referenced by emitTaskInit().
Definition at line 628 of file CGOpenMPRuntime.h.
Referenced by markAsGlobalTarget().
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 |
Definition at line 1179 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::CodeGen::state |
Definition at line 764 of file CGOpenMPRuntime.h.
Referenced by addValue(), clang::ento::ProgramStateManager::ArrayToPointer(), clang::ento::retaincountchecker::RetainCountChecker::checkBeginFunction(), clang::ento::retaincountchecker::RetainCountChecker::checkBind(), clang::ento::retaincountchecker::RetainCountChecker::checkDeadSymbols(), clang::ento::retaincountchecker::RetainCountChecker::checkEndFunction(), clang::ento::retaincountchecker::RetainCountChecker::checkPostStmt(), clang::ento::retaincountchecker::RetainCountChecker::checkRegionChanges(), clang::ento::retaincountchecker::RetainCountChecker::checkSummary(), clang::ento::ProgramState::contains(), clang::ento::ExprEngine::CreateCXXTemporaryObject(), diagnoseDynamicExceptionSpecification(), clang::CodeGen::ConstantEmitter::emitAbstract(), clang::ento::retaincountchecker::RetainCountChecker::evalAssume(), clang::ento::ExprEngine::evalBind(), evalBinOpFieldRegionFieldRegion(), clang::ento::retaincountchecker::RetainCountChecker::evalCall(), clang::ento::ExprEngine::evalLoad(), evenFlexibleArraySize(), GetCFNumberSize(), clang::ento::ExprEngine::getGraph(), clang::ento::EnvironmentManager::getInitialEnvironment(), clang::ento::ExprEngine::getInitialState(), getNonNullAttrs(), getReturnTypeForMethod(), getSelfFlags(), getSimplifiedOffsets(), clang::Sema::GetTypeForDeclarator(), clang::Sema::GetTypeForDeclaratorCast(), clang::Sema::GetTypeFromParser(), clang::ento::retaincountchecker::RetainCountChecker::handleAutoreleaseCounts(), clang::ento::ExprEngine::handleLValueBitCast(), clang::ento::ExprEngine::handleLVectorSplat(), clang::ento::ExprEngine::handleUOExtension(), clang::ento::SValBuilder::haveSameType(), isArrayIndexOutOfBounds(), clang::ento::ExplodedGraph::isInterestingLValueExpr(), isInvalidSelf(), isReferenceCountingPointerDestructor(), LazyInitialize(), clang::ento::retaincountchecker::RefVal::print(), clang::ento::ExprEngine::ProcessAutomaticObjDtor(), clang::ento::ExprEngine::processCallEnter(), clang::ento::ExprEngine::processCallExit(), clang::ento::ExprEngine::processIndirectGoto(), clang::ento::retaincountchecker::RetainCountChecker::processObjCLiterals(), clang::ento::retaincountchecker::RetainCountChecker::processSummaryOfInlined(), clang::ento::ExprEngine::processSwitch(), clang::ento::ProgramStateRelease(), clang::ento::ProgramStateRetain(), clang::Sema::DelayedDiagnostics::push(), clang::Sema::PushParsingDeclaration(), clang::Sema::DelayedDiagnostics::pushUndelayed(), REGISTER_TRAIT_WITH_PROGRAMSTATE(), clang::ento::ProgramStateManager::removeDeadBindings(), clang::ento::ProgramStateManager::removeGDM(), clang::ento::CheckerManager::runCheckersForEvalAssume(), clang::ento::CheckerManager::runCheckersForPostCall(), clang::ento::CheckerManager::runCheckersForRegionChanges(), clang::ento::ScanReachableSymbols::scan(), supportsNilWithFloatRet(), clang::CodeGen::ConstantEmitter::tryEmitAbstract(), clang::CodeGen::ConstantEmitter::tryEmitAbstractForInitializer(), tryRearrange(), clang::ento::retaincountchecker::RetainCountChecker::updateSymbol(), clang::ento::ExprEngine::Visit(), clang::ento::ExprEngine::VisitArraySubscriptExpr(), clang::ento::ExprEngine::VisitBinaryOperator(), clang::ento::ExprEngine::VisitCast(), clang::ento::ExprEngine::VisitCommonDeclRefExpr(), clang::ento::ExprEngine::VisitCXXCatchStmt(), clang::ento::ExprEngine::VisitCXXDeleteExpr(), clang::ento::ExprEngine::VisitCXXThisExpr(), clang::ento::ExprEngine::VisitDeclStmt(), clang::ento::ExprEngine::VisitGuardedExpr(), clang::ento::ExprEngine::VisitIncrementDecrementOperator(), clang::ento::ExprEngine::VisitInitListExpr(), clang::ento::ExprEngine::VisitLogicalExpr(), clang::ento::ExprEngine::VisitLvalObjCIvarRefExpr(), clang::ento::ExprEngine::VisitMemberExpr(), clang::ento::ExprEngine::VisitUnaryExprOrTypeTraitExpr(), clang::ento::ExprEngine::VisitUnaryOperator(), and clang::ento::SubEngine::~SubEngine().
QualType clang::CodeGen::TgtBinaryDescriptorQTy |
struct __tgt_bin_desc{ int32_t NumDevices; // Number of devices supported.
__tgt_device_image *DeviceImages; // Arrays of device images // (one per device). __tgt_offload_entry *EntriesBegin; // Begin of the table with all the // entries. __tgt_offload_entry *EntriesEnd; // End of the table with all the // entries (non inclusive). };
Definition at line 417 of file CGOpenMPRuntime.h.
Referenced by getTgtBinaryDescriptorQTy().
QualType clang::CodeGen::TgtDeviceImageQTy |
struct __tgt_device_image{ void *ImageStart; // Pointer to the target code start.
void *ImageEnd; // Pointer to the target code end. // We also add the host entries to the device image, as it may be useful // for the target runtime to have access to that information. __tgt_offload_entry *EntriesBegin; // Begin of the table with all // the entries. __tgt_offload_entry *EntriesEnd; // End of the table with all the // entries (non inclusive). };
Definition at line 407 of file CGOpenMPRuntime.h.
Referenced by getTgtDeviceImageQTy().
QualType clang::CodeGen::TgtOffloadEntryQTy |
Type struct __tgt_offload_entry{ void *addr; // Pointer to the offload entry info.
// (function or global) char *name; // Name of the function or global. size_t size; // Size of the entry info (0 if it a function). };
Definition at line 396 of file CGOpenMPRuntime.h.
Referenced by getTgtOffloadEntryQTy().
llvm::StringSet clang::CodeGen::ThreadPrivateWithDefinition |
Set of threadprivate variables with the generated initializer.
Definition at line 726 of file CGOpenMPRuntime.h.
Referenced by emitThreadPrivateVarInit().
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::CodeGen::tiednsee |
Definition at line 764 of file CGOpenMPRuntime.h.
clang::CodeGen::true |
A convenience builder class for complex constant initializers, especially for anonymous global structures used by various language runtimes.
The basic usage pattern is expected to be something like: ConstantInitBuilder builder(CGM); auto toplevel = builder.beginStruct(); toplevel.addInt(CGM.SizeTy, widgets.size()); auto widgetArray = builder.beginArray(); for (auto &widget : widgets) { auto widgetDesc = widgetArray.beginStruct(); widgetDesc.addInt(CGM.SizeTy, widget.getPower()); widgetDesc.add(CGM.GetAddrOfConstantString(widget.getName())); widgetDesc.add(CGM.GetAddrOfGlobal(widget.getInitializerDecl())); widgetDesc.finishAndAddTo(widgetArray); } widgetArray.finishAndAddTo(toplevel); auto global = toplevel.finishAndCreateGlobal("WIDGET_LIST", Align, /*constant
Definition at line 30 of file ConstantInitBuilder.h.