clang 23.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 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 175 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 147 of file CIRGenOpenMPRuntime.cpp.

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

◆ 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 155 of file CIRGenOpenMPRuntime.cpp.

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


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