clang 23.0.0git
OMPSplitDirective Class Referencefinal

Represents the '#pragma omp split' loop transformation directive. More...

#include "clang/AST/StmtOpenMP.h"

Inheritance diagram for OMPSplitDirective:
[legend]

Public Member Functions

Stmt * getTransformedStmt () const
 Gets/sets the associated loops after the transformation, i.e.
Stmt * getPreInits () const
 Return preinits statement.

Static Public Member Functions

static OMPSplitDirectiveCreate (const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, unsigned NumLoops, Stmt *AssociatedStmt, Stmt *TransformedStmt, Stmt *PreInits)
 Create a new AST node representation for '#pragma omp split'.
static OMPSplitDirectiveCreateEmpty (const ASTContext &C, unsigned NumClauses, unsigned NumLoops)
 Build an empty '#pragma omp split' AST node for deserialization.
static bool classof (const Stmt *T)

Friends

class ASTStmtReader
class OMPExecutableDirective

Detailed Description

Represents the '#pragma omp split' loop transformation directive.

#pragma omp split counts(3, omp_fill, 2)
for (int i = 0; i < n; ++i)
...

This directive transforms a single loop into multiple loops based on index ranges. The transformation splits the iteration space of the loop into multiple contiguous ranges. The counts clause is required and exactly one list item must be omp_fill.

Definition at line 6080 of file StmtOpenMP.h.

Member Function Documentation

◆ classof()

bool OMPSplitDirective::classof ( const Stmt * T)
inlinestatic

Definition at line 6141 of file StmtOpenMP.h.

◆ Create()

OMPSplitDirective * OMPSplitDirective::Create ( const ASTContext & C,
SourceLocation StartLoc,
SourceLocation EndLoc,
ArrayRef< OMPClause * > Clauses,
unsigned NumLoops,
Stmt * AssociatedStmt,
Stmt * TransformedStmt,
Stmt * PreInits )
static

Create a new AST node representation for '#pragma omp split'.

Parameters
CContext of the AST.
StartLocLocation of the introducer (e.g. the 'omp' token).
EndLocLocation of the directive's end (e.g. the tok::eod).
ClausesThe directive's clauses (e.g. the required counts clause).
NumLoopsNumber of affected loops (should be 1 for split).
AssociatedStmtThe outermost associated loop.
TransformedStmtThe loop nest after splitting, or nullptr in dependent contexts.
PreInitsHelper preinits statements for the loop nest.

Definition at line 556 of file StmtOpenMP.cpp.

References clang::C.

Referenced by clang::SemaOpenMP::ActOnOpenMPSplitDirective().

◆ CreateEmpty()

OMPSplitDirective * OMPSplitDirective::CreateEmpty ( const ASTContext & C,
unsigned NumClauses,
unsigned NumLoops )
static

Build an empty '#pragma omp split' AST node for deserialization.

Parameters
CContext of the AST.
NumClausesNumber of clauses to allocate.
NumLoopsNumber of associated loops to allocate.

Definition at line 568 of file StmtOpenMP.cpp.

References clang::C.

◆ getPreInits()

Stmt * OMPSplitDirective::getPreInits ( ) const
inline

Return preinits statement.

Definition at line 6139 of file StmtOpenMP.h.

◆ getTransformedStmt()

Stmt * OMPSplitDirective::getTransformedStmt ( ) const
inline

Gets/sets the associated loops after the transformation, i.e.

after de-sugaring.

Definition at line 6134 of file StmtOpenMP.h.

Referenced by clang::CodeGen::CodeGenFunction::EmitOMPSplitDirective().

◆ ASTStmtReader

friend class ASTStmtReader
friend

Definition at line 6082 of file StmtOpenMP.h.

References ASTStmtReader.

Referenced by ASTStmtReader.

◆ OMPExecutableDirective

friend class OMPExecutableDirective
friend

Definition at line 6083 of file StmtOpenMP.h.

References OMPExecutableDirective.

Referenced by OMPExecutableDirective.


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