clang API Documentation
#include "clang/Basic/SourceLocation.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/IR/ValueHandle.h"
Go to the source code of this file.
Classes | |
class | clang::CodeGen::CGOpenMPRuntime |
struct | clang::CodeGen::DebugLocThreadIdTy |
Stores debug location and ThreadID for the function. More... | |
Namespaces | |
namespace | llvm |
namespace | clang |
namespace | clang::CodeGen |
Typedefs | |
typedef llvm::DenseMap < unsigned, llvm::Value * > | clang::CodeGen::OpenMPDebugLocMapTy |
Map for SourceLocation and OpenMP runtime library debug locations. | |
typedef llvm::DenseMap < llvm::Function *, DebugLocThreadIdTy > | clang::CodeGen::OpenMPLocThreadIDMapTy |
Map of local debug location, ThreadId and functions. | |
Enumerations | |
enum | clang::CodeGen::IdentFieldIndex { clang::CodeGen::IdentField_Reserved_1, clang::CodeGen::IdentField_Flags, clang::CodeGen::IdentField_Reserved_2, clang::CodeGen::IdentField_Reserved_3, clang::CodeGen::IdentField_PSource } |
Functions | |
llvm::Value * | clang::CodeGen::EmitOpenMPUpdateLocation (CodeGenFunction &CGF, SourceLocation Loc, OpenMPLocationFlags Flags=OMP_IDENT_KMPC) |
Emits object of ident_t type with info for source location. | |
llvm::Type * | clang::CodeGen::getIdentTyPointerTy () |
Returns pointer to ident_t type. | |
llvm::Type * | clang::CodeGen::getKmpc_MicroPointerTy () |
Returns pointer to kmpc_micro type. | |
llvm::Constant * | clang::CodeGen::CreateRuntimeFunction (OpenMPRTLFunction Function) |
Returns specified OpenMP runtime function. | |
llvm::Constant * | clang::CodeGen::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 * | clang::CodeGen::EmitThreadIDAddress (CodeGenFunction &CGF, SourceLocation Loc) |
Emits address of the word in a memory where current thread id is stored. | |
llvm::Value * | clang::CodeGen::GetOpenMPThreadID (CodeGenFunction &CGF, SourceLocation Loc) |
Gets thread id value for the current thread. | |
llvm::Constant * | clang::CodeGen::GetOrCreateInternalVariable (llvm::Type *Ty, const llvm::Twine &Name) |
Gets (if variable with the given name already exist) or creates internal global variable with the specified Name. The created variable has linkage CommonLinkage by default and is initialized by null value. | |
void | clang::CodeGen::EmitOMPThreadPrivateVarInit (CodeGenFunction &CGF, llvm::Value *VDAddr, llvm::Value *Ctor, llvm::Value *CopyCtor, llvm::Value *Dtor, SourceLocation Loc) |
Emits initialization code for the threadprivate variables. | |
clang::CodeGen::CGOpenMPRuntime (CodeGenModule &CGM) | |
virtual | clang::CodeGen::~CGOpenMPRuntime () |
struct context_vars *param D OpenMP directive param ThreadIDVar Variable for thread id in the current OpenMP region *virtual llvm::Value * | clang::CodeGen::EmitOpenMPOutlinedFunction (const OMPExecutableDirective &D, const VarDecl *ThreadIDVar) |
void | clang::CodeGen::FunctionFinished (CodeGenFunction &CGF) |
Cleans up references to the objects in finished function. | |
virtual void | clang::CodeGen::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 | clang::CodeGen::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 * | clang::CodeGen::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 | clang::CodeGen::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 | clang::CodeGen::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 | clang::CodeGen::EmitOMPBarrierCall (CodeGenFunction &CGF, SourceLocation Loc, OpenMPLocationFlags Flags) |
Emits a barrier for OpenMP threads. | |
virtual void | clang::CodeGen::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 * | clang::CodeGen::getOMPAddrOfThreadPrivate (CodeGenFunction &CGF, const VarDecl *VD, llvm::Value *VDAddr, SourceLocation Loc) |
Returns address of the threadprivate variable for the current thread. | |
virtual llvm::Function * | clang::CodeGen::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). | |
Variables | |
class clang::CodeGen::CGOpenMPRuntime | clang::CodeGen::ident_t |
llvm::StructType * | clang::CodeGen::IdentTy |
OpenMPDebugLocMapTy | clang::CodeGen::OpenMPDebugLocMap |
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,...);. | |
OpenMPLocThreadIDMapTy | clang::CodeGen::OpenMPLocThreadIDMap |
llvm::ArrayType * | clang::CodeGen::KmpCriticalNameTy |
Type kmp_critical_name, originally defined as typedef kmp_int32 kmp_critical_name[8];. | |
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. | |
llvm::DenseSet< const VarDecl * > | clang::CodeGen::ThreadPrivateWithDefinition |
Set of threadprivate variables with the generated initializer. | |
clang::CodeGen::kmp_int32 |