class CGOpenCLRuntime

Declaration

class CGOpenCLRuntime { /* full declaration omitted */ };

Declared at: clang/lib/CodeGen/CGOpenCLRuntime.h:36

Member Variables

protected clang::CodeGen::CodeGenModule& CGM
protected llvm::Type* PipeROTy
protected llvm::Type* PipeWOTy
protected llvm::PointerType* SamplerTy
protected llvm::StringMap<llvm::PointerType*> CachedTys
protected llvm::DenseMap<const Expr*, EnqueuedBlockInfo> EnqueuedBlockMap
Maps block expression to block information.

Method Overview

Methods

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

Declared at: clang/lib/CodeGen/CGOpenCLRuntime.h:59

Parameters

clang::CodeGen::CodeGenModule& CGM

virtual void EmitWorkGroupLocalVarDecl(
    clang::CodeGen::CodeGenFunction& CGF,
    const clang::VarDecl& D)

Description

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.

Declared at: clang/lib/CodeGen/CGOpenCLRuntime.h:66

Parameters

clang::CodeGen::CodeGenFunction& CGF
const clang::VarDecl& D

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

Declared at: clang/lib/CodeGen/CGOpenCLRuntime.h:69

Parameters

const clang::Type* T

clang::CodeGen::CGOpenCLRuntime::EnqueuedBlockInfo
emitOpenCLEnqueuedBlock(
    clang::CodeGen::CodeGenFunction& CGF,
    const clang::Expr* E)

Declared at: clang/lib/CodeGen/CGOpenCLRuntime.h:87

Parameters

clang::CodeGen::CodeGenFunction& CGF
const clang::Expr* E

Returns

enqueued block information for enqueued block.

llvm::PointerType* getGenericVoidPointerType()

Declared at: clang/lib/CodeGen/CGOpenCLRuntime.h:84

Returns

__generic void* type.

llvm::Function* getInvokeFunction(
    const clang::Expr* E)

Declared at: clang/lib/CodeGen/CGOpenCLRuntime.h:101

Parameters

const clang::Expr* E

Returns

LLVM block invoke function emitted for an expression derived from the block expression.

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

Declared at: clang/lib/CodeGen/CGOpenCLRuntime.h:81

Parameters

const clang::Expr* PipeArg

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

Declared at: clang/lib/CodeGen/CGOpenCLRuntime.h:77

Parameters

const clang::Expr* PipeArg

virtual llvm::Type* getPipeType(
    const clang::PipeType* T,
    llvm::StringRef Name,
    llvm::Type*& PipeTy)

Declared at: clang/lib/CodeGen/CGOpenCLRuntime.h:54

Parameters

const clang::PipeType* T
llvm::StringRef Name
llvm::Type*& PipeTy

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

Declared at: clang/lib/CodeGen/CGOpenCLRuntime.h:71

Parameters

const clang::PipeType* T

llvm::PointerType* getPointerType(
    const clang::Type* T,
    llvm::StringRef Name)

Declared at: clang/lib/CodeGen/CGOpenCLRuntime.h:56

Parameters

const clang::Type* T
llvm::StringRef Name

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

Declared at: clang/lib/CodeGen/CGOpenCLRuntime.h:73

Parameters

const clang::Type* T

void recordBlockInfo(const clang::BlockExpr* E,
                     llvm::Function* InvokeF,
                     llvm::Value* Block,
                     llvm::Type* BlockTy)

Description

Record invoke function and block literal emitted during normal codegen for a block expression. The information is used by emitOpenCLEnqueuedBlock to emit wrapper kernel.

Declared at: clang/lib/CodeGen/CGOpenCLRuntime.h:96

Parameters

const clang::BlockExpr* E
llvm::Function* InvokeF
invoke function emitted for the block expression.
llvm::Value* Block
block literal emitted for the block expression.
llvm::Type* BlockTy

virtual ~CGOpenCLRuntime()

Declared at: clang/lib/CodeGen/CGOpenCLRuntime.h:61