clang 24.0.0git
clang::CIRGen::CIRGenOpenMPRuntime Class Reference

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

Public Member Functions

 CIRGenOpenMPRuntime (CIRGenModule &cgm)
bool emitTargetGlobal (GlobalDecl gd)
 Check whether the given GlobalDecl needs special handling for device compilation.
bool markAsGlobalTarget (GlobalDecl gd)
 Mark a function reference as one that should be emitted on the device.
void registerTargetGlobalVariable (const VarDecl *vd)
 Register a global variable that may need an offload entry.
bool hasRequiresUnifiedSharedMemory () const
 Return whether unified shared memory is required.
void emitDeclareTargetFunction (const FunctionDecl *fd, cir::FuncOp funcOp)
 If the function has an OMPDeclareTargetDeclAttr, set the corresponding omp.declare_target attribute on the emitted cir.func op.

Detailed Description

Definition at line 22 of file CIRGenOpenMPRuntime.h.

Constructor & Destructor Documentation

◆ CIRGenOpenMPRuntime()

clang::CIRGen::CIRGenOpenMPRuntime::CIRGenOpenMPRuntime ( CIRGenModule & cgm)
inlineexplicit

Definition at line 39 of file CIRGenOpenMPRuntime.h.

Member Function Documentation

◆ emitDeclareTargetFunction()

void CIRGenOpenMPRuntime::emitDeclareTargetFunction ( const FunctionDecl * fd,
cir::FuncOp funcOp )

If the function has an OMPDeclareTargetDeclAttr, set the corresponding omp.declare_target attribute on the emitted cir.func op.

Definition at line 208 of file CIRGenOpenMPRuntime.cpp.

References convertCaptureClause(), convertDeviceType(), clang::Decl::getAttr(), and clang::FunctionDecl::getSourceRange().

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

◆ emitTargetGlobal()

bool CIRGenOpenMPRuntime::emitTargetGlobal ( GlobalDecl gd)

Check whether the given GlobalDecl needs special handling for device compilation.

Returns false if it should be emitted, true if it should be skipped.

Definition at line 148 of file CIRGenOpenMPRuntime.cpp.

References clang::GlobalDecl::getDecl(), and clang::isa().

◆ hasRequiresUnifiedSharedMemory()

bool CIRGenOpenMPRuntime::hasRequiresUnifiedSharedMemory ( ) const

Return whether unified shared memory is required.

Definition at line 202 of file CIRGenOpenMPRuntime.cpp.

References cir::MissingFeatures::openMPRequiresUnifiedSharedMemory().

Referenced by emitDeclTargetVarDeclLValue().

◆ markAsGlobalTarget()

bool CIRGenOpenMPRuntime::markAsGlobalTarget ( GlobalDecl gd)

Mark a function reference as one that should be emitted on the device.

Returns false if it should be emitted, true if the function is already handled and should be skipped.

Definition at line 156 of file CIRGenOpenMPRuntime.cpp.

References clang::cast(), and clang::GlobalDecl::getDecl().

◆ registerTargetGlobalVariable()

void CIRGenOpenMPRuntime::registerTargetGlobalVariable ( const VarDecl * vd)

Register a global variable that may need an offload entry.

Definition at line 177 of file CIRGenOpenMPRuntime.cpp.

References clang::VarDecl::getSourceRange(), clang::VarDecl::hasExternalStorage(), and cir::MissingFeatures::openMP().


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