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

#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/CodeGen/CGCUDARuntime.h"

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

Classes

class  DeviceVarFlags
 

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 handleVarRegistration (const VarDecl *VD, llvm::GlobalVariable &Var)=0
 Check whether a variable is a device variable and register it if true. More...
 
virtual llvm::Function * finalizeModule ()=0
 Finalize generated LLVM module. More...
 
virtual std::string getDeviceSideName (const NamedDecl *ND)=0
 Returns function or variable name on device side even if the current compilation is for host. More...
 
virtual llvm::GlobalValue * getKernelHandle (llvm::Function *Stub, GlobalDecl GD)=0
 Get kernel handle by stub function. More...
 
virtual llvm::Function * getKernelStub (llvm::GlobalValue *Handle)=0
 Get kernel stub by kernel handle. More...
 
virtual void internalizeDeviceSideVar (const VarDecl *D, llvm::GlobalValue::LinkageTypes &Linkage)=0
 Adjust linkage of shadow variables in host compilation. More...
 

Protected Attributes

CodeGenModuleCGM
 

Detailed Description

Definition at line 41 of file CGCUDARuntime.h.

Constructor & Destructor Documentation

◆ CGCUDARuntime()

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

Definition at line 76 of file CGCUDARuntime.h.

◆ ~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

◆ emitDeviceStub()

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

Emits a kernel launch stub.

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

◆ finalizeModule()

virtual llvm::Function* clang::CodeGen::CGCUDARuntime::finalizeModule ( )
pure virtual

Finalize generated LLVM module.

Returns a module constructor function to be added or a null pointer.

◆ getDeviceSideName()

virtual std::string clang::CodeGen::CGCUDARuntime::getDeviceSideName ( const NamedDecl ND)
pure virtual

Returns function or variable name on device side even if the current compilation is for host.

◆ getKernelHandle()

virtual llvm::GlobalValue* clang::CodeGen::CGCUDARuntime::getKernelHandle ( llvm::Function *  Stub,
GlobalDecl  GD 
)
pure virtual

Get kernel handle by stub function.

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

◆ getKernelStub()

virtual llvm::Function* clang::CodeGen::CGCUDARuntime::getKernelStub ( llvm::GlobalValue *  Handle)
pure virtual

Get kernel stub by kernel handle.

Referenced by EmitDirectCallee().

◆ handleVarRegistration()

virtual void clang::CodeGen::CGCUDARuntime::handleVarRegistration ( const VarDecl VD,
llvm::GlobalVariable &  Var 
)
pure virtual

Check whether a variable is a device variable and register it if true.

◆ internalizeDeviceSideVar()

virtual void clang::CodeGen::CGCUDARuntime::internalizeDeviceSideVar ( const VarDecl D,
llvm::GlobalValue::LinkageTypes &  Linkage 
)
pure virtual

Adjust linkage of shadow variables in host compilation.

Member Data Documentation

◆ CGM

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

Definition at line 43 of file CGCUDARuntime.h.


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