clang 10.0.0git

Public Types | Public Member Functions | Protected Attributes | List of all members
clang::CodeGen::CGCUDARuntime Class Referenceabstract

`#include "/work/www-prereleases/10.0.0/rc1/docsbuild/clang/lib/CodeGen/CGCUDARuntime.h"`

Collaboration diagram for clang::CodeGen::CGCUDARuntime:
[legend]

## Public Types
enum | DeviceVarFlags { ExternDeviceVar = 0x01, ConstantDeviceVar = 0x02 }

## Public Member Functions
| CGCUDARuntime (CodeGenModule &CGM)
virtual | ~CGCUDARuntime ()
virtual RValue | EmitCUDAKernelCallExpr (CodeGenFunction &CGF, const CUDAKernelCallExpr *E, ReturnValueSlot ReturnValue)
virtual void | emitDeviceStub (CodeGenFunction &CGF, FunctionArgList &Args)=0
| Emits a kernel launch stub. More...
virtual void | registerDeviceVar (const VarDecl *VD, llvm::GlobalVariable &Var, unsigned Flags)=0
virtual llvm::Function * | makeModuleCtorFunction ()=0
| Constructs and returns a module initialization function or nullptr if it's not needed. More...
virtual llvm::Function * | makeModuleDtorFunction ()=0
| Returns a module cleanup function or nullptr if it's not needed. More...
virtual std::string | getDeviceStubName (llvm::StringRef Name) const =0
| Construct and return the stub name of a kernel. More...

## Protected Attributes
CodeGenModule & | CGM

## Detailed Description

Definition at line 38 of file CGCUDARuntime.h.

## Member Enumeration Documentation

## ◆ DeviceVarFlags

enum clang::CodeGen::CGCUDARuntime::DeviceVarFlags

Enumerator
ExternDeviceVar |
ConstantDeviceVar |

Definition at line 44 of file CGCUDARuntime.h.

## Constructor & Destructor Documentation

## ◆ CGCUDARuntime()

clang::CodeGen::CGCUDARuntime::CGCUDARuntime | ( | CodeGenModule & | CGM | ) |
| inline

Definition at line 49 of file CGCUDARuntime.h.

References clang::interp::ReturnValue().

## ◆ ~CGCUDARuntime()

CGCUDARuntime::~CGCUDARuntime | ( |  | ) |
| virtual

Definition at line 24 of file CGCUDARuntime.cpp.

## Member Function Documentation

## ◆ EmitCUDAKernelCallExpr()

RValue CGCUDARuntime::EmitCUDAKernelCallExpr | ( | CodeGenFunction & | CGF,
|  | const CUDAKernelCallExpr * | E,
|  | ReturnValueSlot | ReturnValue
| ) |  |
| virtual

Definition at line 26 of file CGCUDARuntime.cpp.

References clang::CodeGen::CodeGenFunction::ConditionalEvaluation::begin(), clang::CodeGen::CodeGenFunction::createBasicBlock(), clang::CodeGen::CodeGenFunction::EmitBlock(), clang::CodeGen::CodeGenFunction::EmitBranch(), clang::CodeGen::CodeGenFunction::EmitBranchOnBoolExpr(), clang::CodeGen::CodeGenFunction::EmitSimpleCallExpr(), clang::CodeGen::CodeGenFunction::ConditionalEvaluation::end(), clang::CodeGen::RValue::get(), and clang::CUDAKernelCallExpr::getConfig().

## ◆ emitDeviceStub()

virtual void clang::CodeGen::CGCUDARuntime::emitDeviceStub | ( | CodeGenFunction & | CGF,
|  | FunctionArgList & | Args
| ) |  |
| pure virtual

Emits a kernel launch stub.

Referenced by clang::CodeGen::CodeGenFunction::GenerateCode().

## ◆ getDeviceStubName()

virtual std::string clang::CodeGen::CGCUDARuntime::getDeviceStubName | ( | llvm::StringRef | Name | ) | const
| pure virtual

Construct and return the stub name of a kernel.

Referenced by clang::CodeGen::CodeGenModule::getMangledName().

## ◆ makeModuleCtorFunction()

virtual llvm::Function* clang::CodeGen::CGCUDARuntime::makeModuleCtorFunction | ( |  | ) |
| pure virtual

Constructs and returns a module initialization function or nullptr if it's not needed.

Must be called after all kernels have been emitted.

## ◆ makeModuleDtorFunction()

virtual llvm::Function* clang::CodeGen::CGCUDARuntime::makeModuleDtorFunction | ( |  | ) |
| pure virtual

Returns a module cleanup function or nullptr if it's not needed.

Must be called after ModuleCtorFunction

## ◆ registerDeviceVar()

virtual void clang::CodeGen::CGCUDARuntime::registerDeviceVar | ( | const VarDecl * | VD,
|  | llvm::GlobalVariable & | Var,
|  | unsigned | Flags
| ) |  |
| pure virtual

Referenced by clang::CodeGen::CodeGenModule::maybeSetTrivialComdat().

## Member Data Documentation

## ◆ CGM

CodeGenModule& clang::CodeGen::CGCUDARuntime::CGM
| protected

Definition at line 40 of file CGCUDARuntime.h.

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

- lib/CodeGen/CGCUDARuntime.h
- lib/CodeGen/CGCUDARuntime.cpp