clang 24.0.0git
clang::CIRGen::OpenMPClauseEmitter Class Reference

Emits OpenMP clauses for a directive, writing results into the auto-generated ClauseOps from the OMP dialect. More...

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

Public Member Functions

 OpenMPClauseEmitter (CIRGenFunction &cgf, CIRGenModule &cgm, CIRGenBuilderTy &builder, mlir::Location loc, llvm::ArrayRef< const OMPClause * > clauses)
bool emitIf (mlir::omp::IfClauseOps &result, llvm::omp::Directive directiveName) const
bool emitMap (mlir::omp::MapClauseOps &result, llvm::SmallVectorImpl< const VarDecl * > *mapSyms=nullptr) const
 Emit map clauses.
bool emitNumThreads (mlir::omp::NumThreadsClauseOps &result) const
bool emitProcBind (mlir::omp::ProcBindClauseOps &result) const
template<typename... SupportedClauses, typename... NYIClauses>
mlir::LogicalResult emitNYI (OpenMPNYIClauseList< NYIClauses... > nyi, llvm::omp::Directive directive) const
 Verify the clauses of a directive to make sure all legal cases are either implemented or give a NYI error.

Detailed Description

Emits OpenMP clauses for a directive, writing results into the auto-generated ClauseOps from the OMP dialect.

Definition at line 30 of file CIRGenOpenMPClause.h.

Constructor & Destructor Documentation

◆ OpenMPClauseEmitter()

clang::CIRGen::OpenMPClauseEmitter::OpenMPClauseEmitter ( CIRGenFunction & cgf,
CIRGenModule & cgm,
CIRGenBuilderTy & builder,
mlir::Location loc,
llvm::ArrayRef< const OMPClause * > clauses )
inline

Definition at line 38 of file CIRGenOpenMPClause.h.

Member Function Documentation

◆ emitIf()

bool OpenMPClauseEmitter::emitIf ( mlir::omp::IfClauseOps & result,
llvm::omp::Directive directiveName ) const

Definition at line 115 of file CIRGenOpenMPClause.cpp.

Referenced by emitParallelClauses().

◆ emitMap()

bool OpenMPClauseEmitter::emitMap ( mlir::omp::MapClauseOps & result,
llvm::SmallVectorImpl< const VarDecl * > * mapSyms = nullptr ) const

Emit map clauses.

The optional mapSyms parameter collects the VarDecls corresponding to each map operand.

Definition at line 143 of file CIRGenOpenMPClause.cpp.

References emitMapInfoForVar(), clang::getOpenMPSimpleClauseTypeName(), mapClauseKindToFlags(), and clang::OMPC_MAP_MODIFIER_unknown.

Referenced by emitTargetClauses().

◆ emitNumThreads()

bool OpenMPClauseEmitter::emitNumThreads ( mlir::omp::NumThreadsClauseOps & result) const

Definition at line 96 of file CIRGenOpenMPClause.cpp.

References clang::ast_matchers::expr.

Referenced by emitParallelClauses().

◆ emitNYI()

template<typename... SupportedClauses, typename... NYIClauses>
mlir::LogicalResult clang::CIRGen::OpenMPClauseEmitter::emitNYI ( OpenMPNYIClauseList< NYIClauses... > nyi,
llvm::omp::Directive directive ) const

Verify the clauses of a directive to make sure all legal cases are either implemented or give a NYI error.

The SupportedClauses and NYIClauses type lists must be disjoint and cover all clauses eligible for the directive being processed. Returns failure if any not-yet-implemented clause was present (and an error was emitted), success otherwise.

Definition at line 72 of file CIRGenOpenMPClause.h.

References clang::isa().

Referenced by emitParallelClauses(), and emitTargetClauses().

◆ emitProcBind()

bool OpenMPClauseEmitter::emitProcBind ( mlir::omp::ProcBindClauseOps & result) const

Definition at line 77 of file CIRGenOpenMPClause.cpp.

References kind.

Referenced by emitParallelClauses().


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