clang  3.7.0
Classes | Namespaces | Typedefs | Functions | Variables
OpenMPClause.h File Reference

This file defines OpenMP AST classes for clauses. There are clauses for executable directives, clauses for declarative directives and clauses which can be used in both kinds of directives. More...

#include "clang/AST/Expr.h"
#include "clang/AST/Stmt.h"
#include "clang/Basic/OpenMPKinds.h"
#include "clang/Basic/SourceLocation.h"
Include dependency graph for OpenMPClause.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  clang::OMPClause
 This is a basic class for representing single OpenMP clause. More...
 
class  clang::OMPVarListClause< T >
 This represents clauses with the list of variables like 'private', 'firstprivate', 'copyin', 'shared', or 'reduction' clauses in the '#pragma omp ...' directives. More...
 
class  clang::OMPIfClause
 This represents 'if' clause in the '#pragma omp ...' directive. More...
 
class  clang::OMPFinalClause
 This represents 'final' clause in the '#pragma omp ...' directive. More...
 
class  clang::OMPNumThreadsClause
 This represents 'num_threads' clause in the '#pragma omp ...' directive. More...
 
class  clang::OMPSafelenClause
 This represents 'safelen' clause in the '#pragma omp ...' directive. More...
 
class  clang::OMPCollapseClause
 This represents 'collapse' clause in the '#pragma omp ...' directive. More...
 
class  clang::OMPDefaultClause
 This represents 'default' clause in the '#pragma omp ...' directive. More...
 
class  clang::OMPProcBindClause
 This represents 'proc_bind' clause in the '#pragma omp ...' directive. More...
 
class  clang::OMPScheduleClause
 This represents 'schedule' clause in the '#pragma omp ...' directive. More...
 
class  clang::OMPOrderedClause
 This represents 'ordered' clause in the '#pragma omp ...' directive. More...
 
class  clang::OMPNowaitClause
 This represents 'nowait' clause in the '#pragma omp ...' directive. More...
 
class  clang::OMPUntiedClause
 This represents 'untied' clause in the '#pragma omp ...' directive. More...
 
class  clang::OMPMergeableClause
 This represents 'mergeable' clause in the '#pragma omp ...' directive. More...
 
class  clang::OMPReadClause
 This represents 'read' clause in the '#pragma omp atomic' directive. More...
 
class  clang::OMPWriteClause
 This represents 'write' clause in the '#pragma omp atomic' directive. More...
 
class  clang::OMPUpdateClause
 This represents 'update' clause in the '#pragma omp atomic' directive. More...
 
class  clang::OMPCaptureClause
 This represents 'capture' clause in the '#pragma omp atomic' directive. More...
 
class  clang::OMPSeqCstClause
 This represents 'seq_cst' clause in the '#pragma omp atomic' directive. More...
 
class  clang::OMPPrivateClause
 This represents clause 'private' in the '#pragma omp ...' directives. More...
 
class  clang::OMPFirstprivateClause
 This represents clause 'firstprivate' in the '#pragma omp ...' directives. More...
 
class  clang::OMPLastprivateClause
 This represents clause 'lastprivate' in the '#pragma omp ...' directives. More...
 
class  clang::OMPSharedClause
 This represents clause 'shared' in the '#pragma omp ...' directives. More...
 
class  clang::OMPReductionClause
 This represents clause 'reduction' in the '#pragma omp ...' directives. More...
 
class  clang::OMPLinearClause
 This represents clause 'linear' in the '#pragma omp ...' directives. More...
 
class  OMPAlignedClause
 This represents clause 'aligned' in the '#pragma omp ...' directives. More...
 
class  OMPCopyinClause
 This represents clause 'copyin' in the '#pragma omp ...' directives. More...
 
class  OMPCopyprivateClause
 This represents clause 'copyprivate' in the '#pragma omp ...' directives. More...
 
class  OMPFlushClause
 This represents implicit clause 'flush' for the '#pragma omp flush' directive. This clause does not exist by itself, it can be only as a part of 'omp flush' directive. This clause is introduced to keep the original structure of OMPExecutableDirective class and its derivatives and to use the existing infrastructure of clauses with the list of variables. More...
 
class  OMPDependClause
 This represents implicit clause 'depend' for the '#pragma omp task' directive. More...
 

Namespaces

 clang
 

Typedefs

typedef MutableArrayRef< Expr * >
::iterator 
clang::inits_iterator
 
typedef ArrayRef< const Expr * >
::iterator 
clang::inits_const_iterator
 
typedef llvm::iterator_range
< inits_iterator > 
clang::inits_range
 
typedef llvm::iterator_range
< inits_const_iterator > 
clang::inits_const_range
 
typedef MutableArrayRef< Expr * >
::iterator 
clang::updates_iterator
 
typedef ArrayRef< const Expr * >
::iterator 
clang::updates_const_iterator
 
typedef llvm::iterator_range
< updates_iterator > 
clang::updates_range
 
