clang  7.0.0svn
Classes | Public Member Functions | Protected Attributes | List of all members
clang::CodeGen::CGOpenCLRuntime Class Reference

#include "/opt/doxygen-docs/src/llvm/tools/clang/lib/CodeGen/CGOpenCLRuntime.h"

Collaboration diagram for clang::CodeGen::CGOpenCLRuntime:
Collaboration graph
[legend]

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::TypeconvertOpenCLSpecificType (const Type *T)
 
virtual llvm::TypegetPipeType (const PipeType *T)
 
llvm::PointerType * getSamplerType (const Type *T)
 
virtual llvm::ValuegetPipeElemSize (const Expr *PipeArg)
 
virtual llvm::ValuegetPipeElemAlign (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...
 

Protected Attributes

CodeGenModuleCGM
 
llvm::TypePipeTy
 
llvm::PointerType * SamplerTy
 
llvm::DenseMap< const Expr *, EnqueuedBlockInfoEnqueuedBlockMap
 Maps block expression to block information. More...
 

Detailed Description

Definition at line 35 of file CGOpenCLRuntime.h.

Constructor & Destructor Documentation

◆ CGOpenCLRuntime()

clang::CodeGen::CGOpenCLRuntime::CGOpenCLRuntime ( CodeGenModule CGM)
inline

◆ ~CGOpenCLRuntime()

CGOpenCLRuntime::~CGOpenCLRuntime ( )
virtual

Definition at line 27 of file CGOpenCLRuntime.cpp.

Referenced by CGOpenCLRuntime().

Member Function Documentation

◆ convertOpenCLSpecificType()

llvm::Type * CGOpenCLRuntime::convertOpenCLSpecificType ( const Type T)
virtual

◆ emitOpenCLEnqueuedBlock()

CGOpenCLRuntime::EnqueuedBlockInfo CGOpenCLRuntime::emitOpenCLEnqueuedBlock ( CodeGenFunction CGF,
const Expr E 
)
Returns
enqueued block information for enqueued block.

Definition at line 130 of file CGOpenCLRuntime.cpp.

Referenced by CGOpenCLRuntime().

◆ EmitWorkGroupLocalVarDecl()

void CGOpenCLRuntime::EmitWorkGroupLocalVarDecl ( CodeGenFunction CGF,
const VarDecl D 
)
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().

◆ getGenericVoidPointerType()

llvm::PointerType * CGOpenCLRuntime::getGenericVoidPointerType ( )

◆ getPipeElemAlign()

llvm::Value * CGOpenCLRuntime::getPipeElemAlign ( const Expr PipeArg)
virtual

◆ getPipeElemSize()

llvm::Value * CGOpenCLRuntime::getPipeElemSize ( const Expr PipeArg)
virtual

◆ getPipeType()

llvm::Type * CGOpenCLRuntime::getPipeType ( const PipeType T)
virtual

◆ getSamplerType()

llvm::PointerType * CGOpenCLRuntime::getSamplerType ( const Type T)

◆ recordBlockInfo()

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.

Parameters
InvokeFinvoke function emitted for the block expression.
Blockblock literal emitted for the block expression.

Definition at line 117 of file CGOpenCLRuntime.cpp.

Member Data Documentation

◆ CGM

CodeGenModule& clang::CodeGen::CGOpenCLRuntime::CGM
protected

◆ EnqueuedBlockMap

llvm::DenseMap<const Expr *, EnqueuedBlockInfo> clang::CodeGen::CGOpenCLRuntime::EnqueuedBlockMap
protected

Maps block expression to block information.

Definition at line 48 of file CGOpenCLRuntime.h.

◆ PipeTy

llvm::Type* clang::CodeGen::CGOpenCLRuntime::PipeTy
protected

Definition at line 38 of file CGOpenCLRuntime.h.

Referenced by getPipeElemAlign(), getPipeElemSize(), and getPipeType().

◆ SamplerTy

llvm::PointerType* clang::CodeGen::CGOpenCLRuntime::SamplerTy
protected

Definition at line 39 of file CGOpenCLRuntime.h.

Referenced by getSamplerType().


The documentation for this class was generated from the following files: