clang 23.0.0git
CIRGenOpenMPRuntime.cpp File Reference
#include "CIRGenOpenMPRuntime.h"
#include "CIRGenModule.h"
#include "mlir/Dialect/OpenMP/OpenMPDialect.h"
#include "mlir/Dialect/OpenMP/OpenMPInterfaces.h"
#include "clang/AST/OpenMPClause.h"

Go to the source code of this file.

Functions

static mlir::omp::DeclareTargetDeviceType convertDeviceType (OMPDeclareTargetDeclAttr::DevTypeTy devTy)
static mlir::omp::DeclareTargetCaptureClause convertCaptureClause (OMPDeclareTargetDeclAttr::MapTypeTy mapTy)
static bool isAssumedToBeNotEmitted (const ValueDecl *vd, bool isDevice)
 Returns true if the declaration should be skipped based on its device_type attribute and the current compilation mode.
static bool containsTargetRegion (const Stmt *s)
 Recursively check whether the statement tree contains any OpenMP target execution directive (e.g.

Function Documentation

◆ containsTargetRegion()

bool containsTargetRegion ( const Stmt * s)
static

Recursively check whether the statement tree contains any OpenMP target execution directive (e.g.

'omp target', 'omp target parallel', etc.). Used to identify host functions that must be emitted on the device because they contain target regions that will be outlined during MLIR lowering.

Definition at line 71 of file CIRGenOpenMPRuntime.cpp.

References containsTargetRegion(), clang::isOpenMPTargetExecutionDirective(), and s.

Referenced by containsTargetRegion().

◆ convertCaptureClause()

mlir::omp::DeclareTargetCaptureClause convertCaptureClause ( OMPDeclareTargetDeclAttr::MapTypeTy mapTy)
static

◆ convertDeviceType()

mlir::omp::DeclareTargetDeviceType convertDeviceType ( OMPDeclareTargetDeclAttr::DevTypeTy devTy)
static

◆ isAssumedToBeNotEmitted()

bool isAssumedToBeNotEmitted ( const ValueDecl * vd,
bool isDevice )
static

Returns true if the declaration should be skipped based on its device_type attribute and the current compilation mode.

Definition at line 53 of file CIRGenOpenMPRuntime.cpp.

Referenced by clang::CodeGen::CGOpenMPRuntime::emitTargetFunctions(), and clang::CodeGen::CGOpenMPRuntime::emitTargetGlobalVariable().