clang 24.0.0git
OMPFlattenDirective Class Referencefinal

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

#include "clang/AST/StmtOpenMP.h"

Inheritance diagram for OMPFlattenDirective:
[legend]

Public Member Functions

Stmt * getTransformedStmt () const
 Gets the flattened loop after the transformation.
Stmt * getPreInits () const
 Return preinits statement.
Stmt * getFinals () const
 Return updates to the original loop variables after the flattened loop.
Public Member Functions inherited from OMPCanonicalLoopNestTransformationDirective
unsigned getNumAssociatedLoops () const
 Return the number of associated (consumed) loops.
StmtgetTransformedStmt () const
 Get the de-sugared statements after the loop transformation.
StmtgetPreInits () const
 Return preinits statement.
Public Member Functions inherited from OMPLoopTransformationDirective
unsigned getNumGeneratedTopLevelLoops () const
Stmt * getDirective () const
 Returns the specific directive related to this loop transformation.
StmtgetTransformedStmt () const
 Get the de-sugared statements after the loop transformation.
StmtgetPreInits () const
 Return preinits statement.

Static Public Member Functions

static OMPFlattenDirectiveCreate (const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, unsigned NumLoops, Stmt *AssociatedStmt, Stmt *TransformedStmt, Stmt *PreInits, Stmt *Finals)
 Create a new AST node representation for '#pragma omp flatten'.
static OMPFlattenDirectiveCreateEmpty (const ASTContext &C, unsigned NumClauses, unsigned NumLoops)
 Build an empty '#pragma omp flatten' AST node for deserialization.
static bool classof (const Stmt *T)
Static Public Member Functions inherited from OMPCanonicalLoopNestTransformationDirective
static bool classof (const Stmt *T)
Static Public Member Functions inherited from OMPLoopTransformationDirective
static bool classof (const Stmt *T)

Friends

class ASTStmtReader
class OMPExecutableDirective

Additional Inherited Members

Protected Member Functions inherited from OMPCanonicalLoopNestTransformationDirective
 OMPCanonicalLoopNestTransformationDirective (StmtClass SC, OpenMPDirectiveKind Kind, SourceLocation StartLoc, SourceLocation EndLoc, unsigned NumAssociatedLoops)
Protected Member Functions inherited from OMPLoopTransformationDirective
void setNumGeneratedTopLevelLoops (unsigned N)
 OMPLoopTransformationDirective (Stmt *S)

Detailed Description

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

#pragma omp flatten
for (int i = 0; i < m; ++i)
for (int j = 0; j < n; ++j)
..

Definition at line 6055 of file StmtOpenMP.h.

Member Function Documentation

◆ classof()

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

Definition at line 6122 of file StmtOpenMP.h.

◆ Create()

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

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

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.
NumLoopsNumber of affected loops (the flatten depth: the argument of the 'depth' clause, or 2 if omitted).
AssociatedStmtThe outermost associated loop.
TransformedStmtThe flattened loop, or nullptr in dependent contexts.
PreInitsHelper preinits statements for the loop nest.
FinalsUpdates to the original loop variables after the loop.

Definition at line 607 of file StmtOpenMP.cpp.

References clang::C.

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

◆ CreateEmpty()

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

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

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

Definition at line 619 of file StmtOpenMP.cpp.

References clang::C.

◆ getFinals()

Stmt * OMPFlattenDirective::getFinals ( ) const
inline

Return updates to the original loop variables after the flattened loop.

Definition at line 6120 of file StmtOpenMP.h.

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

◆ getPreInits()

Stmt * OMPFlattenDirective::getPreInits ( ) const
inline

Return preinits statement.

Definition at line 6117 of file StmtOpenMP.h.

◆ getTransformedStmt()

Stmt * OMPFlattenDirective::getTransformedStmt ( ) const
inline

Gets the flattened loop after the transformation.

This is the de-sugared replacement or nullptr in dependent contexts.

Definition at line 6112 of file StmtOpenMP.h.

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

◆ ASTStmtReader

friend class ASTStmtReader
friend

Definition at line 6057 of file StmtOpenMP.h.

References ASTStmtReader.

Referenced by ASTStmtReader.

◆ OMPExecutableDirective

friend class OMPExecutableDirective
friend

Definition at line 6058 of file StmtOpenMP.h.

References OMPExecutableDirective.

Referenced by OMPExecutableDirective.


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