clang API Documentation
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>
Public Member Functions | |
unsigned | getCollapsedNumber () const |
Get number of collapsed loops. | |
Expr * | getIterationVariable () const |
Expr * | getLastIteration () const |
Expr * | getCalcLastIteration () const |
Expr * | getPreCond () const |
Expr * | getCond (bool SeparateIter) const |
Expr * | getInit () const |
Expr * | getInc () const |
const Stmt * | getBody () const |
ArrayRef< Expr * > | counters () |
ArrayRef< Expr * > | counters () const |
ArrayRef< Expr * > | updates () |
ArrayRef< Expr * > | updates () const |
ArrayRef< Expr * > | finals () |
ArrayRef< Expr * > | finals () const |
Static Public Member Functions | |
static bool | classof (const Stmt *T) |
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. | |
void | setIterationVariable (Expr *IV) |
void | setLastIteration (Expr *LI) |
void | setCalcLastIteration (Expr *CLI) |
void | setPreCond (Expr *PC) |
void | setCond (Expr *Cond, Expr *SeparatedCond) |
void | setInit (Expr *Init) |
void | setInc (Expr *Inc) |
void | setCounters (ArrayRef< Expr * > A) |
void | setUpdates (ArrayRef< Expr * > A) |
void | setFinals (ArrayRef< Expr * > A) |
Static Protected Member Functions | |
static unsigned | numLoopChildren (unsigned CollapsedNum) |
Children number. | |
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 251 of file StmtOpenMP.h.
clang::OMPLoopDirective::OMPLoopDirective | ( | const T * | That, |
StmtClass | SC, | ||
OpenMPDirectiveKind | Kind, | ||
SourceLocation | StartLoc, | ||
SourceLocation | EndLoc, | ||
unsigned | CollapsedNum, | ||
unsigned | NumClauses, | ||
unsigned | NumSpecialChildren = 0 |
||
) | [inline, protected] |
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 303 of file StmtOpenMP.h.
static bool clang::OMPLoopDirective::classof | ( | const Stmt * | T | ) | [inline, static] |
Reimplemented from clang::OMPExecutableDirective.
Reimplemented in clang::OMPParallelForSimdDirective, clang::OMPParallelForDirective, clang::OMPForSimdDirective, clang::OMPForDirective, and clang::OMPSimdDirective.
Definition at line 401 of file StmtOpenMP.h.
References clang::Stmt::getStmtClass().
ArrayRef<Expr *> clang::OMPLoopDirective::counters | ( | ) | [inline] |
Definition at line 383 of file StmtOpenMP.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPSimdDirective(), and clang::CodeGen::CodeGenFunction::EmitOMPSimdFinal().
ArrayRef<Expr *> clang::OMPLoopDirective::counters | ( | ) | const [inline] |
Definition at line 385 of file StmtOpenMP.h.
ArrayRef<Expr *> clang::OMPLoopDirective::finals | ( | ) | [inline] |
Definition at line 395 of file StmtOpenMP.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPSimdFinal().
ArrayRef<Expr *> clang::OMPLoopDirective::finals | ( | ) | const [inline] |
Definition at line 397 of file StmtOpenMP.h.
const Stmt* clang::OMPLoopDirective::getBody | ( | ) | const [inline] |
Definition at line 372 of file StmtOpenMP.h.
References clang::OMPExecutableDirective::getAssociatedStmt(), and clang::Stmt::IgnoreContainers().
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPLoopBody().
Expr* clang::OMPLoopDirective::getCalcLastIteration | ( | ) | const [inline] |
Definition at line 351 of file StmtOpenMP.h.
References clang::Stmt::child_begin().
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPSimdDirective().
unsigned clang::OMPLoopDirective::getCollapsedNumber | ( | ) | const [inline] |
Get number of collapsed loops.
Definition at line 341 of file StmtOpenMP.h.
Referenced by setCounters(), setFinals(), and setUpdates().
Expr* clang::OMPLoopDirective::getCond | ( | bool | SeparateIter | ) | const [inline] |
Definition at line 359 of file StmtOpenMP.h.
References clang::Stmt::child_begin().
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPInnerLoop().
Expr* clang::OMPLoopDirective::getInc | ( | ) | const [inline] |
Definition at line 368 of file StmtOpenMP.h.
References clang::Stmt::child_begin().
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPInnerLoop().
Expr* clang::OMPLoopDirective::getInit | ( | ) | const [inline] |
Definition at line 364 of file StmtOpenMP.h.
References clang::Stmt::child_begin().
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPSimdDirective().
Expr* clang::OMPLoopDirective::getIterationVariable | ( | ) | const [inline] |
Definition at line 343 of file StmtOpenMP.h.
References clang::Stmt::child_begin().
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPSimdDirective().
Expr* clang::OMPLoopDirective::getLastIteration | ( | ) | const [inline] |
Definition at line 347 of file StmtOpenMP.h.
References clang::Stmt::child_begin().
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPSimdDirective().
Expr* clang::OMPLoopDirective::getPreCond | ( | ) | const [inline] |
Definition at line 355 of file StmtOpenMP.h.
References clang::Stmt::child_begin().
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPSimdDirective().
static unsigned clang::OMPLoopDirective::numLoopChildren | ( | unsigned | CollapsedNum | ) | [inline, static, protected] |
Children number.
Definition at line 313 of file StmtOpenMP.h.
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().
void clang::OMPLoopDirective::setCalcLastIteration | ( | Expr * | CLI | ) | [inline, protected] |
Definition at line 323 of file StmtOpenMP.h.
References clang::Stmt::child_begin().
Referenced by clang::OMPSimdDirective::Create(), clang::OMPForDirective::Create(), clang::OMPForSimdDirective::Create(), clang::OMPParallelForDirective::Create(), and clang::OMPParallelForSimdDirective::Create().
void clang::OMPLoopDirective::setCond | ( | Expr * | Cond, |
Expr * | SeparatedCond | ||
) | [inline, protected] |
Definition at line 329 of file StmtOpenMP.h.
References clang::Stmt::child_begin().
Referenced by clang::OMPSimdDirective::Create(), clang::OMPForDirective::Create(), clang::OMPForSimdDirective::Create(), clang::OMPParallelForDirective::Create(), and clang::OMPParallelForSimdDirective::Create().
void OMPLoopDirective::setCounters | ( | ArrayRef< Expr * > | A | ) | [protected] |
Definition at line 1384 of file Stmt.cpp.
References getCollapsedNumber().
Referenced by clang::OMPSimdDirective::Create(), clang::OMPForDirective::Create(), clang::OMPForSimdDirective::Create(), clang::OMPParallelForDirective::Create(), and clang::OMPParallelForSimdDirective::Create().
void OMPLoopDirective::setFinals | ( | ArrayRef< Expr * > | A | ) | [protected] |
Definition at line 1396 of file Stmt.cpp.
References getCollapsedNumber().
Referenced by clang::OMPSimdDirective::Create(), clang::OMPForDirective::Create(), clang::OMPForSimdDirective::Create(), clang::OMPParallelForDirective::Create(), and clang::OMPParallelForSimdDirective::Create().
void clang::OMPLoopDirective::setInc | ( | Expr * | Inc | ) | [inline, protected] |
Definition at line 334 of file StmtOpenMP.h.
References clang::Stmt::child_begin().
Referenced by clang::OMPSimdDirective::Create(), clang::OMPForDirective::Create(), clang::OMPForSimdDirective::Create(), clang::OMPParallelForDirective::Create(), and clang::OMPParallelForSimdDirective::Create().
void clang::OMPLoopDirective::setInit | ( | Expr * | Init | ) | [inline, protected] |
Definition at line 333 of file StmtOpenMP.h.
References clang::Stmt::child_begin().
Referenced by clang::OMPSimdDirective::Create(), clang::OMPForDirective::Create(), clang::OMPForSimdDirective::Create(), clang::OMPParallelForDirective::Create(), and clang::OMPParallelForSimdDirective::Create().
void clang::OMPLoopDirective::setIterationVariable | ( | Expr * | IV | ) | [inline, protected] |
Definition at line 317 of file StmtOpenMP.h.
References clang::Stmt::child_begin().
Referenced by clang::OMPSimdDirective::Create(), clang::OMPForDirective::Create(), clang::OMPForSimdDirective::Create(), clang::OMPParallelForDirective::Create(), and clang::OMPParallelForSimdDirective::Create().
void clang::OMPLoopDirective::setLastIteration | ( | Expr * | LI | ) | [inline, protected] |
Definition at line 320 of file StmtOpenMP.h.
References clang::Stmt::child_begin().
Referenced by clang::OMPSimdDirective::Create(), clang::OMPForDirective::Create(), clang::OMPForSimdDirective::Create(), clang::OMPParallelForDirective::Create(), and clang::OMPParallelForSimdDirective::Create().
void clang::OMPLoopDirective::setPreCond | ( | Expr * | PC | ) | [inline, protected] |
Definition at line 326 of file StmtOpenMP.h.
References clang::Stmt::child_begin().
Referenced by clang::OMPSimdDirective::Create(), clang::OMPForDirective::Create(), clang::OMPForSimdDirective::Create(), clang::OMPParallelForDirective::Create(), and clang::OMPParallelForSimdDirective::Create().
void OMPLoopDirective::setUpdates | ( | ArrayRef< Expr * > | A | ) | [protected] |
Definition at line 1390 of file Stmt.cpp.
References getCollapsedNumber().
Referenced by clang::OMPSimdDirective::Create(), clang::OMPForDirective::Create(), clang::OMPForSimdDirective::Create(), clang::OMPParallelForDirective::Create(), and clang::OMPParallelForSimdDirective::Create().
ArrayRef<Expr *> clang::OMPLoopDirective::updates | ( | ) | [inline] |
Definition at line 389 of file StmtOpenMP.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPLoopBody().
ArrayRef<Expr *> clang::OMPLoopDirective::updates | ( | ) | const [inline] |
Definition at line 391 of file StmtOpenMP.h.
friend class ASTStmtReader [friend] |
Reimplemented from clang::OMPExecutableDirective.
Reimplemented in clang::OMPParallelForSimdDirective, clang::OMPParallelForDirective, clang::OMPForSimdDirective, clang::OMPForDirective, and clang::OMPSimdDirective.
Definition at line 252 of file StmtOpenMP.h.