typedef llvm::iterator_range
< updates_const_iterator > 
clang::updates_const_range
 
typedef MutableArrayRef< Expr * >
::iterator 
clang::finals_iterator
 
typedef ArrayRef< const Expr * >
::iterator 
clang::finals_const_iterator
 
typedef llvm::iterator_range
< finals_iterator > 
clang::finals_range
 
typedef llvm::iterator_range
< finals_const_iterator > 
clang::finals_const_range
 

Functions

clang::OMPLinearClause
OMPVarListClause 
clang::getInits ()
 
void setStep (Expr *Step)
 Sets the linear step for clause. More...
 
void setCalcStep (Expr *CalcStep)
 Sets the expression to calculate linear step for clause. More...
 
 OMPLinearClause (SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, unsigned NumVars)
 Build 'linear' clause with given number of variables NumVars. More...
 
 OMPLinearClause (unsigned NumVars)
 Build an empty clause. More...
 
MutableArrayRef< Expr * > clang::getUpdates ()
 Sets the list of update expressions for linear variables. More...
 
MutableArrayRef< Expr * > clang::getFinals ()
 Sets the list of final update expressions for linear variables. More...
 
void clang::setInits (ArrayRef< Expr * > IL)
 Sets the list of the initial values for linear variables. More...
 
static OMPLinearClauseclang::Create (const ASTContext &C, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, ArrayRef< Expr * > VL, ArrayRef< Expr * > IL, Expr *Step, Expr *CalcStep)
 Creates clause with a list of variables VL and a linear step Step. More...
 
static OMPLinearClauseclang::CreateEmpty (const ASTContext &C, unsigned NumVars)
 Creates an empty clause with the place for NumVars variables. More...
 
void clang::setColonLoc (SourceLocation Loc)
 Sets the location of ':'. More...
 
SourceLocation clang::getColonLoc () const
 Returns the location of '('. More...
 
Expr * clang::getStep ()
 Returns linear step. More...
 
Expr * clang::getCalcStep ()
 Returns expression to calculate linear step. More...
 
void clang::setUpdates (ArrayRef< Expr * > UL)
 Sets the list of update expressions for linear variables. More...
 
void clang::setFinals (ArrayRef< Expr * > FL)
 Sets the list of final update expressions for linear variables. More...
 
inits_range clang::inits ()
 
updates_range clang::updates ()
 
finals_range clang::finals ()
 
StmtRange clang::children ()
 
static bool clang::classof (const OMPClause *T)
 

Variables

SourceLocation ColonLoc
 Location of ':'. More...
 
 Inits []
 Gets the list of initial values for linear variables. More...
 
 Updates []
 
 Finals []
 
Step
 
 CalcStep
 

Detailed Description

This file defines OpenMP AST classes for clauses. There are clauses for executable directives, clauses for declarative directives and clauses which can be used in both kinds of directives.

Definition in file OpenMPClause.h.

Function Documentation

getInits::OMPLinearClause ( SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  ColonLoc,
SourceLocation  EndLoc,
unsigned  NumVars 
)

Build 'linear' clause with given number of variables NumVars.

Parameters
StartLocStarting location of the clause.
LParenLocLocation of '('.
ColonLocLocation of ':'.
EndLocEnding location of the clause.
NumVarsNumber of variables.

Definition at line 276 of file OpenMPClause.h.

getInits::OMPLinearClause ( unsigned  NumVars)
explicit

Build an empty clause.

Parameters
NumVarsNumber of variables.

Definition at line 287 of file OpenMPClause.h.

void getInits::setCalcStep ( Expr *  CalcStep)

Sets the expression to calculate linear step for clause.

Definition at line 266 of file OpenMPClause.h.

void getInits::setStep ( Expr *  Step)

Sets the linear step for clause.

Definition at line 263 of file OpenMPClause.h.

Variable Documentation

CalcStep
SourceLocation ColonLoc
Finals[]

Definition at line 303 of file OpenMPClause.h.

Referenced by FinishOpenMPLinearClause().

Inits[]

Gets the list of initial values for linear variables.

There are NumVars expressions with initial values allocated after the varlist, they are followed by NumVars update expressions (used to update the linear variable's value on current iteration) and they are followed by NumVars final expressions (used to calculate the linear variable's value after the loop body). After these lists, there are 2 helper expressions - linear step and a helper to calculate it before the loop body (used when the linear step is not constant):

{ Vars[] /* in OMPVarListClause

Definition at line 303 of file OpenMPClause.h.

Referenced by clang::Sema::ActOnOpenMPFirstprivateClause(), clang::Sema::ActOnOpenMPLinearClause(), clang::Sema::BuildCXXNew(), clang::Sema::CheckConstexprFunctionBody(), clang::CodeGen::CodeGenVTables::CreateVTableInitializer(), and clang::CodeGen::CodeGenModule::EmitConstantValue().

* Step
Updates[]