clang
3.7.0
|
This is a common base class for loop directives ('omp simd', 'omp for', 'omp for simd' etc.). It is responsible for the loop code generation. More...
#include <StmtOpenMP.h>
Classes | |
struct | HelperExprs |
The expressions built for the OpenMP loop CodeGen for the whole collapsed loop nest. More... | |
Public Member Functions | |
unsigned | getCollapsedNumber () const |
Get number of collapsed loops. More... | |
Expr * | getIterationVariable () const |
Expr * | getLastIteration () const |
Expr * | getCalcLastIteration () const |
Expr * | getPreCond () const |
Expr * | getCond () const |
Expr * | getInit () const |
Expr * | getInc () const |
Expr * | getIsLastIterVariable () const |
Expr * | getLowerBoundVariable () const |
Expr * | getUpperBoundVariable () const |
Expr * | getStrideVariable () const |
Expr * | getEnsureUpperBound () const |
Expr * | getNextLowerBound () const |
Expr * | getNextUpperBound () const |
const Stmt * | getBody () const |
ArrayRef< Expr * > | counters () |
ArrayRef< Expr * > | counters () const |
ArrayRef< Expr * > | inits () |
ArrayRef< Expr * > | inits () const |
ArrayRef< Expr * > | updates () |
ArrayRef< Expr * > | updates () const |
ArrayRef< Expr * > | finals () |
ArrayRef< Expr * > | finals () const |
![]() | |
template<typename Fn > | |
filtered_clause_iterator< Fn > | getFilteredClauses (Fn &&fn) const |
filtered_clause_iterator < ClauseKindFilter > | getClausesOfKind (OpenMPClauseKind Kind) const |
const OMPClause * | getSingleClause (OpenMPClauseKind K) const |
Gets a single clause of the specified kind K associated with the current directive iff there is only one clause of this kind (and assertion is fired if there is more than one clause is associated with the directive). Returns nullptr if no clause of kind K is associated with the directive. More... | |
SourceLocation | getLocStart () const |
Returns starting location of directive kind. More... | |
SourceLocation | getLocEnd () const |
Returns ending location of directive. More... | |
void | setLocStart (SourceLocation Loc) |
Set starting location of directive kind. More... | |
void | setLocEnd (SourceLocation Loc) |
Set ending location of directive. More... | |
unsigned | getNumClauses () const |
Get number of clauses. More... | |
OMPClause * | getClause (unsigned i) const |
Returns specified clause. More... | |
bool | hasAssociatedStmt () const |
Returns true if directive has associated statement. More... | |
Stmt * | getAssociatedStmt () const |
Returns statement associated with the directive. More... | |
OpenMPDirectiveKind | getDirectiveKind () const |
child_range | children () |
ArrayRef< OMPClause * > | clauses () |
ArrayRef< OMPClause * > | clauses () const |
Static Public Member Functions | |
static bool | classof (const Stmt *T) |
![]() | |
static bool | classof (const Stmt *S) |
Protected Member Functions | |
template<typename T > | |
OMPLoopDirective (const T *That, StmtClass SC, OpenMPDirectiveKind Kind, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, unsigned NumClauses, unsigned NumSpecialChildren=0) | |
Build instance of loop directive of class Kind. More... | |
void | setIterationVariable (Expr *IV) |
void | setLastIteration (Expr *LI) |
void | setCalcLastIteration (Expr *CLI) |
void | setPreCond (Expr *PC) |
void | setCond (Expr *Cond) |
void | setInit (Expr *Init) |
void | setInc (Expr *Inc) |
void | setIsLastIterVariable (Expr *IL) |
void | setLowerBoundVariable (Expr *LB) |
void | setUpperBoundVariable (Expr *UB) |
void | setStrideVariable (Expr *ST) |
void | setEnsureUpperBound (Expr *EUB) |
void | setNextLowerBound (Expr *NLB) |
void | setNextUpperBound (Expr *NUB) |
void | setCounters (ArrayRef< Expr * > A) |
void | setInits (ArrayRef< Expr * > A) |
void | setUpdates (ArrayRef< Expr * > A) |
void | setFinals (ArrayRef< Expr * > A) |
![]() | |
template<typename T > | |
OMPExecutableDirective (const T *, StmtClass SC, OpenMPDirectiveKind K, SourceLocation StartLoc, SourceLocation EndLoc, unsigned NumClauses, unsigned NumChildren) | |
Build instance of directive of class K. More... | |
void | setClauses (ArrayRef< OMPClause * > Clauses) |
Sets the list of variables for this clause. More... | |
void | setAssociatedStmt (Stmt *S) |
Set the associated statement for the directive. More... | |
Static Protected Member Functions | |
static unsigned | getArraysOffset (OpenMPDirectiveKind Kind) |
Offset to the start of children expression arrays. More... | |
static unsigned | numLoopChildren (unsigned CollapsedNum, OpenMPDirectiveKind Kind) |
Children number. More... | |
Friends | |
class | ASTStmtReader |
This is a common base class for loop directives ('omp simd', 'omp for', 'omp for simd' etc.). It is responsible for the loop code generation.
Definition at line 268 of file StmtOpenMP.h.
|
inlineprotected |
Build instance of loop directive of class Kind.
SC | Statement class. |
Kind | Kind of OpenMP directive. |
StartLoc | Starting location of the directive (directive keyword). |
EndLoc | Ending location of the directive. |
CollapsedNum | Number of collapsed loops from 'collapse' clause. |
NumClauses | Number of clauses. |
NumSpecialChildren | Number of additional directive-specific stmts. |
Definition at line 350 of file StmtOpenMP.h.
Definition at line 618 of file StmtOpenMP.h.
Definition at line 594 of file StmtOpenMP.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPSimdDirective(), and emitPreCond().
Definition at line 596 of file StmtOpenMP.h.
Definition at line 612 of file StmtOpenMP.h.
Definition at line 614 of file StmtOpenMP.h.
|
inlinestaticprotected |
Offset to the start of children expression arrays.
Definition at line 360 of file StmtOpenMP.h.
References clang::isOpenMPWorksharingDirective().
Referenced by numLoopChildren().
|
inline |
Definition at line 583 of file StmtOpenMP.h.
References clang::OMPExecutableDirective::getAssociatedStmt().
|
inline |
Definition at line 521 of file StmtOpenMP.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPSimdDirective().
|
inline |
Get number of collapsed loops.
Definition at line 511 of file StmtOpenMP.h.
Referenced by setCounters(), setFinals(), setInits(), and setUpdates().
|
inline |
Definition at line 529 of file StmtOpenMP.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPSimdDirective().
|
inline |
Definition at line 565 of file StmtOpenMP.h.
References clang::OMPExecutableDirective::getDirectiveKind(), and clang::isOpenMPWorksharingDirective().
|
inline |
Definition at line 537 of file StmtOpenMP.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPSimdDirective().
|
inline |
Definition at line 533 of file StmtOpenMP.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPSimdDirective().
|
inline |
Definition at line 541 of file StmtOpenMP.h.
References clang::OMPExecutableDirective::getDirectiveKind(), and clang::isOpenMPWorksharingDirective().
|
inline |
Definition at line 513 of file StmtOpenMP.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPSimdDirective(), and emitScheduleClause().
|
inline |
Definition at line 517 of file StmtOpenMP.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPSimdDirective().
|
inline |
Definition at line 547 of file StmtOpenMP.h.
References clang::OMPExecutableDirective::getDirectiveKind(), and clang::isOpenMPWorksharingDirective().
|
inline |
Definition at line 571 of file StmtOpenMP.h.
References clang::OMPExecutableDirective::getDirectiveKind(), and clang::isOpenMPWorksharingDirective().
|
inline |
Definition at line 577 of file StmtOpenMP.h.
References clang::OMPExecutableDirective::getDirectiveKind(), and clang::isOpenMPWorksharingDirective().
|
inline |
Definition at line 525 of file StmtOpenMP.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPSimdDirective().
|
inline |
Definition at line 559 of file StmtOpenMP.h.
References clang::OMPExecutableDirective::getDirectiveKind(), and clang::isOpenMPWorksharingDirective().
|
inline |
Definition at line 553 of file StmtOpenMP.h.
References clang::OMPExecutableDirective::getDirectiveKind(), and clang::isOpenMPWorksharingDirective().
Definition at line 600 of file StmtOpenMP.h.
Referenced by emitPreCond().
Definition at line 602 of file StmtOpenMP.h.
|
inlinestaticprotected |
Children number.
Definition at line 366 of file StmtOpenMP.h.
References getArraysOffset().
Referenced by clang::OMPSimdDirective::Create(), clang::OMPForDirective::Create(), clang::OMPForSimdDirective::Create(), clang::OMPParallelForDirective::Create(), clang::OMPParallelForSimdDirective::Create(), clang::OMPSimdDirective::CreateEmpty(), clang::OMPForDirective::CreateEmpty(), clang::OMPForSimdDirective::CreateEmpty(), clang::OMPParallelForDirective::CreateEmpty(), and clang::OMPParallelForSimdDirective::CreateEmpty().
|
inlineprotected |
Definition at line 378 of file StmtOpenMP.h.
Referenced by clang::OMPSimdDirective::Create(), clang::OMPForDirective::Create(), clang::OMPForSimdDirective::Create(), clang::OMPParallelForDirective::Create(), and clang::OMPParallelForSimdDirective::Create().
|
inlineprotected |
Definition at line 384 of file StmtOpenMP.h.
Referenced by clang::OMPSimdDirective::Create(), clang::OMPForDirective::Create(), clang::OMPForSimdDirective::Create(), clang::OMPParallelForDirective::Create(), and clang::OMPParallelForSimdDirective::Create().
Definition at line 1498 of file Stmt.cpp.
References getCollapsedNumber().
Referenced by clang::OMPSimdDirective::Create(), clang::OMPForDirective::Create(), clang::OMPForSimdDirective::Create(), clang::OMPParallelForDirective::Create(), and clang::OMPParallelForSimdDirective::Create().
|
inlineprotected |
Definition at line 409 of file StmtOpenMP.h.
References clang::OMPExecutableDirective::getDirectiveKind(), and clang::isOpenMPWorksharingDirective().
Referenced by clang::OMPForDirective::Create(), clang::OMPForSimdDirective::Create(), clang::OMPParallelForDirective::Create(), and clang::OMPParallelForSimdDirective::Create().
Definition at line 1516 of file Stmt.cpp.
References getCollapsedNumber().
Referenced by clang::OMPSimdDirective::Create(), clang::OMPForDirective::Create(), clang::OMPForSimdDirective::Create(), clang::OMPParallelForDirective::Create(), and clang::OMPParallelForSimdDirective::Create().
|
inlineprotected |
Definition at line 388 of file StmtOpenMP.h.
Referenced by clang::OMPSimdDirective::Create(), clang::OMPForDirective::Create(), clang::OMPForSimdDirective::Create(), clang::OMPParallelForDirective::Create(), and clang::OMPParallelForSimdDirective::Create().
|
inlineprotected |
Definition at line 387 of file StmtOpenMP.h.
Referenced by clang::OMPSimdDirective::Create(), clang::OMPForDirective::Create(), clang::OMPForSimdDirective::Create(), clang::OMPParallelForDirective::Create(), and clang::OMPParallelForSimdDirective::Create().
Definition at line 1504 of file Stmt.cpp.
References getCollapsedNumber().
Referenced by clang::OMPSimdDirective::Create(), clang::OMPForDirective::Create(), clang::OMPForSimdDirective::Create(), clang::OMPParallelForDirective::Create(), and clang::OMPParallelForSimdDirective::Create().
|
inlineprotected |
Definition at line 389 of file StmtOpenMP.h.
References clang::OMPExecutableDirective::getDirectiveKind(), and clang::isOpenMPWorksharingDirective().
Referenced by clang::OMPForDirective::Create(), clang::OMPForSimdDirective::Create(), clang::OMPParallelForDirective::Create(), and clang::OMPParallelForSimdDirective::Create().
|
inlineprotected |
Definition at line 372 of file StmtOpenMP.h.
Referenced by clang::OMPSimdDirective::Create(), clang::OMPForDirective::Create(), clang::OMPForSimdDirective::Create(), clang::OMPParallelForDirective::Create(), and clang::OMPParallelForSimdDirective::Create().
|
inlineprotected |
Definition at line 375 of file StmtOpenMP.h.
Referenced by clang::OMPSimdDirective::Create(), clang::OMPForDirective::Create(), clang::OMPForSimdDirective::Create(), clang::OMPParallelForDirective::Create(), and clang::OMPParallelForSimdDirective::Create().
|
inlineprotected |
Definition at line 394 of file StmtOpenMP.h.
References clang::OMPExecutableDirective::getDirectiveKind(), and clang::isOpenMPWorksharingDirective().
Referenced by clang::OMPForDirective::Create(), clang::OMPForSimdDirective::Create(), clang::OMPParallelForDirective::Create(), and clang::OMPParallelForSimdDirective::Create().
|
inlineprotected |
Definition at line 414 of file StmtOpenMP.h.
References clang::OMPExecutableDirective::getDirectiveKind(), and clang::isOpenMPWorksharingDirective().
Referenced by clang::OMPForDirective::Create(), clang::OMPForSimdDirective::Create(), clang::OMPParallelForDirective::Create(), and clang::OMPParallelForSimdDirective::Create().
|
inlineprotected |
Definition at line 419 of file StmtOpenMP.h.
References clang::OMPExecutableDirective::getDirectiveKind(), and clang::isOpenMPWorksharingDirective().
Referenced by clang::OMPForDirective::Create(), clang::OMPForSimdDirective::Create(), clang::OMPParallelForDirective::Create(), and clang::OMPParallelForSimdDirective::Create().
|
inlineprotected |
Definition at line 381 of file StmtOpenMP.h.
Referenced by clang::OMPSimdDirective::Create(), clang::OMPForDirective::Create(), clang::OMPForSimdDirective::Create(), clang::OMPParallelForDirective::Create(), and clang::OMPParallelForSimdDirective::Create().
|
inlineprotected |
Definition at line 404 of file StmtOpenMP.h.
References clang::OMPExecutableDirective::getDirectiveKind(), and clang::isOpenMPWorksharingDirective().
Referenced by clang::OMPForDirective::Create(), clang::OMPForSimdDirective::Create(), clang::OMPParallelForDirective::Create(), and clang::OMPParallelForSimdDirective::Create().
Definition at line 1510 of file Stmt.cpp.
References getCollapsedNumber().
Referenced by clang::OMPSimdDirective::Create(), clang::OMPForDirective::Create(), clang::OMPForSimdDirective::Create(), clang::OMPParallelForDirective::Create(), and clang::OMPParallelForSimdDirective::Create().
|
inlineprotected |
Definition at line 399 of file StmtOpenMP.h.
References clang::OMPExecutableDirective::getDirectiveKind(), and clang::isOpenMPWorksharingDirective().
Referenced by clang::OMPForDirective::Create(), clang::OMPForSimdDirective::Create(), clang::OMPParallelForDirective::Create(), and clang::OMPParallelForSimdDirective::Create().
Definition at line 606 of file StmtOpenMP.h.
Definition at line 608 of file StmtOpenMP.h.
|
friend |
Definition at line 269 of file StmtOpenMP.h.