clang
3.9.0
|
This file implements semantic analysis for OpenMP directives and clauses. More...
#include "TreeTransform.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/ASTMutationListener.h"
#include "clang/AST/CXXInheritance.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclOpenMP.h"
#include "clang/AST/StmtCXX.h"
#include "clang/AST/StmtOpenMP.h"
#include "clang/AST/StmtVisitor.h"
#include "clang/AST/TypeOrdering.h"
#include "clang/Basic/OpenMPKinds.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Sema/Initialization.h"
#include "clang/Sema/Lookup.h"
#include "clang/Sema/Scope.h"
#include "clang/Sema/ScopeInfo.h"
#include "clang/Sema/SemaInternal.h"
Go to the source code of this file.
Macros | |
#define | DSAStack static_cast<DSAStackTy *>(VarDataSharingAttributesStack) |
Enumerations | |
enum | DefaultDataSharingAttributes |
Default data sharing attributes, which can be applied to directive. More... | |
Functions | |
static ValueDecl * | getCanonicalDecl (ValueDecl *D) |
static VarDecl * | buildVarDecl (Sema &SemaRef, SourceLocation Loc, QualType Type, StringRef Name, const AttrVec *Attrs=nullptr) |
Build a variable declaration for OpenMP loop iteration variable. More... | |
static DeclRefExpr * | buildDeclRefExpr (Sema &S, VarDecl *D, QualType Ty, SourceLocation Loc, bool RefersToCapture=false) |
static bool | FinishOpenMPLinearClause (OMPLinearClause &Clause, DeclRefExpr *IV, Expr *NumIterations, Sema &SemaRef, Scope *S, DSAStackTy *Stack) |
static void | ReportOriginalDSA (Sema &SemaRef, DSAStackTy *Stack, const ValueDecl *D, DSAStackTy::DSAVarData DVar, bool IsLoopIterVar=false) |
static OMPCapturedExprDecl * | buildCaptureDecl (Sema &S, IdentifierInfo *Id, Expr *CaptureExpr, bool WithInit, bool AsExpression) |
static DeclRefExpr * | buildCapture (Sema &S, ValueDecl *D, Expr *CaptureExpr, bool WithInit) |
static ExprResult | buildCapture (Sema &S, Expr *CaptureExpr, DeclRefExpr *&Ref) |
static bool | CheckNestingOfRegions (Sema &SemaRef, DSAStackTy *Stack, OpenMPDirectiveKind CurrentRegion, const DeclarationNameInfo &CurrentName, OpenMPDirectiveKind CancelRegion, SourceLocation StartLoc) |
static bool | checkIfClauses (Sema &S, OpenMPDirectiveKind Kind, ArrayRef< OMPClause * > Clauses, ArrayRef< OpenMPDirectiveKind > AllowedNameModifiers) |
static bool | CheckOpenMPIterationSpace (OpenMPDirectiveKind DKind, Stmt *S, Sema &SemaRef, DSAStackTy &DSA, unsigned CurrentNestedLoopCount, unsigned NestedLoopCount, Expr *CollapseLoopCountExpr, Expr *OrderedLoopCountExpr, llvm::DenseMap< ValueDecl *, Expr * > &VarsWithImplicitDSA, LoopIterationSpace &ResultIterSpace, llvm::MapVector< Expr *, DeclRefExpr * > &Captures) |
Called on a for stmt to check and extract its iteration space for further processing (such as collapsing). More... | |
static ExprResult | BuildCounterInit (Sema &SemaRef, Scope *S, SourceLocation Loc, ExprResult VarRef, ExprResult Start, llvm::MapVector< Expr *, DeclRefExpr * > &Captures) |
Build 'VarRef = Start. More... | |
static ExprResult | BuildCounterUpdate (Sema &SemaRef, Scope *S, SourceLocation Loc, ExprResult VarRef, ExprResult Start, ExprResult Iter, ExprResult Step, bool Subtract, llvm::MapVector< Expr *, DeclRefExpr * > *Captures=nullptr) |
Build 'VarRef = Start + Iter * Step'. More... | |
static ExprResult | WidenIterationCount (unsigned Bits, Expr *E, Sema &SemaRef) |
Convert integer expression E to make it have at least Bits bits. More... | |
static bool | FitsInto (unsigned Bits, bool Signed, Expr *E, Sema &SemaRef) |
Check if the given expression E is a constant integer that fits into Bits bits. More... | |
static Stmt * | buildPreInits (ASTContext &Context, SmallVectorImpl< Decl * > &PreInits) |
Build preinits statement for the given declarations. More... | |
static Stmt * | buildPreInits (ASTContext &Context, llvm::MapVector< Expr *, DeclRefExpr * > &Captures) |
Build preinits statement for the given declarations. More... | |
static Expr * | buildPostUpdate (Sema &S, ArrayRef< Expr * > PostUpdates) |
Build postupdate expression for the given list of postupdates expressions. More... | |
static unsigned | CheckOpenMPLoop (OpenMPDirectiveKind DKind, Expr *CollapseLoopCountExpr, Expr *OrderedLoopCountExpr, Stmt *AStmt, Sema &SemaRef, DSAStackTy &DSA, llvm::DenseMap< ValueDecl *, Expr * > &VarsWithImplicitDSA, OMPLoopDirective::HelperExprs &Built) |
Called on a for stmt to check itself and nested loops (if any). More... | |
static Expr * | getCollapseNumberExpr (ArrayRef< OMPClause * > Clauses) |
static Expr * | getOrderedNumberExpr (ArrayRef< OMPClause * > Clauses) |
static bool | checkSimdlenSafelenSpecified (Sema &S, const ArrayRef< OMPClause * > Clauses) |
static bool | HasMapClause (ArrayRef< OMPClause * > Clauses) |
Check for existence of a map clause in the list of clauses. More... | |
static bool | checkGrainsizeNumTasksClauses (Sema &S, ArrayRef< OMPClause * > Clauses) |
static bool | IsNonNegativeIntegerValue (Expr *&ValExpr, Sema &SemaRef, OpenMPClauseKind CKind, bool StrictlyPositive) |
static std::string | getListOfPossibleValues (OpenMPClauseKind K, unsigned First, unsigned Last, ArrayRef< unsigned > Exclude=llvm::None) |
static bool | checkScheduleModifiers (Sema &S, OpenMPScheduleClauseModifier M1, OpenMPScheduleClauseModifier M2, SourceLocation M1Loc, SourceLocation M2Loc) |
static std::pair< ValueDecl *, bool > | getPrivateItem (Sema &S, Expr *&RefExpr, SourceLocation &ELoc, SourceRange &ERange, bool AllowArraySection=false) |
template<typename T > | |
static T | filterLookupForUDR (SmallVectorImpl< UnresolvedSet< 8 >> &Lookups, const llvm::function_ref< T(ValueDecl *)> &Gen) |
static ExprResult | buildDeclareReductionRef (Sema &SemaRef, SourceLocation Loc, SourceRange Range, Scope *S, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, QualType Ty, CXXCastPath &BasePath, Expr *UnresolvedReduction) |
static bool | IsCXXRecordForMappable (Sema &SemaRef, SourceLocation Loc, DSAStackTy *Stack, CXXRecordDecl *RD) |
static bool | CheckTypeMappable (SourceLocation SL, SourceRange SR, Sema &SemaRef, DSAStackTy *Stack, QualType QTy) |
static bool | CheckArrayExpressionDoesNotReferToWholeSize (Sema &SemaRef, const Expr *E, QualType BaseQTy) |
Return true if it can be proven that the provided array expression (array section or array subscript) does NOT specify the whole size of the array whose base type is BaseQTy. More... | |
static bool | CheckArrayExpressionDoesNotReferToUnitySize (Sema &SemaRef, const Expr *E, QualType BaseQTy) |
static Expr * | CheckMapClauseExpressionBase (Sema &SemaRef, Expr *E, OMPClauseMappableExprCommon::MappableExprComponentList &CurComponents, OpenMPClauseKind CKind) |
static bool | CheckMapConflicts (Sema &SemaRef, DSAStackTy *DSAS, ValueDecl *VD, Expr *E, bool CurrentRegionOnly, OMPClauseMappableExprCommon::MappableExprComponentListRef CurComponents, OpenMPClauseKind CKind) |
static void | checkMappableExpressionList (Sema &SemaRef, DSAStackTy *DSAS, OpenMPClauseKind CKind, MappableVarListInfo &MVLI, SourceLocation StartLoc, OpenMPMapClauseKind MapType=OMPC_MAP_unknown, bool IsMapTypeImplicit=false) |
static void | checkDeclInTargetContext (SourceLocation SL, SourceRange SR, Sema &SemaRef, Decl *D) |
static bool | checkValueDeclInTarget (SourceLocation SL, SourceRange SR, Sema &SemaRef, DSAStackTy *Stack, ValueDecl *VD) |
This file implements semantic analysis for OpenMP directives and clauses.
Definition in file SemaOpenMP.cpp.
#define DSAStack static_cast<DSAStackTy *>(VarDataSharingAttributesStack) |
Definition at line 840 of file SemaOpenMP.cpp.
Referenced by clang::Sema::ActOnOpenMPAlignedClause(), clang::Sema::ActOnOpenMPCancelDirective(), clang::Sema::ActOnOpenMPCancellationPointDirective(), clang::Sema::ActOnOpenMPCopyinClause(), clang::Sema::ActOnOpenMPCopyprivateClause(), clang::Sema::ActOnOpenMPCriticalDirective(), clang::Sema::ActOnOpenMPDefaultClause(), clang::Sema::ActOnOpenMPDependClause(), clang::Sema::ActOnOpenMPDistributeDirective(), clang::Sema::ActOnOpenMPDistributeParallelForDirective(), clang::Sema::ActOnOpenMPDistributeParallelForSimdDirective(), clang::Sema::ActOnOpenMPDistributeSimdDirective(), clang::Sema::ActOnOpenMPDistScheduleClause(), clang::Sema::ActOnOpenMPExecutableDirective(), clang::Sema::ActOnOpenMPFirstprivateClause(), clang::Sema::ActOnOpenMPForDirective(), clang::Sema::ActOnOpenMPForSimdDirective(), clang::Sema::ActOnOpenMPFromClause(), clang::Sema::ActOnOpenMPIdExpression(), clang::Sema::ActOnOpenMPLastprivateClause(), clang::Sema::ActOnOpenMPLinearClause(), clang::Sema::ActOnOpenMPLoopInitialization(), clang::Sema::ActOnOpenMPMapClause(), clang::Sema::ActOnOpenMPNowaitClause(), clang::Sema::ActOnOpenMPOrderedClause(), clang::Sema::ActOnOpenMPOrderedDirective(), clang::Sema::ActOnOpenMPParallelDirective(), clang::Sema::ActOnOpenMPParallelForDirective(), clang::Sema::ActOnOpenMPParallelForSimdDirective(), clang::Sema::ActOnOpenMPParallelSectionsDirective(), clang::Sema::ActOnOpenMPPrivateClause(), clang::Sema::ActOnOpenMPReductionClause(), clang::Sema::ActOnOpenMPRegionEnd(), clang::Sema::ActOnOpenMPRegionStart(), clang::Sema::ActOnOpenMPScheduleClause(), clang::Sema::ActOnOpenMPSectionDirective(), clang::Sema::ActOnOpenMPSectionsDirective(), clang::Sema::ActOnOpenMPSharedClause(), clang::Sema::ActOnOpenMPSimdDirective(), clang::Sema::ActOnOpenMPTargetDirective(), clang::Sema::ActOnOpenMPTargetParallelForDirective(), clang::Sema::ActOnOpenMPTargetParallelForSimdDirective(), clang::Sema::ActOnOpenMPTaskDirective(), clang::Sema::ActOnOpenMPTaskLoopDirective(), clang::Sema::ActOnOpenMPTaskLoopSimdDirective(), clang::Sema::ActOnOpenMPToClause(), clang::Sema::checkDeclIsAllowedInOpenMPTarget(), clang::Sema::CheckOMPThreadPrivateDecl(), clang::Sema::EndOpenMPClause(), clang::Sema::EndOpenMPDSABlock(), clang::Sema::IsOpenMPCapturedByRef(), clang::Sema::IsOpenMPCapturedDecl(), clang::Sema::isOpenMPPrivateDecl(), clang::Sema::isOpenMPTargetCapturedDecl(), clang::Sema::StartOpenMPClause(), and clang::Sema::StartOpenMPDSABlock().
Default data sharing attributes, which can be applied to directive.
Definition at line 42 of file SemaOpenMP.cpp.
|
static |
Definition at line 1752 of file SemaOpenMP.cpp.
References buildCaptureDecl(), buildDeclRefExpr(), clang::Expr::getExprLoc(), clang::NamedDecl::getIdentifier(), clang::QualType::getNonReferenceType(), clang::ValueDecl::getType(), and clang::Sema::IsOpenMPCapturedDecl().
Referenced by clang::Sema::ActOnOpenMPAlignedClause(), clang::Sema::ActOnOpenMPCopyprivateClause(), clang::Sema::ActOnOpenMPFirstprivateClause(), clang::Sema::ActOnOpenMPLastprivateClause(), clang::Sema::ActOnOpenMPLinearClause(), clang::Sema::ActOnOpenMPLoopInitialization(), clang::Sema::ActOnOpenMPPrivateClause(), clang::Sema::ActOnOpenMPReductionClause(), and clang::Sema::ActOnOpenMPSharedClause().
|
static |
Definition at line 1764 of file SemaOpenMP.cpp.
References buildCaptureDecl(), buildDeclRefExpr(), clang::Sema::CreateBuiltinUnaryOp(), clang::Sema::DefaultLvalueConversion(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::IdentifierTable::get(), clang::Sema::getASTContext(), clang::Expr::getExprLoc(), clang::Sema::getLangOpts(), clang::Expr::getObjectKind(), clang::Expr::getType(), clang::ASTContext::Idents, clang::Expr::isGLValue(), clang::Type::isPointerType(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), and clang::OK_Ordinary.
|
static |
Definition at line 1723 of file SemaOpenMP.cpp.
References clang::DeclContext::addHiddenDecl(), clang::Sema::AddInitializerToDecl(), clang::OMPCapturedExprDecl::Create(), clang::Sema::CreateBuiltinUnaryOp(), clang::Sema::CurContext, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Sema::getASTContext(), clang::Expr::getExprLoc(), clang::Sema::getLangOpts(), clang::ASTContext::getLValueReferenceType(), clang::Expr::getObjectKind(), clang::ASTContext::getPointerType(), clang::Expr::getType(), clang::Expr::IgnoreImpCasts(), clang::Expr::isGLValue(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), and clang::OK_Ordinary.
Referenced by buildCapture().
|
static |
Build 'VarRef = Start.
Definition at line 4763 of file SemaOpenMP.cpp.
References clang::Sema::AA_Converting, clang::Sema::BuildBinOp(), clang::Sema::Context, clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getType(), clang::ASTContext::hasSameType(), and clang::Sema::PerformImplicitConversion().
Referenced by CheckOpenMPLoop().
|
static |
Build 'VarRef = Start + Iter * Step'.
Definition at line 4786 of file SemaOpenMP.cpp.
References clang::Sema::AA_Converting, clang::Sema::ActOnParenExpr(), clang::Sema::BuildBinOp(), clang::Sema::Context, clang::Sema::CreateBuiltinBinOp(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Sema::getDiagnostics(), clang::DiagnosticsEngine::getSuppressAllDiagnostics(), clang::Expr::getType(), clang::ASTContext::hasSameType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isOverloadableType(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), clang::Sema::PerformImplicitConversion(), clang::DiagnosticsEngine::setSuppressAllDiagnostics(), and Step.
Referenced by CheckOpenMPLoop(), and FinishOpenMPLinearClause().
|
static |
Definition at line 8862 of file SemaOpenMP.cpp.
References clang::UnresolvedSetImpl::addDecl(), clang::UnresolvedSetImpl::append(), clang::Sema::AR_inaccessible, clang::UnresolvedSetImpl::begin(), clang::LookupResult::begin(), clang::Sema::BuildBasePathArray(), clang::Sema::BuildDeclRefExpr(), clang::Sema::CheckBaseClassAccess(), clang::LookupResult::clear(), clang::Type::containsUnexpandedParameterPack(), clang::Sema::Context, clang::UnresolvedLookupExpr::Create(), clang::Sema::Diag(), clang::UnresolvedSetImpl::end(), clang::LookupResult::end(), clang::ExprEmpty(), clang::ExprError(), clang::CXXBasePaths::front(), clang::ASTContext::getCanonicalType(), clang::Scope::getParent(), clang::LookupResult::getRepresentativeDecl(), clang::ValueDecl::getType(), clang::QualType::getUnqualifiedType(), clang::CXXScopeSpec::getWithLocInContext(), clang::ASTContext::hasSameType(), clang::CXXBasePaths::isAmbiguous(), clang::Scope::isDeclScope(), clang::Type::isDependentType(), clang::Sema::IsDerivedFrom(), clang::Type::isInstantiationDependentType(), clang::CXXScopeSpec::isInvalid(), clang::QualType::isMoreQualifiedThan(), clang::CXXScopeSpec::isSet(), clang::Sema::LookupOMPReductionName, clang::Sema::LookupParsedName(), clang::LookupResult::suppressDiagnostics(), and clang::VK_LValue.
Referenced by clang::Sema::ActOnOpenMPReductionClause().
|
static |
Definition at line 634 of file SemaOpenMP.cpp.
References clang::Sema::Context, clang::DeclRefExpr::Create(), clang::Sema::getASTContext(), and clang::VK_LValue.
Referenced by clang::Sema::ActOnOpenMPCopyinClause(), clang::Sema::ActOnOpenMPCopyprivateClause(), clang::Sema::ActOnOpenMPFirstprivateClause(), clang::Sema::ActOnOpenMPLastprivateClause(), clang::Sema::ActOnOpenMPLinearClause(), clang::Sema::ActOnOpenMPPrivateClause(), clang::Sema::ActOnOpenMPReductionClause(), buildCapture(), CheckOpenMPLoop(), clang::Sema::EndOpenMPDSABlock(), and FinishOpenMPLinearClause().
Build postupdate expression for the given list of postupdates expressions.
Definition at line 4908 of file SemaOpenMP.cpp.
References clang::Sema::BuildCStyleCastExpr(), clang::Sema::Context, clang::Sema::CreateBuiltinBinOp(), E, clang::Expr::getExprLoc(), clang::ASTContext::getTrivialTypeSourceInfo(), and clang::ASTContext::VoidTy.
Referenced by clang::Sema::ActOnOpenMPLastprivateClause(), clang::Sema::ActOnOpenMPLinearClause(), and clang::Sema::ActOnOpenMPReductionClause().
|
static |
Build preinits statement for the given declarations.
Definition at line 4885 of file SemaOpenMP.cpp.
References clang::Sema::Context, and clang::DeclGroupRef::Create().
Referenced by clang::Sema::ActOnOpenMPDistScheduleClause(), clang::Sema::ActOnOpenMPLastprivateClause(), clang::Sema::ActOnOpenMPLinearClause(), clang::Sema::ActOnOpenMPReductionClause(), clang::Sema::ActOnOpenMPScheduleClause(), buildPreInits(), and CheckOpenMPLoop().
|
static |
Build preinits statement for the given declarations.
Definition at line 4896 of file SemaOpenMP.cpp.
References buildPreInits().
|
static |
Build a variable declaration for OpenMP loop iteration variable.
Definition at line 618 of file SemaOpenMP.cpp.
References clang::Sema::Context, clang::VarDecl::Create(), clang::Sema::CurContext, E, clang::IdentifierTable::get(), clang::Preprocessor::getIdentifierTable(), clang::ASTContext::getTrivialTypeSourceInfo(), I, clang::Sema::PP, and clang::SC_None.
Referenced by clang::Sema::ActOnOpenMPCopyinClause(), clang::Sema::ActOnOpenMPCopyprivateClause(), clang::Sema::ActOnOpenMPDeclareReductionCombinerStart(), clang::Sema::ActOnOpenMPDeclareReductionInitializerStart(), clang::Sema::ActOnOpenMPFirstprivateClause(), clang::Sema::ActOnOpenMPLastprivateClause(), clang::Sema::ActOnOpenMPLinearClause(), clang::Sema::ActOnOpenMPPrivateClause(), clang::Sema::ActOnOpenMPReductionClause(), CheckOpenMPLoop(), and clang::Sema::EndOpenMPDSABlock().
|
static |
Definition at line 10369 of file SemaOpenMP.cpp.
References E, clang::Sema::getASTContext(), clang::QualType::getTypePtr(), and Length.
Referenced by CheckMapClauseExpressionBase().
|
static |
Return true if it can be proven that the provided array expression (array section or array subscript) does NOT specify the whole size of the array whose base type is BaseQTy.
Definition at line 10315 of file SemaOpenMP.cpp.
References E, clang::Sema::getASTContext(), clang::ConstantArrayType::getSize(), clang::QualType::getTypePtr(), clang::Type::isPointerType(), and Length.
Referenced by CheckMapClauseExpressionBase().
|
static |
Definition at line 11499 of file SemaOpenMP.cpp.
References clang::Sema::Context, clang::Sema::Diag(), clang::ASTContext::getASTMutationListener(), getDefinition(), and clang::DeclContext::getParent().
Referenced by clang::Sema::checkDeclIsAllowedInOpenMPTarget().
Definition at line 6934 of file SemaOpenMP.cpp.
References clang::Sema::Diag(), clang::OMPClause::getClauseKind(), clang::OMPClause::getLocStart(), and clang::getOpenMPClauseName().
Referenced by clang::Sema::ActOnOpenMPTaskLoopDirective(), and clang::Sema::ActOnOpenMPTaskLoopSimdDirective().
|
static |
Definition at line 3297 of file SemaOpenMP.cpp.
References clang::Sema::Diag(), End, clang::getOpenMPClauseName(), clang::getOpenMPDirectiveName(), and clang::OMPD_unknown.
Referenced by clang::Sema::ActOnOpenMPExecutableDirective().
|
static |
Definition at line 10404 of file SemaOpenMP.cpp.
References CheckArrayExpressionDoesNotReferToUnitySize(), CheckArrayExpressionDoesNotReferToWholeSize(), clang::Sema::Diag(), clang::Type::getAs(), clang::OMPArraySectionExpr::getBaseOriginalType(), clang::QualType::getCanonicalType(), clang::Expr::getExprLoc(), clang::getOpenMPClauseName(), clang::Type::getPointeeType(), clang::Expr::getType(), clang::Expr::IgnoreParenImpCasts(), clang::Type::isAnyPointerType(), and clang::Type::isArrayType().
Referenced by checkMappableExpressionList().
|
static |
Definition at line 10613 of file SemaOpenMP.cpp.
References clang::Sema::Diag(), clang::Expr::getExprLoc(), clang::QualType::getNonReferenceType(), and clang::Type::isAnyPointerType().
Referenced by checkMappableExpressionList().
|
static |
Definition at line 10832 of file SemaOpenMP.cpp.
References CheckMapClauseExpressionBase(), CheckMapConflicts(), CheckTypeMappable(), clang::Sema::Diag(), clang::getOpenMPClauseName(), clang::getOpenMPDirectiveName(), clang::getOpenMPSimpleClauseTypeName(), clang::isOpenMPPrivate(), and ReportOriginalDSA().
Referenced by clang::Sema::ActOnOpenMPFromClause(), clang::Sema::ActOnOpenMPMapClause(), and clang::Sema::ActOnOpenMPToClause().
|
static |
Definition at line 1866 of file SemaOpenMP.cpp.
References clang::Sema::Diag(), clang::DeclarationNameInfo::getName(), clang::getOpenMPDirectiveName(), clang::isOpenMPDistributeDirective(), clang::isOpenMPParallelDirective(), clang::isOpenMPSimdDirective(), clang::isOpenMPTargetDataManagementDirective(), clang::isOpenMPTargetExecutionDirective(), clang::isOpenMPTaskingDirective(), clang::isOpenMPTeamsDirective(), clang::isOpenMPWorksharingDirective(), clang::SourceLocation::isValid(), and clang::OMPD_unknown.
Referenced by clang::Sema::ActOnOpenMPExecutableDirective().
|
static |
Called on a for stmt to check and extract its iteration space for further processing (such as collapsing).
Definition at line 4609 of file SemaOpenMP.cpp.
References clang::Sema::CurContext, clang::Sema::Diag(), clang::Expr::getExprLoc(), clang::Sema::getLangOpts(), clang::QualType::getNonReferenceType(), clang::getOpenMPClauseName(), clang::getOpenMPDirectiveName(), clang::Expr::getType(), clang::DeclContext::isDependentContext(), clang::isOpenMPDistributeDirective(), clang::isOpenMPLoopDirective(), clang::isOpenMPPrivate(), clang::isOpenMPSimdDirective(), clang::isOpenMPTaskLoopDirective(), clang::isOpenMPWorksharingDirective(), clang::OMPC_unknown, ReportOriginalDSA(), and S.
Referenced by CheckOpenMPLoop().
|
static |
Called on a for stmt to check itself and nested loops (if any).
Definition at line 4931 of file SemaOpenMP.cpp.
References clang::Sema::AA_Converting, clang::Sema::ActOnConditionalOp(), clang::Sema::ActOnFinishFullExpr(), clang::Sema::ActOnIntegerConstant(), clang::Sema::AddInitializerToDecl(), clang::Sema::BuildBinOp(), BuildCounterInit(), BuildCounterUpdate(), buildDeclRefExpr(), buildPreInits(), buildVarDecl(), clang::OMPLoopDirective::HelperExprs::CalcLastIteration, CheckOpenMPIterationSpace(), clang::OMPLoopDirective::HelperExprs::clear(), clang::OMPLoopDirective::HelperExprs::Cond, clang::Sema::Context, clang::OMPLoopDirective::HelperExprs::Counters, clang::Sema::CurContext, clang::Sema::DefaultLvalueConversion(), clang::Sema::Diag(), clang::OMPLoopDirective::HelperExprs::EUB, clang::Expr::EvaluateAsInt(), clang::OMPLoopDirective::HelperExprs::Finals, FitsInto(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Sema::getASTContext(), clang::Expr::getExprLoc(), clang::ASTContext::getIntTypeForBitwidth(), clang::Expr::getType(), clang::ASTContext::getTypeSize(), clang::Type::hasSignedIntegerRepresentation(), I, clang::OMPLoopDirective::HelperExprs::IL, clang::OMPLoopDirective::HelperExprs::Inc, clang::OMPLoopDirective::HelperExprs::Init, clang::OMPLoopDirective::HelperExprs::Inits, clang::DeclContext::isDependentContext(), clang::Expr::isIntegerConstantExpr(), clang::isOpenMPDistributeDirective(), clang::isOpenMPLoopBoundSharingDirective(), clang::isOpenMPTaskLoopDirective(), clang::isOpenMPWorksharingDirective(), clang::ActionResult< PtrTy, CompressInvalid >::isUnset(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), clang::OMPLoopDirective::HelperExprs::IterationVarRef, clang::OMPLoopDirective::HelperExprs::LastIteration, clang::OMPLoopDirective::HelperExprs::LB, clang::OMPLoopDirective::HelperExprs::NLB, clang::OMPLoopDirective::HelperExprs::NUB, clang::OMPLoopDirective::HelperExprs::NumIterations, clang::Sema::PerformImplicitConversion(), clang::OMPLoopDirective::HelperExprs::PreCond, clang::OMPLoopDirective::HelperExprs::PreInits, clang::OMPLoopDirective::HelperExprs::PrevLB, clang::OMPLoopDirective::HelperExprs::PrevUB, clang::OMPLoopDirective::HelperExprs::PrivateCounters, clang::Result, clang::OMPLoopDirective::HelperExprs::ST, clang::OMPLoopDirective::HelperExprs::UB, clang::OMPLoopDirective::HelperExprs::Updates, and WidenIterationCount().
Referenced by clang::Sema::ActOnOpenMPDistributeDirective(), clang::Sema::ActOnOpenMPDistributeParallelForDirective(), clang::Sema::ActOnOpenMPDistributeParallelForSimdDirective(), clang::Sema::ActOnOpenMPDistributeSimdDirective(), clang::Sema::ActOnOpenMPForDirective(), clang::Sema::ActOnOpenMPForSimdDirective(), clang::Sema::ActOnOpenMPParallelForDirective(), clang::Sema::ActOnOpenMPParallelForSimdDirective(), clang::Sema::ActOnOpenMPSimdDirective(), clang::Sema::ActOnOpenMPTargetParallelForDirective(), clang::Sema::ActOnOpenMPTargetParallelForSimdDirective(), clang::Sema::ActOnOpenMPTaskLoopDirective(), and clang::Sema::ActOnOpenMPTaskLoopSimdDirective().
|
static |
Definition at line 7739 of file SemaOpenMP.cpp.
References clang::Sema::Diag(), getListOfPossibleValues(), clang::getOpenMPClauseName(), clang::SourceLocation::isValid(), clang::OMPC_SCHEDULE_MODIFIER_last, and clang::OMPC_SCHEDULE_MODIFIER_unknown.
Referenced by clang::Sema::ActOnOpenMPScheduleClause().
Definition at line 5429 of file SemaOpenMP.cpp.
References clang::Sema::Context, clang::Sema::Diag(), clang::Expr::EvaluateAsInt(), clang::OMPSafelenClause::getSafelen(), and clang::OMPSimdlenClause::getSimdlen().
Referenced by clang::Sema::ActOnOpenMPDistributeParallelForSimdDirective(), clang::Sema::ActOnOpenMPDistributeSimdDirective(), clang::Sema::ActOnOpenMPForSimdDirective(), clang::Sema::ActOnOpenMPParallelForSimdDirective(), clang::Sema::ActOnOpenMPSimdDirective(), and clang::Sema::ActOnOpenMPTargetParallelForSimdDirective().
|
static |
Definition at line 10298 of file SemaOpenMP.cpp.
References clang::Sema::Diag(), IsCXXRecordForMappable(), and clang::Type::isIncompleteType().
Referenced by checkMappableExpressionList(), and checkValueDeclInTarget().
|
static |
Definition at line 11569 of file SemaOpenMP.cpp.
References CheckTypeMappable(), and clang::ValueDecl::getType().
Referenced by clang::Sema::checkDeclIsAllowedInOpenMPTarget().
|
static |
Definition at line 8850 of file SemaOpenMP.cpp.
|
static |
Definition at line 9701 of file SemaOpenMP.cpp.
References clang::Sema::ActOnFinishFullExpr(), clang::Sema::ActOnIntegerConstant(), BuildCounterUpdate(), buildDeclRefExpr(), CalcStep, Finals, clang::ActionResult< PtrTy, CompressInvalid >::get(), getPrivateItem(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), Step, Updates, and clang::OMPVarListClause< T >::varlists().
Referenced by clang::Sema::ActOnOpenMPForDirective(), clang::Sema::ActOnOpenMPForSimdDirective(), clang::Sema::ActOnOpenMPParallelForDirective(), clang::Sema::ActOnOpenMPParallelForSimdDirective(), clang::Sema::ActOnOpenMPSimdDirective(), clang::Sema::ActOnOpenMPTargetParallelForDirective(), clang::Sema::ActOnOpenMPTargetParallelForSimdDirective(), and clang::Sema::ActOnOpenMPTaskLoopSimdDirective().
Check if the given expression E is a constant integer that fits into Bits bits.
Definition at line 4875 of file SemaOpenMP.cpp.
References clang::Sema::Context, clang::Expr::isIntegerConstantExpr(), and clang::Result.
Referenced by CheckOpenMPLoop().
Definition at line 393 of file SemaOpenMP.cpp.
Referenced by clang::Sema::ActOnOpenMPDeclareSimdDirective(), and clang::Sema::IsOpenMPCapturedDecl().
Definition at line 5413 of file SemaOpenMP.cpp.
Referenced by clang::Sema::ActOnOpenMPDistributeDirective(), clang::Sema::ActOnOpenMPDistributeParallelForDirective(), clang::Sema::ActOnOpenMPDistributeParallelForSimdDirective(), clang::Sema::ActOnOpenMPDistributeSimdDirective(), clang::Sema::ActOnOpenMPForDirective(), clang::Sema::ActOnOpenMPForSimdDirective(), clang::Sema::ActOnOpenMPParallelForDirective(), clang::Sema::ActOnOpenMPParallelForSimdDirective(), clang::Sema::ActOnOpenMPSimdDirective(), clang::Sema::ActOnOpenMPTargetParallelForDirective(), clang::Sema::ActOnOpenMPTargetParallelForSimdDirective(), clang::Sema::ActOnOpenMPTaskLoopDirective(), and clang::Sema::ActOnOpenMPTaskLoopSimdDirective().
|
static |
Definition at line 7585 of file SemaOpenMP.cpp.
References clang::getOpenMPSimpleClauseTypeName(), and clang::LangAS::Last.
Referenced by clang::Sema::ActOnOpenMPDefaultClause(), clang::Sema::ActOnOpenMPDependClause(), clang::Sema::ActOnOpenMPProcBindClause(), clang::Sema::ActOnOpenMPScheduleClause(), and checkScheduleModifiers().
Definition at line 5421 of file SemaOpenMP.cpp.
Referenced by clang::Sema::ActOnOpenMPForDirective(), clang::Sema::ActOnOpenMPForSimdDirective(), clang::Sema::ActOnOpenMPParallelForDirective(), clang::Sema::ActOnOpenMPParallelForSimdDirective(), clang::Sema::ActOnOpenMPSimdDirective(), clang::Sema::ActOnOpenMPTargetParallelForDirective(), and clang::Sema::ActOnOpenMPTargetParallelForSimdDirective().
|
static |
Definition at line 8106 of file SemaOpenMP.cpp.
References clang::Expr::containsUnexpandedParameterPack(), clang::Sema::Diag(), clang::Sema::getCurrentThisType(), clang::Expr::getExprLoc(), clang::Expr::IgnoreParenImpCasts(), clang::Expr::IgnoreParens(), clang::QualType::isNull(), clang::Expr::isTypeDependent(), and clang::Expr::isValueDependent().
Referenced by clang::Sema::ActOnOpenMPAlignedClause(), clang::Sema::ActOnOpenMPCopyprivateClause(), clang::Sema::ActOnOpenMPDependClause(), clang::Sema::ActOnOpenMPFirstprivateClause(), clang::Sema::ActOnOpenMPIsDevicePtrClause(), clang::Sema::ActOnOpenMPLastprivateClause(), clang::Sema::ActOnOpenMPLinearClause(), clang::Sema::ActOnOpenMPPrivateClause(), clang::Sema::ActOnOpenMPReductionClause(), clang::Sema::ActOnOpenMPSharedClause(), clang::Sema::ActOnOpenMPUseDevicePtrClause(), and FinishOpenMPLinearClause().
Check for existence of a map clause in the list of clauses.
Definition at line 6790 of file SemaOpenMP.cpp.
Referenced by clang::Sema::ActOnOpenMPTargetDataDirective(), clang::Sema::ActOnOpenMPTargetEnterDataDirective(), and clang::Sema::ActOnOpenMPTargetExitDataDirective().
|
static |
Definition at line 10254 of file SemaOpenMP.cpp.
References clang::CXXRecordDecl::bases(), clang::Sema::Context, clang::Sema::Diag(), clang::ASTContext::getRecordType(), clang::CXXRecordDecl::isDynamicClass(), and Stack.
Referenced by CheckTypeMappable().
|
static |
Definition at line 7378 of file SemaOpenMP.cpp.
References clang::Sema::Context, clang::Sema::Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getExprLoc(), clang::getOpenMPClauseName(), clang::Expr::isInstantiationDependent(), clang::Expr::isIntegerConstantExpr(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), clang::Sema::PerformOpenMPImplicitIntegerConversion(), and clang::Result.
Referenced by clang::Sema::ActOnOpenMPDeviceClause(), clang::Sema::ActOnOpenMPGrainsizeClause(), clang::Sema::ActOnOpenMPNumTasksClause(), clang::Sema::ActOnOpenMPNumTeamsClause(), clang::Sema::ActOnOpenMPNumThreadsClause(), clang::Sema::ActOnOpenMPPriorityClause(), and clang::Sema::ActOnOpenMPThreadLimitClause().
|
static |
Definition at line 1397 of file SemaOpenMP.cpp.
References clang::Sema::Diag(), clang::Sema::getASTContext(), clang::getOpenMPClauseName(), clang::getOpenMPDirectiveName(), clang::ValueDecl::getType(), clang::QualType::isConstant(), and clang::isOpenMPTaskingDirective().
Referenced by clang::Sema::ActOnOpenMPCopyprivateClause(), clang::Sema::ActOnOpenMPFirstprivateClause(), clang::Sema::ActOnOpenMPLastprivateClause(), clang::Sema::ActOnOpenMPLinearClause(), clang::Sema::ActOnOpenMPPrivateClause(), clang::Sema::ActOnOpenMPReductionClause(), clang::Sema::ActOnOpenMPSharedClause(), clang::Sema::checkDeclIsAllowedInOpenMPTarget(), checkMappableExpressionList(), and CheckOpenMPIterationSpace().
|
static |
Convert integer expression E to make it have at least Bits bits.
Definition at line 4858 of file SemaOpenMP.cpp.
References clang::Sema::AA_Converting, clang::Sema::Context, clang::ExprError(), clang::Expr::getType(), and clang::Sema::PerformImplicitConversion().
Referenced by CheckOpenMPLoop().