class OMPUnrollDirective

Declaration

class OMPUnrollDirective : public OMPLoopTransformationDirective { /* full declaration omitted */ };

Description

This represents the '#pragma omp unroll' loop transformation directive.

Declared at: clang/include/clang/AST/StmtOpenMP.h:5574

Inherits from: OMPLoopTransformationDirective

Member Variables

Inherited from OMPLoopBasedDirective:

protected NumAssociatedLoops = 0

Inherited from OMPExecutableDirective:

protected Data = nullptr

Inherited from Stmt:

protected

Method Overview

  • public static clang::OMPUnrollDirective * Create(const clang::ASTContext & C, clang::SourceLocation StartLoc, clang::SourceLocation EndLoc, ArrayRef<clang::OMPClause *> Clauses, clang::Stmt * AssociatedStmt, unsigned int NumGeneratedLoops, clang::Stmt * TransformedStmt, clang::Stmt * PreInits)
  • public static clang::OMPUnrollDirective * CreateEmpty(const clang::ASTContext & C, unsigned int NumClauses)
  • private OMPUnrollDirective(clang::SourceLocation StartLoc, clang::SourceLocation EndLoc)
  • public static bool classof(const clang::Stmt * T)
  • public clang::Stmt * getPreInits() const
  • public clang::Stmt * getTransformedStmt() const
  • private void setPreInits(clang::Stmt * PreInits)
  • private void setTransformedStmt(clang::Stmt * S)

Inherited from OMPLoopTransformationDirective:

Inherited from OMPLoopBasedDirective:

Inherited from OMPExecutableDirective:

Inherited from Stmt:

Methods

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

Description

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

Declared at: clang/include/clang/AST/StmtOpenMP.h:5611

Parameters

const clang::ASTContext& C
Context of the AST.
clang::SourceLocation StartLoc
Location of the introducer (e.g. the 'omp' token).
clang::SourceLocation EndLoc
Location of the directive's end (e.g. the tok::eod).
ArrayRef<clang::OMPClause*> Clauses
The directive's clauses.
clang::Stmt* AssociatedStmt
The outermost associated loop.
unsigned int NumGeneratedLoops
clang::Stmt* TransformedStmt
The loop nest after tiling, or nullptr in dependent contexts.
clang::Stmt* PreInits
Helper preinits statements for the loop nest.

static clang::OMPUnrollDirective* CreateEmpty(
    const clang::ASTContext& C,
    unsigned int NumClauses)

Description

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

Declared at: clang/include/clang/AST/StmtOpenMP.h:5619

Parameters

const clang::ASTContext& C
Context of the AST.
unsigned int NumClauses
Number of clauses to allocate.

OMPUnrollDirective(clang::SourceLocation StartLoc,
                   clang::SourceLocation EndLoc)

Declared at: clang/include/clang/AST/StmtOpenMP.h:5584

Parameters

clang::SourceLocation StartLoc
clang::SourceLocation EndLoc

static bool classof(const clang::Stmt* T)

Declared at: clang/include/clang/AST/StmtOpenMP.h:5636

Parameters

const clang::Stmt* T

clang::Stmt* getPreInits() const

Description

Return the pre-init statements.

Declared at: clang/include/clang/AST/StmtOpenMP.h:5634

clang::Stmt* getTransformedStmt() const

Description

Get the de-sugared associated loops after unrolling. This is only used if the unrolled loop becomes an associated loop of another directive, otherwise the loop is emitted directly using loop transformation metadata. When the unrolled loop cannot be used by another directive (e.g. because of the full clause), the transformed stmt can also be nullptr.

Declared at: clang/include/clang/AST/StmtOpenMP.h:5629

void setPreInits(clang::Stmt* PreInits)

Description

Set the pre-init statements.

Declared at: clang/include/clang/AST/StmtOpenMP.h:5590

Parameters

clang::Stmt* PreInits

void setTransformedStmt(clang::Stmt* S)

Description

Set the de-sugared statement.

Declared at: clang/include/clang/AST/StmtOpenMP.h:5595

Parameters

clang::Stmt* S