class OMPLoopBasedDirective

Declaration

class OMPLoopBasedDirective : public OMPExecutableDirective { /* full declaration omitted */ };

Description

The base class for all loop-based directives, including loop transformation directives.

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

Inherits from: OMPExecutableDirective

Member Variables

protected unsigned int NumAssociatedLoops = 0
Number of collapsed loops as specified by 'collapse' clause.

Inherited from OMPExecutableDirective:

protected Data = nullptr

Inherited from Stmt:

protected

Method Overview

  • protected OMPLoopBasedDirective(clang::Stmt::StmtClass SC, clang::OpenMPDirectiveKind Kind, clang::SourceLocation StartLoc, clang::SourceLocation EndLoc, unsigned int NumAssociatedLoops)
  • public static bool classof(const clang::Stmt * T)
  • public static bool doForAllLoops(clang::Stmt * CurStmt, bool TryImperfectlyNestedLoops, unsigned int NumLoops, llvm::function_ref<bool (unsigned int, Stmt *)> Callback, llvm::function_ref<void (OMPLoopTransformationDirective *)> OnTransformationCallback)
  • public static bool doForAllLoops(const clang::Stmt * CurStmt, bool TryImperfectlyNestedLoops, unsigned int NumLoops, llvm::function_ref<bool (unsigned int, const Stmt *)> Callback, llvm::function_ref<void (const OMPLoopTransformationDirective *)> OnTransformationCallback)
  • public static bool doForAllLoops(clang::Stmt * CurStmt, bool TryImperfectlyNestedLoops, unsigned int NumLoops, llvm::function_ref<bool (unsigned int, Stmt *)> Callback)
  • public static bool doForAllLoops(const clang::Stmt * CurStmt, bool TryImperfectlyNestedLoops, unsigned int NumLoops, llvm::function_ref<bool (unsigned int, const Stmt *)> Callback)
  • public static void doForAllLoopsBodies(clang::Stmt * CurStmt, bool TryImperfectlyNestedLoops, unsigned int NumLoops, llvm::function_ref<void (unsigned int, Stmt *, Stmt *)> Callback)
  • public static void doForAllLoopsBodies(const clang::Stmt * CurStmt, bool TryImperfectlyNestedLoops, unsigned int NumLoops, llvm::function_ref<void (unsigned int, const Stmt *, const Stmt *)> Callback)
  • public unsigned int getLoopsNumber() const
  • public static clang::Stmt * tryToFindNextInnerLoop(clang::Stmt * CurStmt, bool TryImperfectlyNestedLoops)
  • public static const clang::Stmt * tryToFindNextInnerLoop(const clang::Stmt * CurStmt, bool TryImperfectlyNestedLoops)

Inherited from OMPExecutableDirective:

Inherited from Stmt:

Methods

OMPLoopBasedDirective(
    clang::Stmt::StmtClass SC,
    clang::OpenMPDirectiveKind Kind,
    clang::SourceLocation StartLoc,
    clang::SourceLocation EndLoc,
    unsigned int NumAssociatedLoops)

Description

Build instance of loop directive of class \a Kind.

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

Parameters

clang::Stmt::StmtClass SC
Statement class.
clang::OpenMPDirectiveKind Kind
Kind of OpenMP directive.
clang::SourceLocation StartLoc
Starting location of the directive (directive keyword).
clang::SourceLocation EndLoc
Ending location of the directive.
unsigned int NumAssociatedLoops
Number of loops associated with the construct.

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

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

Parameters

const clang::Stmt* T

static bool doForAllLoops(
    clang::Stmt* CurStmt,
    bool TryImperfectlyNestedLoops,
    unsigned int NumLoops,
    llvm::function_ref<bool(unsigned int, Stmt*)>
        Callback,
    llvm::function_ref<
        void(OMPLoopTransformationDirective*)>
        OnTransformationCallback)

Description

Calls the specified callback function for all the loops in \p CurStmt, from the outermost to the innermost.

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

Parameters

clang::Stmt* CurStmt
bool TryImperfectlyNestedLoops
unsigned int NumLoops
llvm::function_ref<bool(unsigned int, Stmt*)> Callback
llvm::function_ref<void( OMPLoopTransformationDirective*)> OnTransformationCallback

static bool doForAllLoops(
    const clang::Stmt* CurStmt,
    bool TryImperfectlyNestedLoops,
    unsigned int NumLoops,
    llvm::function_ref<
        bool(unsigned int, const Stmt*)> Callback,
    llvm::function_ref<void(
        const OMPLoopTransformationDirective*)>
        OnTransformationCallback)

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

Parameters

const clang::Stmt* CurStmt
bool TryImperfectlyNestedLoops
unsigned int NumLoops
llvm::function_ref<bool(unsigned int, const Stmt*)> Callback
llvm::function_ref<void( const OMPLoopTransformationDirective*)> OnTransformationCallback

static bool doForAllLoops(
    clang::Stmt* CurStmt,
    bool TryImperfectlyNestedLoops,
    unsigned int NumLoops,
    llvm::function_ref<bool(unsigned int, Stmt*)>
        Callback)

Description

Calls the specified callback function for all the loops in \p CurStmt, from the outermost to the innermost.

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

Parameters

clang::Stmt* CurStmt
bool TryImperfectlyNestedLoops
unsigned int NumLoops
llvm::function_ref<bool(unsigned int, Stmt*)> Callback

static bool doForAllLoops(
    const clang::Stmt* CurStmt,
    bool TryImperfectlyNestedLoops,
    unsigned int NumLoops,
    llvm::function_ref<
        bool(unsigned int, const Stmt*)> Callback)

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

Parameters

const clang::Stmt* CurStmt
bool TryImperfectlyNestedLoops
unsigned int NumLoops
llvm::function_ref<bool(unsigned int, const Stmt*)> Callback

static void doForAllLoopsBodies(
    clang::Stmt* CurStmt,
    bool TryImperfectlyNestedLoops,
    unsigned int NumLoops,
    llvm::function_ref<void(unsigned int,
                            Stmt*,
                            Stmt*)> Callback)

Description

Calls the specified callback function for all the loop bodies in \p CurStmt, from the outermost loop to the innermost.

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

Parameters

clang::Stmt* CurStmt
bool TryImperfectlyNestedLoops
unsigned int NumLoops
llvm::function_ref< void(unsigned int, Stmt*, Stmt*)> Callback

static void doForAllLoopsBodies(
    const clang::Stmt* CurStmt,
    bool TryImperfectlyNestedLoops,
    unsigned int NumLoops,
    llvm::function_ref<void(unsigned int,
                            const Stmt*,
                            const Stmt*)>
        Callback)

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

Parameters

const clang::Stmt* CurStmt
bool TryImperfectlyNestedLoops
unsigned int NumLoops
llvm::function_ref< void(unsigned int, const Stmt*, const Stmt*)> Callback

unsigned int getLoopsNumber() const

Description

Get number of collapsed loops.

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

static clang::Stmt* tryToFindNextInnerLoop(
    clang::Stmt* CurStmt,
    bool TryImperfectlyNestedLoops)

Description

Try to find the next loop sub-statement in the specified statement \p CurStmt.

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

Parameters

clang::Stmt* CurStmt
bool TryImperfectlyNestedLoops
true, if we need to try to look for the imperfectly nested loop.

static const clang::Stmt* tryToFindNextInnerLoop(
    const clang::Stmt* CurStmt,
    bool TryImperfectlyNestedLoops)

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

Parameters

const clang::Stmt* CurStmt
bool TryImperfectlyNestedLoops