clang API Documentation
Classes | |
class | ABIArgInfo |
class | RequiredArgs |
class | CGFunctionInfo |
class | CodeGenABITypes |
class | BlockFlags |
class | BlockFieldFlags |
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... | |
struct | CallArg |
class | CallArgList |
class | FunctionArgList |
class | ReturnValueSlot |
class | EHScope |
A protected scope for zero-cost EH handling. More... | |
class | EHCatchScope |
class | EHCleanupScope |
A cleanup scope which generates the cleanup blocks lazily. More... | |
class | EHFilterScope |
class | EHTerminateScope |
class | CGCUDARuntime |
class | CGCXXABI |
Implements C++ ABI-specific code generation functions. More... | |
class | CGDebugInfo |
class | SaveAndRestoreLocation |
class | NoLocation |
class | ArtificialLocation |
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. This stack can be used to prepare attributes which are applied when a loop is emitted. More... | |
class | CGObjCRuntime |
Implements runtime-specific code generation functions. More... | |
class | CGOpenCLRuntime |
class | CGOpenMPRuntime |
struct | DebugLocThreadIdTy |
Stores debug location and ThreadID for the function. More... | |
struct | CGBitFieldInfo |
Structure with information about how a bitfield should be accessed. More... | |
class | CGRecordLayout |
class | RValue |
class | LValue |
class | AggValueSlot |
An aggregate value slot. More... | |
class | CodeGenVTables |
class | SuppressDebugLocation |
class | CodeGenFunction |
struct | DominatingLLVMValue |
struct | DominatingPointer< T, true > |
struct | DominatingValue< RValue > |
A specialization of DominatingValue for RValue. More... | |
struct | OrderGlobalInits |
struct | CodeGenTypeCache |
struct | RREntrypoints |
struct | ARCEntrypoints |
class | InstrProfStats |
This class records statistics on instrumentation based profiling. More... | |
class | CodeGenModule |
class | CodeGenPGO |
class | RegionCounter |
struct | TBAAPathTag |
class | CodeGenTBAA |
class | CodeGenTypes |
class | CoverageMappingModuleGen |
Organizes the cross-function state that is used while generating code coverage mapping data. More... | |
class | CoverageMappingGen |
Organizes the per-function state that is used while generating code coverage mapping data. More... | |
struct | BranchFixup |
struct | InvariantValue |
struct | DominatingValue |
struct | DominatingPointer< T, false > |
struct | DominatingValue< T * > |
class | EHScopeStack |
class | SanitizerMetadata |
Typedefs | |
typedef CGBuilderInserter < PreserveNames > | CGBuilderInserterTy |
typedef llvm::IRBuilder < PreserveNames, llvm::ConstantFolder, CGBuilderInserterTy > | CGBuilderTy |
typedef SmallVector < llvm::AttributeSet, 8 > | AttributeListType |
typedef llvm::DenseMap < unsigned, llvm::Value * > | OpenMPDebugLocMapTy |
Map for SourceLocation and OpenMP runtime library debug locations. | |
typedef llvm::DenseMap < llvm::Function *, DebugLocThreadIdTy > | OpenMPLocThreadIDMapTy |
Map of local debug location, ThreadId and functions. | |
Enumerations | |
enum | BlockByrefFlags { BLOCK_BYREF_HAS_COPY_DISPOSE = (1 << 25), BLOCK_BYREF_LAYOUT_MASK = (0xF << 28), BLOCK_BYREF_LAYOUT_EXTENDED = (1 << 28), BLOCK_BYREF_LAYOUT_NON_OBJECT = (2 << 28), BLOCK_BYREF_LAYOUT_STRONG = (3 << 28), BLOCK_BYREF_LAYOUT_WEAK = (4 << 28), BLOCK_BYREF_LAYOUT_UNRETAINED = (5 << 28) } |
enum | BlockLiteralFlags { BLOCK_HAS_COPY_DISPOSE = (1 << 25), BLOCK_HAS_CXX_OBJ = (1 << 26), BLOCK_IS_GLOBAL = (1 << 28), BLOCK_USE_STRET = (1 << 29), BLOCK_HAS_SIGNATURE = (1 << 30), BLOCK_HAS_EXTENDED_LAYOUT = (1 << 31) } |
enum | BlockFieldFlag_t { BLOCK_FIELD_IS_OBJECT = 0x03, BLOCK_FIELD_IS_BLOCK = 0x07, BLOCK_FIELD_IS_BYREF = 0x08, BLOCK_FIELD_IS_WEAK = 0x10, BLOCK_FIELD_IS_ARC = 0x40, BLOCK_BYREF_CALLER = 128, BLOCK_BYREF_CURRENT_MAX = 256 } |
enum | IdentFieldIndex { IdentField_Reserved_1, IdentField_Flags, IdentField_Reserved_2, IdentField_Reserved_3, IdentField_PSource } |
enum | ARCPreciseLifetime_t { ARCImpreciseLifetime, ARCPreciseLifetime } |
Does an ARC strong l-value have precise lifetime? More... | |
enum | TypeEvaluationKind { TEK_Scalar, TEK_Complex, TEK_Aggregate } |
enum | StructorType { Complete, Base, Deleting } |
enum | CleanupKind { EHCleanup = 0x1, NormalCleanup = 0x2, NormalAndEHCleanup = EHCleanup | NormalCleanup, InactiveCleanup = 0x4, InactiveEHCleanup = EHCleanup | InactiveCleanup, InactiveNormalCleanup = NormalCleanup | InactiveCleanup, InactiveNormalAndEHCleanup = NormalAndEHCleanup | InactiveCleanup } |
Functions | |
BlockFlags | operator| (BlockLiteralFlags l, BlockLiteralFlags r) |
BlockFieldFlags | operator| (BlockFieldFlag_t l, BlockFieldFlag_t r) |
CGCUDARuntime * | CreateNVCUDARuntime (CodeGenModule &CGM) |
Creates an instance of a CUDA runtime class. | |
CGCXXABI * | CreateItaniumCXXABI (CodeGenModule &CGM) |
Creates an Itanium-family ABI. | |
CGCXXABI * | CreateMicrosoftCXXABI (CodeGenModule &CGM) |
Creates a Microsoft-family ABI. | |
CGObjCRuntime * | CreateGNUObjCRuntime (CodeGenModule &CGM) |
Creates an instance of an Objective-C runtime class. | |
CGObjCRuntime * | CreateMacObjCRuntime (CodeGenModule &CGM) |
llvm::Value * | EmitOpenMPUpdateLocation (CodeGenFunction &CGF, SourceLocation Loc, OpenMPLocationFlags Flags=OMP_IDENT_KMPC) |
Emits object of ident_t type with info for source location. | |
llvm::Type * | getIdentTyPointerTy () |
Returns pointer to ident_t type. | |
llvm::Type * | getKmpc_MicroPointerTy () |
Returns pointer to kmpc_micro type. | |
llvm::Constant * | CreateRuntimeFunction (OpenMPRTLFunction Function) |
Returns specified OpenMP runtime function. | |
llvm::Constant * | 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. | |
virtual llvm::Value * | EmitThreadIDAddress (CodeGenFunction &CGF, SourceLocation Loc) |
Emits address of the word in a memory where current thread id is stored. | |
llvm::Value * | GetOpenMPThreadID (CodeGenFunction &CGF, SourceLocation Loc) |
Gets thread id value for the current thread. | |
llvm::Constant * | GetOrCreateInternalVariable (llvm::Type *Ty, const llvm::Twine &Name) |
Gets (if variable with the given name already exist) or creates internal global variable with the specified Name. The created variable has linkage CommonLinkage by default and is initialized by null value. | |
void | EmitOMPThreadPrivateVarInit (CodeGenFunction &CGF, llvm::Value *VDAddr, llvm::Value *Ctor, llvm::Value *CopyCtor, llvm::Value *Dtor, SourceLocation Loc) |
Emits initialization code for the threadprivate variables. | |
CGOpenMPRuntime (CodeGenModule &CGM) | |
virtual | ~CGOpenMPRuntime () |
struct context_vars *param D OpenMP directive param ThreadIDVar Variable for thread id in the current OpenMP region *virtual llvm::Value * | EmitOpenMPOutlinedFunction (const OMPExecutableDirective &D, const VarDecl *ThreadIDVar) |
void | FunctionFinished (CodeGenFunction &CGF) |
Cleans up references to the objects in finished function. | |
virtual void | EmitOMPParallelCall (CodeGenFunction &CGF, SourceLocation Loc, llvm::Value *OutlinedFn, llvm::Value *CapturedStruct) |
Emits code for parallel call of the OutlinedFn with variables captured in a record which address is stored in CapturedStruct. | |
virtual void | EmitOMPSerialCall (CodeGenFunction &CGF, SourceLocation Loc, llvm::Value *OutlinedFn, llvm::Value *CapturedStruct) |
Emits code for serial call of the OutlinedFn with variables captured in a record which address is stored in CapturedStruct. | |
llvm::Value * | GetCriticalRegionLock (StringRef CriticalName) |
Returns corresponding lock object for the specified critical region name. If the lock object does not exist it is created, otherwise the reference to the existing copy is returned. | |
virtual void | EmitOMPCriticalRegionStart (CodeGenFunction &CGF, llvm::Value *RegionLock, SourceLocation Loc) |
Emits start of the critical region by calling void __kmpc_critical(ident_t *loc, kmp_int32 global_tid, kmp_critical_name RegionLock) | |
virtual void | EmitOMPCriticalRegionEnd (CodeGenFunction &CGF, llvm::Value *RegionLock, SourceLocation Loc) |
Emits end of the critical region by calling void __kmpc_end_critical(ident_t *loc, kmp_int32 global_tid, kmp_critical_name RegionLock) | |
virtual void | EmitOMPBarrierCall (CodeGenFunction &CGF, SourceLocation Loc, OpenMPLocationFlags Flags) |
Emits a barrier for OpenMP threads. | |
virtual void | EmitOMPNumThreadsClause (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. | |
virtual llvm::Value * | getOMPAddrOfThreadPrivate (CodeGenFunction &CGF, const VarDecl *VD, llvm::Value *VDAddr, SourceLocation Loc) |
Returns address of the threadprivate variable for the current thread. | |
virtual llvm::Function * | EmitOMPThreadPrivateVarDefinition (const VarDecl *VD, llvm::Value *VDAddr, SourceLocation Loc, bool PerformInit, CodeGenFunction *CGF=nullptr) |
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). | |
CXXCtorType | toCXXCtorType (StructorType T) |
StructorType | getFromCtorType (CXXCtorType T) |
CXXDtorType | toCXXDtorType (StructorType T) |
StructorType | getFromDtorType (CXXDtorType T) |
Variables | |
class clang::CodeGen::CGOpenMPRuntime | ident_t |
llvm::StructType * | IdentTy |
OpenMPDebugLocMapTy | OpenMPDebugLocMap |
llvm::FunctionType * | Kmpc_MicroTy |
The type for a microtask which gets passed to __kmpc_fork_call(). Original representation is: typedef void (kmpc_micro)(kmp_int32 global_tid, kmp_int32 bound_tid,...);. | |
OpenMPLocThreadIDMapTy | OpenMPLocThreadIDMap |
llvm::ArrayType * | KmpCriticalNameTy |
Type kmp_critical_name, originally defined as typedef kmp_int32 kmp_critical_name[8];. | |
llvm::StringMap < llvm::AssertingVH < llvm::Constant > , llvm::BumpPtrAllocator > | InternalVars |
An ordered map of auto-generated variables to their unique names. It stores variables with the following names: 1) ".gomp_critical_user_" + <critical_section_name> + ".var" for "omp critical" directives; 2) <mangled_name_for_global_var> + ".cache." for cache for threadprivate variables. | |
llvm::DenseSet< const VarDecl * > | ThreadPrivateWithDefinition |
Set of threadprivate variables with the generated initializer. | |
kmp_int32 |
typedef SmallVector<llvm::AttributeSet, 8> clang::CodeGen::AttributeListType |
Definition at line 47 of file CGBuilder.h.
typedef llvm::IRBuilder<PreserveNames, llvm::ConstantFolder, CGBuilderInserterTy> clang::CodeGen::CGBuilderTy |
Definition at line 49 of file CGBuilder.h.
typedef llvm::DenseMap<unsigned, llvm::Value *> clang::CodeGen::OpenMPDebugLocMapTy |
Map for SourceLocation and OpenMP runtime library debug locations.
Definition at line 150 of file CGOpenMPRuntime.h.
typedef llvm::DenseMap<llvm::Function *, DebugLocThreadIdTy> clang::CodeGen::OpenMPLocThreadIDMapTy |
Map of local debug location, ThreadId and functions.
Definition at line 163 of file CGOpenMPRuntime.h.
BLOCK_BYREF_HAS_COPY_DISPOSE | |
BLOCK_BYREF_LAYOUT_MASK | |
BLOCK_BYREF_LAYOUT_EXTENDED | |
BLOCK_BYREF_LAYOUT_NON_OBJECT | |
BLOCK_BYREF_LAYOUT_STRONG | |
BLOCK_BYREF_LAYOUT_WEAK | |
BLOCK_BYREF_LAYOUT_UNRETAINED |
Definition at line 50 of file CGBlocks.h.
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 98 of file CGBlocks.h.
BLOCK_HAS_COPY_DISPOSE | |
BLOCK_HAS_CXX_OBJ | |
BLOCK_IS_GLOBAL | |
BLOCK_USE_STRET | |
BLOCK_HAS_SIGNATURE | |
BLOCK_HAS_EXTENDED_LAYOUT |
Definition at line 60 of file CGBlocks.h.
EHCleanup | |
NormalCleanup | |
NormalAndEHCleanup | |
InactiveCleanup | |
InactiveEHCleanup | |
InactiveNormalCleanup | |
InactiveNormalAndEHCleanup |
Definition at line 77 of file EHScopeStack.h.
Definition at line 134 of file CGOpenMPRuntime.h.
Definition at line 59 of file CodeGenTypes.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?
Definition at line 90 of file CodeGenFunction.h.
CGOpenMPRuntime::CGOpenMPRuntime | ( | CodeGenModule & | CGM | ) | [explicit] |
Definition at line 87 of file CGOpenMPRuntime.cpp.
References clang::serialized_diags::create(), IdentTy, clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, Kmpc_MicroTy, KmpCriticalNameTy, and clang::CodeGen::CodeGenTypeCache::VoidTy.
Creates an instance of an Objective-C runtime class.
Definition at line 2835 of file CGObjCGNU.cpp.
References clang::ObjCRuntime::getKind(), clang::CodeGen::CodeGenModule::getLangOpts(), and clang::LangOptions::ObjCRuntime.
Creates an Itanium-family ABI.
Definition at line 322 of file CodeGen/ItaniumCXXABI.cpp.
References clang::TargetCXXABI::GenericAArch64, clang::TargetCXXABI::GenericARM, clang::TargetCXXABI::GenericItanium, 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, and clang::TargetCXXABI::Microsoft.
Referenced by createCXXABI().
CGObjCRuntime* clang::CodeGen::CreateMacObjCRuntime | ( | CodeGenModule & | CGM | ) |
Creates a Microsoft-family ABI.
Definition at line 2619 of file CodeGen/MicrosoftCXXABI.cpp.
Referenced by createCXXABI().
Creates an instance of a CUDA runtime class.
Definition at line 123 of file CGCUDANV.cpp.
llvm::Constant* clang::CodeGen::CreateRuntimeFunction | ( | OpenMPRTLFunction | Function | ) |
Returns specified OpenMP runtime function.
Function | OpenMP runtime function. |
Referenced by EmitOMPBarrierCall(), EmitOMPCriticalRegionEnd(), EmitOMPCriticalRegionStart(), EmitOMPParallelCall(), EmitOMPSerialCall(), EmitOMPThreadPrivateVarInit(), getOMPAddrOfThreadPrivate(), and GetOpenMPThreadID().
void CGOpenMPRuntime::EmitOMPBarrierCall | ( | CodeGenFunction & | CGF, |
SourceLocation | Loc, | ||
OpenMPLocationFlags | Flags | ||
) | [virtual] |
Emits a barrier for OpenMP threads.
Flags | Flags for the barrier. |
Definition at line 634 of file CGOpenMPRuntime.cpp.
References CreateRuntimeFunction(), EmitOpenMPUpdateLocation(), clang::CodeGen::CodeGenFunction::EmitRuntimeCall(), and GetOpenMPThreadID().
void CGOpenMPRuntime::EmitOMPCriticalRegionEnd | ( | CodeGenFunction & | CGF, |
llvm::Value * | RegionLock, | ||
SourceLocation | Loc | ||
) | [virtual] |
Emits end of the critical region by calling void __kmpc_end_critical(ident_t *loc, kmp_int32 global_tid, kmp_critical_name RegionLock)
RegionLock | The lock object for critical region. |
Definition at line 623 of file CGOpenMPRuntime.cpp.
References CreateRuntimeFunction(), EmitOpenMPUpdateLocation(), clang::CodeGen::CodeGenFunction::EmitRuntimeCall(), and GetOpenMPThreadID().
void CGOpenMPRuntime::EmitOMPCriticalRegionStart | ( | CodeGenFunction & | CGF, |
llvm::Value * | RegionLock, | ||
SourceLocation | Loc | ||
) | [virtual] |
Emits start of the critical region by calling void __kmpc_critical(ident_t *loc, kmp_int32 global_tid, kmp_critical_name RegionLock)
RegionLock | The lock object for critical region. |
Definition at line 613 of file CGOpenMPRuntime.cpp.
References CreateRuntimeFunction(), EmitOpenMPUpdateLocation(), clang::CodeGen::CodeGenFunction::EmitRuntimeCall(), and GetOpenMPThreadID().
void CGOpenMPRuntime::EmitOMPNumThreadsClause | ( | CodeGenFunction & | CGF, |
llvm::Value * | NumThreads, | ||
SourceLocation | Loc | ||
) | [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. |
Definition at line 644 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, EmitOpenMPUpdateLocation(), clang::CodeGen::CodeGenFunction::EmitRuntimeCall(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), GetOpenMPThreadID(), and clang::CodeGen::CodeGenTypeCache::Int32Ty.
void CGOpenMPRuntime::EmitOMPParallelCall | ( | CodeGenFunction & | CGF, |
SourceLocation | Loc, | ||
llvm::Value * | OutlinedFn, | ||
llvm::Value * | CapturedStruct | ||
) | [virtual] |
Emits code for parallel 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*). |
CapturedStruct | A pointer to the record with the references to variables used in OutlinedFn function. |
Definition at line 521 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::Builder, CreateRuntimeFunction(), clang::CodeGen::CodeGenFunction::EmitCastToVoidPtr(), EmitOpenMPUpdateLocation(), clang::CodeGen::CodeGenFunction::EmitRuntimeCall(), and getKmpc_MicroPointerTy().
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPParallelDirective().
void CGOpenMPRuntime::EmitOMPSerialCall | ( | CodeGenFunction & | CGF, |
SourceLocation | Loc, | ||
llvm::Value * | OutlinedFn, | ||
llvm::Value * | CapturedStruct | ||
) | [virtual] |
Emits code for serial call of the OutlinedFn with variables captured in a record which address is stored in CapturedStruct.
OutlinedFn | Outlined function to be run in serial mode. |
CapturedStruct | A pointer to the record with the references to variables used in OutlinedFn function. |
Definition at line 536 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CreateMemTemp(), CreateRuntimeFunction(), clang::CodeGen::CodeGenFunction::EmitCallOrInvoke(), EmitOpenMPUpdateLocation(), clang::CodeGen::CodeGenFunction::EmitRuntimeCall(), EmitThreadIDAddress(), clang::CodeGen::CodeGenFunction::getContext(), clang::ASTContext::getIntTypeForBitwidth(), GetOpenMPThreadID(), and clang::CodeGen::CodeGenFunction::InitTempAlloca().
llvm::Function * CGOpenMPRuntime::EmitOMPThreadPrivateVarDefinition | ( | const VarDecl * | VD, |
llvm::Value * | VDAddr, | ||
SourceLocation | Loc, | ||
bool | PerformInit, | ||
CodeGenFunction * | CGF = nullptr |
||
) | [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. |
Definition at line 409 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::ConvertTypeForMem(), clang::QualType::DK_none, clang::CodeGen::CodeGenFunction::EmitAnyExprToMem(), clang::CodeGen::CodeGenFunction::emitDestroy(), clang::CodeGen::CodeGenFunction::EmitLoadOfScalar(), EmitOMPThreadPrivateVarInit(), clang::CodeGen::CodeGenFunction::FinishFunction(), clang::CodeGen::CodeGenFunction::GetAddrOfLocalVar(), clang::VarDecl::getAnyInitializer(), clang::VarDecl::getDefinition(), clang::CodeGen::CodeGenFunction::getDestroyer(), clang::ValueDecl::getType(), clang::QualType::isDestructedType(), clang::CodeGen::CodeGenFunction::needsEHCleanup(), clang::CodeGen::CodeGenFunction::ReturnValue, clang::CodeGen::CodeGenFunction::StartFunction(), and ThreadPrivateWithDefinition.
Referenced by clang::CodeGen::CodeGenModule::EmitOMPThreadPrivateDecl().
void CGOpenMPRuntime::EmitOMPThreadPrivateVarInit | ( | CodeGenFunction & | CGF, |
llvm::Value * | 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 391 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::Builder, CreateRuntimeFunction(), EmitOpenMPUpdateLocation(), and clang::CodeGen::CodeGenFunction::EmitRuntimeCall().
Referenced by EmitOMPThreadPrivateVarDefinition().
llvm::Value * CGOpenMPRuntime::EmitOpenMPOutlinedFunction | ( | const OMPExecutableDirective & | D, |
const VarDecl * | ThreadIDVar | ||
) | [read, virtual] |
Definition at line 101 of file CGOpenMPRuntime.cpp.
References clang::OMPExecutableDirective::getAssociatedStmt().
llvm::Value * CGOpenMPRuntime::EmitOpenMPUpdateLocation | ( | CodeGenFunction & | CGF, |
SourceLocation | Loc, | ||
OpenMPLocationFlags | Flags = OMP_IDENT_KMPC |
||
) |
Emits object of ident_t type with info for source location.
Flags | Flags for OpenMP location. |
Definition at line 141 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::AllocaInsertPt, clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CreateTempAlloca(), clang::CodeGen::CodeGenFunction::CurFn, clang::CodeGen::CodeGenFunction::CurFuncDecl, clang::PresumedLoc::getColumn(), clang::CodeGen::CodeGenFunction::getContext(), clang::PresumedLoc::getFilename(), clang::PresumedLoc::getLine(), clang::SourceManager::getPresumedLoc(), clang::SourceLocation::getRawEncoding(), clang::ASTContext::getSourceManager(), IdentField_PSource, IdentTy, clang::SourceLocation::isInvalid(), clang::CodeGenOptions::NoDebugInfo, OpenMPDebugLocMap, and OpenMPLocThreadIDMap.
Referenced by EmitOMPBarrierCall(), EmitOMPCriticalRegionEnd(), EmitOMPCriticalRegionStart(), EmitOMPNumThreadsClause(), EmitOMPParallelCall(), EmitOMPSerialCall(), EmitOMPThreadPrivateVarInit(), getOMPAddrOfThreadPrivate(), and GetOpenMPThreadID().
llvm::Value * CGOpenMPRuntime::EmitThreadIDAddress | ( | CodeGenFunction & | CGF, |
SourceLocation | Loc | ||
) | [virtual] |
Emits address of the word in a memory where current thread id is stored.
Definition at line 570 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::CapturedStmtInfo, clang::CodeGen::CodeGenFunction::CreateMemTemp(), clang::CodeGen::CodeGenFunction::EmitLoadOfLValue(), clang::CodeGen::CodeGenFunction::EmitStoreOfScalar(), clang::CodeGen::CodeGenFunction::getContext(), clang::ASTContext::getIntTypeForBitwidth(), GetOpenMPThreadID(), and clang::CodeGen::CodeGenFunction::MakeNaturalAlignAddrLValue().
Referenced by EmitOMPSerialCall().
void CGOpenMPRuntime::FunctionFinished | ( | CodeGenFunction & | CGF | ) |
Cleans up references to the objects in finished function.
Definition at line 238 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::CurFn, and OpenMPLocThreadIDMap.
llvm::Value * CGOpenMPRuntime::GetCriticalRegionLock | ( | StringRef | CriticalName | ) |
Returns corresponding lock object for the specified critical region name. If the lock object does not exist it is created, otherwise the reference to the existing copy is returned.
CriticalName | Name of the critical region. |
Definition at line 608 of file CGOpenMPRuntime.cpp.
References GetOrCreateInternalVariable(), and KmpCriticalNameTy.
StructorType clang::CodeGen::getFromCtorType | ( | CXXCtorType | T | ) | [inline] |
Definition at line 77 of file CodeGenTypes.h.
References Base, Complete, clang::Ctor_Base, clang::Ctor_Comdat, and clang::Ctor_Complete.
Referenced by clang::CodeGen::CodeGenTypes::arrangeGlobalDeclaration(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), clang::CodeGen::CodeGenFunction::EmitDelegateCXXConstructorCall(), and clang::CodeGen::CodeGenModule::GetAddrOfGlobal().
StructorType clang::CodeGen::getFromDtorType | ( | CXXDtorType | T | ) | [inline] |
Definition at line 101 of file CodeGenTypes.h.
References Base, Complete, Deleting, clang::Dtor_Base, clang::Dtor_Comdat, clang::Dtor_Complete, and clang::Dtor_Deleting.
Referenced by clang::CodeGen::CodeGenTypes::arrangeGlobalDeclaration(), clang::CodeGen::CodeGenModule::GetAddrOfGlobal(), and clang::CodeGen::CodeGenTypes::GetFunctionTypeForVTable().
llvm::Type * CGOpenMPRuntime::getIdentTyPointerTy | ( | ) |
Returns pointer to ident_t type.
Definition at line 244 of file CGOpenMPRuntime.cpp.
References IdentTy.
llvm::Type * CGOpenMPRuntime::getKmpc_MicroPointerTy | ( | ) |
Returns pointer to kmpc_micro type.
Definition at line 248 of file CGOpenMPRuntime.cpp.
References Kmpc_MicroTy.
Referenced by EmitOMPParallelCall().
llvm::Value * CGOpenMPRuntime::getOMPAddrOfThreadPrivate | ( | CodeGenFunction & | CGF, |
const VarDecl * | VD, | ||
llvm::Value * | VDAddr, | ||
SourceLocation | Loc | ||
) | [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. |
Definition at line 377 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::Builder, CreateRuntimeFunction(), EmitOpenMPUpdateLocation(), clang::CodeGen::CodeGenFunction::EmitRuntimeCall(), GetOpenMPThreadID(), and getOrCreateThreadPrivateCache().
llvm::Value * CGOpenMPRuntime::GetOpenMPThreadID | ( | CodeGenFunction & | CGF, |
SourceLocation | Loc | ||
) |
Gets thread id value for the current thread.
Definition at line 194 of file CGOpenMPRuntime.cpp.
References clang::CodeGen::CodeGenFunction::AllocaInsertPt, clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CapturedStmtInfo, CreateRuntimeFunction(), clang::CodeGen::CodeGenFunction::CurFn, clang::CodeGen::CodeGenFunction::EmitLoadOfLValue(), EmitOpenMPUpdateLocation(), clang::CodeGen::CodeGenFunction::EmitRuntimeCall(), clang::CodeGen::RValue::getScalarVal(), clang::CodeGen::CodeGenFunction::MakeNaturalAlignAddrLValue(), and OpenMPLocThreadIDMap.
Referenced by EmitOMPBarrierCall(), EmitOMPCriticalRegionEnd(), EmitOMPCriticalRegionStart(), EmitOMPNumThreadsClause(), EmitOMPSerialCall(), EmitThreadIDAddress(), and getOMPAddrOfThreadPrivate().
llvm::Constant * CGOpenMPRuntime::GetOrCreateInternalVariable | ( | llvm::Type * | Ty, |
const llvm::Twine & | Name | ||
) |
Gets (if variable with the given name already exist) or creates internal global variable with the specified Name. 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 587 of file CGOpenMPRuntime.cpp.
References InternalVars.
Referenced by GetCriticalRegionLock(), and getOrCreateThreadPrivateCache().
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 371 of file CGOpenMPRuntime.cpp.
References GetOrCreateInternalVariable().
Referenced by getOMPAddrOfThreadPrivate().
BlockFlags clang::CodeGen::operator| | ( | BlockLiteralFlags | l, |
BlockLiteralFlags | r | ||
) | [inline] |
Definition at line 94 of file CGBlocks.h.
BlockFieldFlags clang::CodeGen::operator| | ( | BlockFieldFlag_t | l, |
BlockFieldFlag_t | r | ||
) | [inline] |
Definition at line 139 of file CGBlocks.h.
CXXCtorType clang::CodeGen::toCXXCtorType | ( | StructorType | T | ) | [inline] |
Definition at line 65 of file CodeGenTypes.h.
References Base, Complete, clang::Ctor_Base, clang::Ctor_Complete, and Deleting.
Referenced by clang::CodeGen::CodeGenTypes::arrangeCXXStructorDeclaration(), clang::CodeGen::CodeGenModule::codegenCXXStructor(), and clang::CodeGen::CodeGenModule::getAddrOfCXXStructor().
CXXDtorType clang::CodeGen::toCXXDtorType | ( | StructorType | T | ) | [inline] |
Definition at line 89 of file CodeGenTypes.h.
References Base, Complete, Deleting, clang::Dtor_Base, clang::Dtor_Complete, and clang::Dtor_Deleting.
Referenced by clang::CodeGen::CodeGenTypes::arrangeCXXStructorDeclaration(), clang::CodeGen::CodeGenModule::codegenCXXStructor(), and clang::CodeGen::CodeGenModule::getAddrOfCXXStructor().
virtual clang::CodeGen::~CGOpenMPRuntime | ( | ) | [virtual] |
Definition at line 234 of file CGOpenMPRuntime.h.
llvm::StructType* clang::CodeGen::IdentTy |
Definition at line 148 of file CGOpenMPRuntime.h.
Referenced by CGOpenMPRuntime(), EmitOpenMPUpdateLocation(), and getIdentTyPointerTy().
llvm::StringMap<llvm::AssertingVH<llvm::Constant>, llvm::BumpPtrAllocator> clang::CodeGen::InternalVars |
An ordered map of auto-generated variables to their unique names. It stores variables with the following names: 1) ".gomp_critical_user_" + <critical_section_name> + ".var" for "omp critical" directives; 2) <mangled_name_for_global_var> + ".cache." for cache for threadprivate variables.
Definition at line 174 of file CGOpenMPRuntime.h.
Referenced by GetOrCreateInternalVariable().
Definition at line 238 of file CGOpenMPRuntime.h.
llvm::FunctionType* clang::CodeGen::Kmpc_MicroTy |
The type for a microtask which gets passed to __kmpc_fork_call(). Original representation is: typedef void (kmpc_micro)(kmp_int32 global_tid, kmp_int32 bound_tid,...);.
Definition at line 155 of file CGOpenMPRuntime.h.
Referenced by CGOpenMPRuntime(), and getKmpc_MicroPointerTy().
llvm::ArrayType* clang::CodeGen::KmpCriticalNameTy |
Type kmp_critical_name, originally defined as typedef kmp_int32 kmp_critical_name[8];.
Definition at line 167 of file CGOpenMPRuntime.h.
Referenced by CGOpenMPRuntime(), and GetCriticalRegionLock().
Definition at line 151 of file CGOpenMPRuntime.h.
Referenced by EmitOpenMPUpdateLocation().
Definition at line 164 of file CGOpenMPRuntime.h.
Referenced by EmitOpenMPUpdateLocation(), FunctionFinished(), and GetOpenMPThreadID().
llvm::DenseSet<const VarDecl *> clang::CodeGen::ThreadPrivateWithDefinition |
Set of threadprivate variables with the generated initializer.
Definition at line 220 of file CGOpenMPRuntime.h.
Referenced by EmitOMPThreadPrivateVarDefinition().