clang 23.0.0git
clang::CIRGen::CIRGenCUDARuntime Class Referenceabstract

#include "/work/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/CIR/CodeGen/CIRGenCUDARuntime.h"

Public Member Functions

 CIRGenCUDARuntime (CIRGenModule &cgm)
virtual ~CIRGenCUDARuntime ()
virtual void emitDeviceStub (CIRGenFunction &cgf, cir::FuncOp fn, FunctionArgList &args)=0
virtual RValue emitCUDAKernelCallExpr (CIRGenFunction &cgf, const CUDAKernelCallExpr *expr, ReturnValueSlot retValue)
virtual mlir::Operation * getKernelHandle (cir::FuncOp fn, GlobalDecl gd)=0
virtual mlir::Operation * getKernelStub (mlir::Operation *handle)=0
virtual void internalizeDeviceSideVar (const VarDecl *d, cir::GlobalLinkageKind &linkage)=0
 Adjust linkage of shadow variables in host compilation.
virtual void handleVarRegistration (const VarDecl *vd, cir::GlobalOp var)=0
 Check whether a variable is a device variable and register it if true.
virtual void finalizeModule ()
 Perform module finalization: on device side, mark ODR-used device variables as compiler-used.
virtual std::string getDeviceSideName (const NamedDecl *nd)=0
 Returns function or variable name on device side even if the current compilation is for host.
virtual void handleGlobalReplace (cir::GlobalOp oldGV, cir::GlobalOp newGV)

Protected Attributes

CIRGenModulecgm

Detailed Description

Definition at line 32 of file CIRGenCUDARuntime.h.

Constructor & Destructor Documentation

◆ CIRGenCUDARuntime()

clang::CIRGen::CIRGenCUDARuntime::CIRGenCUDARuntime ( CIRGenModule & cgm)
inline

Definition at line 37 of file CIRGenCUDARuntime.h.

References cgm.

◆ ~CIRGenCUDARuntime()

CIRGenCUDARuntime::~CIRGenCUDARuntime ( )
virtual

Definition at line 23 of file CIRGenCUDARuntime.cpp.

Member Function Documentation

◆ emitCUDAKernelCallExpr()

◆ emitDeviceStub()

virtual void clang::CIRGen::CIRGenCUDARuntime::emitDeviceStub ( CIRGenFunction & cgf,
cir::FuncOp fn,
FunctionArgList & args )
pure virtual

◆ finalizeModule()

virtual void clang::CIRGen::CIRGenCUDARuntime::finalizeModule ( )
inlinevirtual

Perform module finalization: on device side, mark ODR-used device variables as compiler-used.

Mirrors OG's CGCUDARuntime::finalizeModule.

Definition at line 60 of file CIRGenCUDARuntime.h.

Referenced by clang::CIRGen::CIRGenModule::release().

◆ getDeviceSideName()

virtual std::string clang::CIRGen::CIRGenCUDARuntime::getDeviceSideName ( const NamedDecl * nd)
pure virtual

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

◆ getKernelHandle()

virtual mlir::Operation * clang::CIRGen::CIRGenCUDARuntime::getKernelHandle ( cir::FuncOp fn,
GlobalDecl gd )
pure virtual

◆ getKernelStub()

virtual mlir::Operation * clang::CIRGen::CIRGenCUDARuntime::getKernelStub ( mlir::Operation * handle)
pure virtual

◆ handleGlobalReplace()

virtual void clang::CIRGen::CIRGenCUDARuntime::handleGlobalReplace ( cir::GlobalOp oldGV,
cir::GlobalOp newGV )
inlinevirtual

Definition at line 66 of file CIRGenCUDARuntime.h.

Referenced by clang::CIRGen::CIRGenModule::replaceGlobal().

◆ handleVarRegistration()

virtual void clang::CIRGen::CIRGenCUDARuntime::handleVarRegistration ( const VarDecl * vd,
cir::GlobalOp var )
pure virtual

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

Referenced by clang::CIRGen::CIRGenModule::emitGlobalVarDefinition().

◆ internalizeDeviceSideVar()

virtual void clang::CIRGen::CIRGenCUDARuntime::internalizeDeviceSideVar ( const VarDecl * d,
cir::GlobalLinkageKind & linkage )
pure virtual

Adjust linkage of shadow variables in host compilation.

Referenced by clang::CIRGen::CIRGenModule::emitGlobalVarDefinition().

Member Data Documentation

◆ cgm

CIRGenModule& clang::CIRGen::CIRGenCUDARuntime::cgm
protected

Definition at line 34 of file CIRGenCUDARuntime.h.

Referenced by CIRGenCUDARuntime(), and emitCUDAKernelCallExpr().


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