clang
7.0.0
|
#include "/work/llvm-www-releases/7.0.0/docsbuild/llvm.src/tools/clang/lib/CodeGen/CGOpenCLRuntime.h"
Classes | |
struct | EnqueuedBlockInfo |
Structure for enqueued block information. More... | |
Public Member Functions | |
CGOpenCLRuntime (CodeGenModule &CGM) | |
virtual | ~CGOpenCLRuntime () |
virtual void | EmitWorkGroupLocalVarDecl (CodeGenFunction &CGF, const VarDecl &D) |
Emit the IR required for a work-group-local variable declaration, and add an entry to CGF's LocalDeclMap for D. More... | |
virtual llvm::Type * | convertOpenCLSpecificType (const Type *T) |
virtual llvm::Type * | getPipeType (const PipeType *T) |
llvm::PointerType * | getSamplerType (const Type *T) |
virtual llvm::Value * | getPipeElemSize (const Expr *PipeArg) |
virtual llvm::Value * | getPipeElemAlign (const Expr *PipeArg) |
llvm::PointerType * | getGenericVoidPointerType () |
EnqueuedBlockInfo | emitOpenCLEnqueuedBlock (CodeGenFunction &CGF, const Expr *E) |
void | recordBlockInfo (const BlockExpr *E, llvm::Function *InvokeF, llvm::Value *Block) |
Record invoke function and block literal emitted during normal codegen for a block expression. More... | |
llvm::Function * | getInvokeFunction (const Expr *E) |
Protected Member Functions | |
virtual llvm::Type * | getPipeType (const PipeType *T, StringRef Name, llvm::Type *&PipeTy) |
Protected Attributes | |
CodeGenModule & | CGM |
llvm::Type * | PipeROTy |
llvm::Type * | PipeWOTy |
llvm::PointerType * | SamplerTy |
llvm::DenseMap< const Expr *, EnqueuedBlockInfo > | EnqueuedBlockMap |
Maps block expression to block information. More... | |
Definition at line 35 of file CGOpenCLRuntime.h.
|
inline |
Definition at line 55 of file CGOpenCLRuntime.h.
References convertOpenCLSpecificType(), emitOpenCLEnqueuedBlock(), EmitWorkGroupLocalVarDecl(), getGenericVoidPointerType(), getPipeElemAlign(), getPipeElemSize(), getPipeType(), getSamplerType(), clang::CodeGen::Type, and ~CGOpenCLRuntime().
|
virtual |
Definition at line 27 of file CGOpenCLRuntime.cpp.
Referenced by CGOpenCLRuntime().
|
virtual |
Definition at line 34 of file CGOpenCLRuntime.cpp.
References CGM, clang::serialized_diags::create(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenModule::getLLVMContext(), clang::ASTContext::getOpenCLTypeAddrSpace(), getSamplerType(), clang::ASTContext::getTargetAddressSpace(), and clang::Type::isOpenCLSpecificType().
Referenced by CGOpenCLRuntime(), and clang::CodeGen::CodeGenTypes::ConvertType().
CGOpenCLRuntime::EnqueuedBlockInfo CGOpenCLRuntime::emitOpenCLEnqueuedBlock | ( | CodeGenFunction & | CGF, |
const Expr * | E | ||
) |
Definition at line 159 of file CGOpenCLRuntime.cpp.
Referenced by CGOpenCLRuntime().
|
virtual |
Emit the IR required for a work-group-local variable declaration, and add an entry to CGF's LocalDeclMap for D.
The base class does this using CodeGenFunction::EmitStaticVarDecl to emit an internal global for D.
Definition at line 29 of file CGOpenCLRuntime.cpp.
References clang::CodeGen::CodeGenFunction::EmitStaticVarDecl(), and clang::InternalLinkage.
Referenced by CGOpenCLRuntime(), and clang::CodeGen::CodeGenFunction::EmitVarDecl().
llvm::PointerType * CGOpenCLRuntime::getGenericVoidPointerType | ( | ) |
Definition at line 114 of file CGOpenCLRuntime.cpp.
References CGM, clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::CodeGen::CodeGenModule::getLLVMContext(), clang::ASTContext::getTargetAddressSpace(), and clang::opencl_generic.
Referenced by CGOpenCLRuntime(), and clang::CodeGen::CodeGenFunction::GenerateBlockFunction().
llvm::Function * CGOpenCLRuntime::getInvokeFunction | ( | const Expr * | E | ) |
Definition at line 154 of file CGOpenCLRuntime.cpp.
|
virtual |
Definition at line 104 of file CGOpenCLRuntime.cpp.
References CGM, clang::Type::getAs(), clang::CodeGen::CodeGenModule::getContext(), clang::PipeType::getElementType(), clang::CodeGen::CodeGenModule::getLLVMContext(), clang::Expr::getType(), clang::ASTContext::getTypeAlignInChars(), and clang::CodeGen::Type.
Referenced by CGOpenCLRuntime().
|
virtual |
Definition at line 94 of file CGOpenCLRuntime.cpp.
References CGM, clang::Type::getAs(), clang::CodeGen::CodeGenModule::getContext(), clang::PipeType::getElementType(), clang::CodeGen::CodeGenModule::getLLVMContext(), clang::Expr::getType(), clang::ASTContext::getTypeSizeInChars(), and clang::CodeGen::Type.
Referenced by CGOpenCLRuntime().
|
protectedvirtual |
Definition at line 75 of file CGOpenCLRuntime.cpp.
Referenced by CGOpenCLRuntime(), clang::CodeGen::CodeGenTypes::ConvertType(), and getPipeType().
|
virtual |
Definition at line 68 of file CGOpenCLRuntime.cpp.
References getPipeType(), clang::PipeType::isReadOnly(), PipeROTy, and PipeWOTy.
llvm::PointerType * CGOpenCLRuntime::getSamplerType | ( | const Type * | T | ) |
Definition at line 85 of file CGOpenCLRuntime.cpp.
References CGM, clang::serialized_diags::create(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenModule::getLLVMContext(), clang::ASTContext::getOpenCLTypeAddrSpace(), clang::ASTContext::getTargetAddressSpace(), and SamplerTy.
Referenced by CGOpenCLRuntime(), and convertOpenCLSpecificType().
void CGOpenCLRuntime::recordBlockInfo | ( | const BlockExpr * | E, |
llvm::Function * | InvokeF, | ||
llvm::Value * | Block | ||
) |
Record invoke function and block literal emitted during normal codegen for a block expression.
Record emitted llvm invoke function and llvm block literal for the corresponding block expression.
The information is used by emitOpenCLEnqueuedBlock to emit wrapper kernel.
InvokeF | invoke function emitted for the block expression. |
Block | block literal emitted for the block expression. |
Definition at line 142 of file CGOpenCLRuntime.cpp.
|
protected |
Definition at line 37 of file CGOpenCLRuntime.h.
Referenced by convertOpenCLSpecificType(), getGenericVoidPointerType(), getPipeElemAlign(), getPipeElemSize(), and getSamplerType().
|
protected |
Maps block expression to block information.
Definition at line 49 of file CGOpenCLRuntime.h.
|
protected |
Definition at line 38 of file CGOpenCLRuntime.h.
Referenced by getPipeType().
|
protected |
Definition at line 39 of file CGOpenCLRuntime.h.
Referenced by getPipeType().
|
protected |
Definition at line 40 of file CGOpenCLRuntime.h.
Referenced by getSamplerType().