clang 20.0.0git
|
#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/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. | |
virtual llvm::Type * | convertOpenCLSpecificType (const Type *T) |
virtual llvm::Type * | getPipeType (const PipeType *T) |
llvm::Type * | 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, llvm::Type *BlockTy) |
Record invoke function and block literal emitted during normal codegen for a block expression. | |
llvm::Function * | getInvokeFunction (const Expr *E) |
Protected Member Functions | |
virtual llvm::Type * | getPipeType (const PipeType *T, StringRef Name, llvm::Type *&PipeTy) |
llvm::PointerType * | getPointerType (const Type *T) |
Protected Attributes | |
CodeGenModule & | CGM |
llvm::Type * | PipeROTy |
llvm::Type * | PipeWOTy |
llvm::Type * | SamplerTy |
llvm::DenseMap< const Expr *, EnqueuedBlockInfo > | EnqueuedBlockMap |
Maps block expression to block information. | |
Definition at line 36 of file CGOpenCLRuntime.h.
|
inline |
Definition at line 58 of file CGOpenCLRuntime.h.
|
virtual |
Definition at line 26 of file CGOpenCLRuntime.cpp.
|
virtual |
Definition at line 33 of file CGOpenCLRuntime.cpp.
References CGM, clang::CodeGen::TargetCodeGenInfo::getOpenCLType(), getPointerType(), getSamplerType(), clang::CodeGen::CodeGenModule::getTargetCodeGenInfo(), clang::Type::isOpenCLSpecificType(), clang::Type::isSamplerT(), and clang::T.
Referenced by clang::CodeGen::CodeGenTypes::ConvertType().
CGOpenCLRuntime::EnqueuedBlockInfo CGOpenCLRuntime::emitOpenCLEnqueuedBlock | ( | CodeGenFunction & | CGF, |
const Expr * | E | ||
) |
Definition at line 144 of file CGOpenCLRuntime.cpp.
References clang::Block, clang::CodeGen::TargetCodeGenInfo::createEnqueuedBlockKernel(), E, clang::CodeGen::CodeGenFunction::EmitScalarExpr(), EnqueuedBlockMap, getBlockExpr(), and clang::CodeGen::CodeGenFunction::getTargetHooks().
|
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 28 of file CGOpenCLRuntime.cpp.
References D, and clang::CodeGen::CodeGenFunction::EmitStaticVarDecl().
llvm::PointerType * CGOpenCLRuntime::getGenericVoidPointerType | ( | ) |
Definition at line 101 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 clang::CodeGen::CodeGenModule::getGenericBlockLiteralType(), and initializeForBlockHeader().
llvm::Function * CGOpenCLRuntime::getInvokeFunction | ( | const Expr * | E | ) |
Definition at line 139 of file CGOpenCLRuntime.cpp.
References E, EnqueuedBlockMap, and getBlockExpr().
|
virtual |
Definition at line 91 of file CGOpenCLRuntime.cpp.
References clang::Type::castAs(), CGM, clang::CodeGen::CodeGenModule::getContext(), clang::PipeType::getElementType(), clang::CodeGen::CodeGenModule::getLLVMContext(), clang::CharUnits::getQuantity(), clang::Expr::getType(), and clang::ASTContext::getTypeAlignInChars().
|
virtual |
Definition at line 81 of file CGOpenCLRuntime.cpp.
References clang::Type::castAs(), CGM, clang::CodeGen::CodeGenModule::getContext(), clang::PipeType::getElementType(), clang::CodeGen::CodeGenModule::getLLVMContext(), clang::CharUnits::getQuantity(), clang::Expr::getType(), and clang::ASTContext::getTypeSizeInChars().
|
virtual |
Definition at line 52 of file CGOpenCLRuntime.cpp.
References CGM, clang::CodeGen::TargetCodeGenInfo::getOpenCLType(), getPipeType(), clang::CodeGen::CodeGenModule::getTargetCodeGenInfo(), PipeROTy, PipeWOTy, and clang::T.
|
protectedvirtual |
Definition at line 62 of file CGOpenCLRuntime.cpp.
References getPointerType(), and clang::T.
Referenced by clang::CodeGen::CodeGenTypes::ConvertType(), and getPipeType().
|
protected |
Definition at line 46 of file CGOpenCLRuntime.cpp.
References CGM, clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenModule::getLLVMContext(), clang::ASTContext::getOpenCLTypeAddrSpace(), clang::ASTContext::getTargetAddressSpace(), and clang::T.
Referenced by convertOpenCLSpecificType(), getPipeType(), and getSamplerType().
llvm::Type * CGOpenCLRuntime::getSamplerType | ( | const Type * | T | ) |
Definition at line 69 of file CGOpenCLRuntime.cpp.
References CGM, clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::TargetCodeGenInfo::getOpenCLType(), getPointerType(), clang::CodeGen::CodeGenModule::getTargetCodeGenInfo(), clang::CanQual< T >::getTypePtr(), clang::ASTContext::OCLSamplerTy, SamplerTy, and clang::T.
Referenced by convertOpenCLSpecificType(), and clang::CodeGen::CodeGenModule::createOpenCLIntToSamplerConversion().
void CGOpenCLRuntime::recordBlockInfo | ( | const BlockExpr * | E, |
llvm::Function * | InvokeF, | ||
llvm::Value * | Block, | ||
llvm::Type * | BlockTy | ||
) |
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 127 of file CGOpenCLRuntime.cpp.
References clang::Block, E, and EnqueuedBlockMap.
Referenced by buildGlobalBlock().
|
protected |
Definition at line 38 of file CGOpenCLRuntime.h.
Referenced by convertOpenCLSpecificType(), getGenericVoidPointerType(), getPipeElemAlign(), getPipeElemSize(), getPipeType(), getPointerType(), and getSamplerType().
|
protected |
Maps block expression to block information.
Definition at line 51 of file CGOpenCLRuntime.h.
Referenced by emitOpenCLEnqueuedBlock(), getInvokeFunction(), and recordBlockInfo().
|
protected |
Definition at line 39 of file CGOpenCLRuntime.h.
Referenced by getPipeType().
|
protected |
Definition at line 40 of file CGOpenCLRuntime.h.
Referenced by getPipeType().
|
protected |
Definition at line 41 of file CGOpenCLRuntime.h.
Referenced by getSamplerType().