Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
llvm-doe
llvm-project
Commits
86862232
Commit
86862232
authored
Jul 07, 2020
by
Michael Kruse
Browse files
Some cleanup
parent
7d370766
Changes
29
Hide whitespace changes
Inline
Side-by-side
clang/include/clang/AST/OpenMPClause.h
View file @
86862232
...
...
@@ -792,6 +792,100 @@ public:
}
};
/// This represents the 'sizes' clause in the '#pragma omp tile' directive.
///
/// \code
/// #pragma omp tile sizes(5,5)
/// for (int i = 0; i < 64; ++i)
/// for (int j = 0; j < 64; ++j)
/// \endcode
class
OMPSizesClause
final
:
public
OMPClause
,
private
llvm
::
TrailingObjects
<
OMPSizesClause
,
Expr
*>
{
friend
class
OMPClauseReader
;
friend
class
llvm
::
TrailingObjects
<
OMPSizesClause
,
Expr
*>
;
/// Location of '('.
SourceLocation
LParenLoc
;
/// Number of tile sizes in the clause.
unsigned
NumSizes
;
/// Build an empty clause.
explicit
OMPSizesClause
(
int
NumSizes
)
:
OMPClause
(
llvm
::
omp
::
OMPC_sizes
,
SourceLocation
(),
SourceLocation
()),
NumSizes
(
NumSizes
)
{}
public:
/// Build a 'sizes' AST node.
///
/// \param C Context of the AST.
/// \param StartLoc Location of the 'sizes' identifier.
/// \param LParenLoc Location of '('.
/// \param EndLoc Location of ')'.
/// \param Sizes Content of the clause.
static
OMPSizesClause
*
Create
(
const
ASTContext
&
C
,
SourceLocation
StartLoc
,
SourceLocation
LParenLoc
,
SourceLocation
EndLoc
,
ArrayRef
<
Expr
*>
Sizes
);
/// Build an empty 'sizes' AST node for deserialization.
///
/// \param C Context of the AST.
/// \param Sizes Number of items in the clause.
static
OMPSizesClause
*
CreateEmpty
(
const
ASTContext
&
C
,
unsigned
NumSizes
);
/// Sets the location of '('.
void
setLParenLoc
(
SourceLocation
Loc
)
{
LParenLoc
=
Loc
;
}
/// Returns the location of '('.
SourceLocation
getLParenLoc
()
const
{
return
LParenLoc
;
}
/// Returns the number of list items.
unsigned
getNumSizes
()
const
{
return
NumSizes
;
}
/// Returns the tile size expressions.
MutableArrayRef
<
Expr
*>
getSizesRefs
()
{
return
MutableArrayRef
<
Expr
*>
(
static_cast
<
OMPSizesClause
*>
(
this
)
->
template
getTrailingObjects
<
Expr
*
>(),
NumSizes
);
}
ArrayRef
<
Expr
*>
getSizesRefs
()
const
{
return
ArrayRef
<
Expr
*>
(
static_cast
<
const
OMPSizesClause
*>
(
this
)
->
template
getTrailingObjects
<
Expr
*
>(),
NumSizes
);
}
/// Sets the tile size expressions.
void
setSizesRefs
(
ArrayRef
<
Expr
*>
VL
)
{
assert
(
VL
.
size
()
==
NumSizes
);
std
::
copy
(
VL
.
begin
(),
VL
.
end
(),
static_cast
<
OMPSizesClause
*>
(
this
)
->
template
getTrailingObjects
<
Expr
*
>());
}
child_range
children
()
{
MutableArrayRef
<
Expr
*>
Sizes
=
getSizesRefs
();
return
child_range
(
reinterpret_cast
<
Stmt
**>
(
Sizes
.
begin
()),
reinterpret_cast
<
Stmt
**>
(
Sizes
.
end
()));
}
const_child_range
children
()
const
{
ArrayRef
<
Expr
*>
Sizes
=
getSizesRefs
();
return
const_child_range
(
reinterpret_cast
<
Stmt
*
const
*>
(
Sizes
.
begin
()),
reinterpret_cast
<
Stmt
*
const
*>
(
Sizes
.
end
()));
}
child_range
used_children
()
{
return
child_range
(
child_iterator
(),
child_iterator
());
}
const_child_range
used_children
()
const
{
return
const_child_range
(
const_child_iterator
(),
const_child_iterator
());
}
static
bool
classof
(
const
OMPClause
*
T
)
{
return
T
->
getClauseKind
()
==
llvm
::
omp
::
OMPC_sizes
;
}
};
/// This represents 'collapse' clause in the '#pragma omp ...'
/// directive.
///
...
...
@@ -7533,100 +7627,6 @@ public:
}
};
/// This represents the 'sizes' clause in the '#pragma omp tile' directive.
///
/// \code
/// #pragma omp tile sizes(5,5)
/// for (int i = 0; i < 64; ++i)
/// for (int j = 0; j < 64; ++j)
/// \endcode
class
OMPSizesClause
final
:
public
OMPClause
,
private
llvm
::
TrailingObjects
<
OMPSizesClause
,
Expr
*>
{
friend
class
OMPClauseReader
;
friend
class
llvm
::
TrailingObjects
<
OMPSizesClause
,
Expr
*>
;
/// Location of '('.
SourceLocation
LParenLoc
;
/// Number of tile sizes in the clause.
unsigned
NumSizes
;
/// Build an empty clause.
explicit
OMPSizesClause
(
int
NumSizes
)
:
OMPClause
(
llvm
::
omp
::
OMPC_sizes
,
SourceLocation
(),
SourceLocation
()),
NumSizes
(
NumSizes
)
{}
public:
/// Build a 'sizes' AST node.
///
/// \param C Context of the AST.
/// \param StartLoc Location of the 'sizes' identifier.
/// \param LParenLoc Location of '('.
/// \param EndLoc Location of ')'.
/// \param Sizes Content of the clause.
static
OMPSizesClause
*
Create
(
const
ASTContext
&
C
,
SourceLocation
StartLoc
,
SourceLocation
LParenLoc
,
SourceLocation
EndLoc
,
ArrayRef
<
Expr
*>
Sizes
);
/// Build an empty 'sizes' AST node for deserialization.
///
/// \param C Context of the AST.
/// \param Sizes Number of items in the clause.
static
OMPSizesClause
*
CreateEmpty
(
const
ASTContext
&
C
,
unsigned
NumSizes
);
/// Sets the location of '('.
void
setLParenLoc
(
SourceLocation
Loc
)
{
LParenLoc
=
Loc
;
}
/// Returns the location of '('.
SourceLocation
getLParenLoc
()
const
{
return
LParenLoc
;
}
/// Returns the number of list items.
unsigned
getNumSizes
()
const
{
return
NumSizes
;
}
/// Returns the tile size expressions.
MutableArrayRef
<
Expr
*>
getSizesRefs
()
{
return
MutableArrayRef
<
Expr
*>
(
static_cast
<
OMPSizesClause
*>
(
this
)
->
template
getTrailingObjects
<
Expr
*
>(),
NumSizes
);
}
ArrayRef
<
Expr
*>
getSizesRefs
()
const
{
return
ArrayRef
<
Expr
*>
(
static_cast
<
const
OMPSizesClause
*>
(
this
)
->
template
getTrailingObjects
<
Expr
*
>(),
NumSizes
);
}
/// Sets the tile size expressions.
void
setSizesRefs
(
ArrayRef
<
Expr
*>
VL
)
{
assert
(
VL
.
size
()
==
NumSizes
);
std
::
copy
(
VL
.
begin
(),
VL
.
end
(),
static_cast
<
OMPSizesClause
*>
(
this
)
->
template
getTrailingObjects
<
Expr
*
>());
}
child_range
children
()
{
MutableArrayRef
<
Expr
*>
Sizes
=
getSizesRefs
();
return
child_range
(
reinterpret_cast
<
Stmt
**>
(
Sizes
.
begin
()),
reinterpret_cast
<
Stmt
**>
(
Sizes
.
end
()));
}
const_child_range
children
()
const
{
ArrayRef
<
Expr
*>
Sizes
=
getSizesRefs
();
return
const_child_range
(
reinterpret_cast
<
Stmt
*
const
*>
(
Sizes
.
begin
()),
reinterpret_cast
<
Stmt
*
const
*>
(
Sizes
.
end
()));
}
child_range
used_children
()
{
return
child_range
(
child_iterator
(),
child_iterator
());
}
const_child_range
used_children
()
const
{
return
const_child_range
(
const_child_iterator
(),
const_child_iterator
());
}
static
bool
classof
(
const
OMPClause
*
T
)
{
return
T
->
getClauseKind
()
==
llvm
::
omp
::
OMPC_sizes
;
}
};
/// This class implements a simple visitor for OMPClause
/// subclasses.
template
<
class
ImplClass
,
template
<
typename
>
class
Ptr
,
typename
RetTy
>
...
...
clang/include/clang/AST/RecursiveASTVisitor.h
View file @
86862232
...
...
@@ -15,16 +15,16 @@
#include "clang/AST/Attr.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclarationName.h"
#include "clang/AST/DeclBase.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclFriend.h"
#include "clang/AST/DeclObjC.h"
#include "clang/AST/DeclOpenMP.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/AST/DeclarationName.h"
#include "clang/AST/Expr.h"
#include "clang/AST/ExprCXX.h"
#include "clang/AST/ExprConcepts.h"
#include "clang/AST/ExprCXX.h"
#include "clang/AST/ExprObjC.h"
#include "clang/AST/ExprOpenMP.h"
#include "clang/AST/LambdaCapture.h"
...
...
@@ -2832,6 +2832,9 @@ DEF_TRAVERSE_STMT(OMPParallelDirective,
DEF_TRAVERSE_STMT
(
OMPSimdDirective
,
{
TRY_TO
(
TraverseOMPExecutableDirective
(
S
));
})
DEF_TRAVERSE_STMT
(
OMPTileDirective
,
{
TRY_TO
(
TraverseOMPExecutableDirective
(
S
));
})
DEF_TRAVERSE_STMT
(
OMPForDirective
,
{
TRY_TO
(
TraverseOMPExecutableDirective
(
S
));
})
...
...
@@ -2990,9 +2993,6 @@ DEF_TRAVERSE_STMT(OMPTargetTeamsDistributeParallelForSimdDirective,
DEF_TRAVERSE_STMT
(
OMPTargetTeamsDistributeSimdDirective
,
{
TRY_TO
(
TraverseOMPExecutableDirective
(
S
));
})
DEF_TRAVERSE_STMT
(
OMPTileDirective
,
{
TRY_TO
(
TraverseOMPExecutableDirective
(
S
));
})
// OpenMP clauses.
template
<
typename
Derived
>
bool
RecursiveASTVisitor
<
Derived
>::
TraverseOMPClause
(
OMPClause
*
C
)
{
...
...
@@ -3074,6 +3074,13 @@ bool RecursiveASTVisitor<Derived>::VisitOMPSimdlenClause(OMPSimdlenClause *C) {
return
true
;
}
template
<
typename
Derived
>
bool
RecursiveASTVisitor
<
Derived
>::
VisitOMPSizesClause
(
OMPSizesClause
*
C
)
{
for
(
Expr
*
E
:
C
->
getSizesRefs
())
TRY_TO
(
TraverseStmt
(
E
));
return
true
;
}
template
<
typename
Derived
>
bool
RecursiveASTVisitor
<
Derived
>::
VisitOMPCollapseClause
(
OMPCollapseClause
*
C
)
{
...
...
@@ -3565,13 +3572,6 @@ bool RecursiveASTVisitor<Derived>::VisitOMPOrderClause(OMPOrderClause *) {
return
true
;
}
template
<
typename
Derived
>
bool
RecursiveASTVisitor
<
Derived
>::
VisitOMPSizesClause
(
OMPSizesClause
*
C
)
{
for
(
Expr
*
E
:
C
->
getSizesRefs
())
TRY_TO
(
TraverseStmt
(
E
));
return
true
;
}
template
<
typename
Derived
>
bool
RecursiveASTVisitor
<
Derived
>::
VisitOMPDetachClause
(
OMPDetachClause
*
C
)
{
TRY_TO
(
TraverseStmt
(
C
->
getEventHandler
()));
...
...
clang/include/clang/AST/StmtOpenMP.h
View file @
86862232
...
...
@@ -313,20 +313,20 @@ public:
/// Methods with similar functionality:
///
/// * IgnoreContainers(true) - Not specific to OpenMP; also ignores
/// containers/captures potentially inside the associated code.
///
containers/captures potentially inside the associated code.
///
/// * getCapturedStmt(Kind) - Return the capture of the specified kind;
/// requires the captured decl/stmt to exist.
///
requires the captured decl/stmt to exist.
///
/// * getInnermostCapturedStmt() - Returns the innermost capture containing
/// the associated code; also cannot be used if there is no CapturedStmt,
/// e.g. for loop transformations.
///
the associated code; also cannot be used if there is no CapturedStmt,
///
e.g. for loop transformations.
///
/// * getBody() - In addition to ignoring captures, also skips associated
/// loops.
///
loops.
///
/// * getStructuredBlock() - For loop-associated directives, returns the
/// body; for others, returns the captured statement.
///
body; for others, returns the captured statement.
///
Stmt
*
ignoreCaptures
();
const
Stmt
*
ignoreCaptures
()
const
{
...
...
clang/include/clang/Basic/OpenMPKinds.def
View file @
86862232
...
...
@@ -62,9 +62,6 @@
#ifndef OPENMP_REDUCTION_MODIFIER
#define OPENMP_REDUCTION_MODIFIER(Name)
#endif
#ifndef OPENMP_TILE_CLAUSE
# define OPENMP_TILE_CLAUSE(Name)
#endif
// Static attributes for 'schedule' clause.
OPENMP_SCHEDULE_KIND(static)
...
...
@@ -153,9 +150,6 @@ OPENMP_REDUCTION_MODIFIER(default)
OPENMP_REDUCTION_MODIFIER(inscan)
OPENMP_REDUCTION_MODIFIER(task)
// Clauses allowed for directive 'omp tile'.
OPENMP_TILE_CLAUSE(sizes)
#undef OPENMP_REDUCTION_MODIFIER
#undef OPENMP_DEVICE_MODIFIER
#undef OPENMP_ORDER_KIND
...
...
@@ -174,4 +168,3 @@ OPENMP_TILE_CLAUSE(sizes)
#undef OPENMP_DEFAULTMAP_KIND
#undef OPENMP_DEFAULTMAP_MODIFIER
#undef OPENMP_TILE_CLAUSE
clang/include/clang/Basic/OpenMPKinds.h
View file @
86862232
...
...
@@ -156,12 +156,6 @@ enum OpenMPOrderClauseKind {
OMPC_ORDER_unknown
,
};
enum
OpenMPTileClauseKind
{
#define OPENMP_TILE_KIND(Name) OMPC_TILE_##Name,
#include "clang/Basic/OpenMPKinds.def"
OMPC_TILE_unknown
,
};
/// Scheduling data for loop-based OpenMP directives.
struct
OpenMPScheduleTy
final
{
OpenMPScheduleClauseKind
Schedule
=
OMPC_SCHEDULE_unknown
;
...
...
clang/include/clang/Basic/StmtNodes.td
View file @
86862232
...
...
@@ -220,6 +220,7 @@ def OMPExecutableDirective : StmtNode<Stmt, 1>;
def OMPLoopDirective : StmtNode<OMPExecutableDirective, 1>;
def OMPParallelDirective : StmtNode<OMPExecutableDirective>;
def OMPSimdDirective : StmtNode<OMPLoopDirective>;
def OMPTileDirective : StmtNode<OMPLoopDirective>;
def OMPForDirective : StmtNode<OMPLoopDirective>;
def OMPForSimdDirective : StmtNode<OMPLoopDirective>;
def OMPSectionsDirective : StmtNode<OMPExecutableDirective>;
...
...
@@ -272,4 +273,3 @@ def OMPTargetTeamsDistributeDirective : StmtNode<OMPLoopDirective>;
def OMPTargetTeamsDistributeParallelForDirective : StmtNode<OMPLoopDirective>;
def OMPTargetTeamsDistributeParallelForSimdDirective : StmtNode<OMPLoopDirective>;
def OMPTargetTeamsDistributeSimdDirective : StmtNode<OMPLoopDirective>;
def OMPTileDirective : StmtNode<OMPLoopDirective>;
clang/include/clang/Sema/Sema.h
View file @
86862232
...
...
@@ -10174,6 +10174,12 @@ public:
ActOnOpenMPSimdDirective(ArrayRef<OMPClause *> Clauses, Stmt *AStmt,
SourceLocation StartLoc, SourceLocation EndLoc,
VarsWithInheritedDSAType &VarsWithImplicitDSA);
/// Called on well-formed '#pragma omp tile' after parsing of its clauses and
/// the associated statement.
StmtResult
ActOnOpenMPTileDirective(ArrayRef<OMPClause *> Clauses, Stmt *AStmt,
SourceLocation StartLoc, SourceLocation EndLoc,
VarsWithInheritedDSAType &VarsWithImplicitDSA);
/// Called on well-formed '\#pragma omp for' after parsing
/// of the associated statement.
StmtResult
...
...
@@ -10435,12 +10441,7 @@ public:
ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
/// Called on well-formed '#pragma omp tile' after parsing of its clauses and
/// the associated statement.
StmtResult
ActOnOpenMPTileDirective(ArrayRef<OMPClause *> Clauses, Stmt *AStmt,
SourceLocation StartLoc, SourceLocation EndLoc,
VarsWithInheritedDSAType &VarsWithImplicitDSA);
/// Checks correctness of linear modifiers.
bool CheckOpenMPLinearModifier(OpenMPLinearClauseKind LinKind,
...
...
@@ -10517,6 +10518,11 @@ public:
OMPClause *ActOnOpenMPSimdlenClause(Expr *Length, SourceLocation StartLoc,
SourceLocation LParenLoc,
SourceLocation EndLoc);
/// Called on well-form 'sizes' clause.
OMPClause *ActOnOpenMPSizesClause(ArrayRef<Expr *> SizeExprs,
SourceLocation StartLoc,
SourceLocation LParenLoc,
SourceLocation EndLoc);
/// Called on well-formed 'collapse' clause.
OMPClause *ActOnOpenMPCollapseClause(Expr *NumForLoops,
SourceLocation StartLoc,
...
...
@@ -10826,12 +10832,6 @@ public:
SourceLocation LParenLoc,
SourceLocation EndLoc);
/// Called on well-form 'size' clause.
OMPClause *ActOnOpenMPSizesClause(ArrayRef<Expr *> SizeExprs,
SourceLocation StartLoc,
SourceLocation LParenLoc,
SourceLocation EndLoc);
/// Data for list of allocators.
struct UsesAllocatorsData {
/// Allocator.
...
...
clang/include/clang/Serialization/ASTBitCodes.h
View file @
86862232
...
...
@@ -1824,21 +1824,21 @@ public:
/// A CXXBoolLiteralExpr record.
EXPR_CXX_BOOL_LITERAL
,
EXPR_CXX_NULL_PTR_LITERAL
,
// CXXNullPtrLiteralExpr
EXPR_CXX_TYPEID_EXPR
,
// CXXTypeidExpr (of expr).
EXPR_CXX_TYPEID_TYPE
,
// CXXTypeidExpr (of type).
EXPR_CXX_THIS
,
// CXXThisExpr
EXPR_CXX_THROW
,
// CXXThrowExpr
EXPR_CXX_DEFAULT_ARG
,
// CXXDefaultArgExpr
EXPR_CXX_DEFAULT_INIT
,
// CXXDefaultInitExpr
EXPR_CXX_BIND_TEMPORARY
,
// CXXBindTemporaryExpr
EXPR_CXX_NULL_PTR_LITERAL
,
// CXXNullPtrLiteralExpr
EXPR_CXX_TYPEID_EXPR
,
// CXXTypeidExpr (of expr).
EXPR_CXX_TYPEID_TYPE
,
// CXXTypeidExpr (of type).
EXPR_CXX_THIS
,
// CXXThisExpr
EXPR_CXX_THROW
,
// CXXThrowExpr
EXPR_CXX_DEFAULT_ARG
,
// CXXDefaultArgExpr
EXPR_CXX_DEFAULT_INIT
,
// CXXDefaultInitExpr
EXPR_CXX_BIND_TEMPORARY
,
// CXXBindTemporaryExpr
EXPR_CXX_SCALAR_VALUE_INIT
,
// CXXScalarValueInitExpr
EXPR_CXX_NEW
,
// CXXNewExpr
EXPR_CXX_DELETE
,
// CXXDeleteExpr
EXPR_CXX_PSEUDO_DESTRUCTOR
,
// CXXPseudoDestructorExpr
EXPR_EXPR_WITH_CLEANUPS
,
// ExprWithCleanups
EXPR_EXPR_WITH_CLEANUPS
,
// ExprWithCleanups
EXPR_CXX_DEPENDENT_SCOPE_MEMBER
,
// CXXDependentScopeMemberExpr
EXPR_CXX_DEPENDENT_SCOPE_DECL_REF
,
// DependentScopeDeclRefExpr
...
...
@@ -1846,43 +1846,44 @@ public:
EXPR_CXX_UNRESOLVED_MEMBER
,
// UnresolvedMemberExpr
EXPR_CXX_UNRESOLVED_LOOKUP
,
// UnresolvedLookupExpr
EXPR_CXX_EXPRESSION_TRAIT
,
// ExpressionTraitExpr
EXPR_CXX_NOEXCEPT
,
// CXXNoexceptExpr
EXPR_CXX_EXPRESSION_TRAIT
,
// ExpressionTraitExpr
EXPR_CXX_NOEXCEPT
,
// CXXNoexceptExpr
EXPR_OPAQUE_VALUE
,
// OpaqueValueExpr
EXPR_BINARY_CONDITIONAL_OPERATOR
,
// BinaryConditionalOperator
EXPR_TYPE_TRAIT
,
// TypeTraitExpr
EXPR_ARRAY_TYPE_TRAIT
,
// ArrayTypeTraitIntExpr
EXPR_OPAQUE_VALUE
,
// OpaqueValueExpr
EXPR_BINARY_CONDITIONAL_OPERATOR
,
// BinaryConditionalOperator
EXPR_TYPE_TRAIT
,
// TypeTraitExpr
EXPR_ARRAY_TYPE_TRAIT
,
// ArrayTypeTraitIntExpr
EXPR_PACK_EXPANSION
,
// PackExpansionExpr
EXPR_SIZEOF_PACK
,
// SizeOfPackExpr
EXPR_SUBST_NON_TYPE_TEMPLATE_PARM
,
// SubstNonTypeTemplateParmExpr
EXPR_SUBST_NON_TYPE_TEMPLATE_PARM_PACK
,
// SubstNonTypeTemplateParmPackExpr
EXPR_FUNCTION_PARM_PACK
,
// FunctionParmPackExpr
EXPR_MATERIALIZE_TEMPORARY
,
// MaterializeTemporaryExpr
EXPR_CXX_FOLD
,
// CXXFoldExpr
EXPR_CONCEPT_SPECIALIZATION
,
// ConceptSpecializationExpr
EXPR_REQUIRES
,
// RequiresExpr
EXPR_PACK_EXPANSION
,
// PackExpansionExpr
EXPR_SIZEOF_PACK
,
// SizeOfPackExpr
EXPR_SUBST_NON_TYPE_TEMPLATE_PARM
,
// SubstNonTypeTemplateParmExpr
EXPR_SUBST_NON_TYPE_TEMPLATE_PARM_PACK
,
// SubstNonTypeTemplateParmPackExpr
EXPR_FUNCTION_PARM_PACK
,
// FunctionParmPackExpr
EXPR_MATERIALIZE_TEMPORARY
,
// MaterializeTemporaryExpr
EXPR_CXX_FOLD
,
// CXXFoldExpr
EXPR_CONCEPT_SPECIALIZATION
,
// ConceptSpecializationExpr
EXPR_REQUIRES
,
// RequiresExpr
// CUDA
EXPR_CUDA_KERNEL_CALL
,
// CUDAKernelCallExpr
EXPR_CUDA_KERNEL_CALL
,
// CUDAKernelCallExpr
// OpenCL
EXPR_ASTYPE
,
// AsTypeExpr
EXPR_ASTYPE
,
// AsTypeExpr
// Microsoft
EXPR_CXX_PROPERTY_REF_EXPR
,
// MSPropertyRefExpr
EXPR_CXX_PROPERTY_REF_EXPR
,
// MSPropertyRefExpr
EXPR_CXX_PROPERTY_SUBSCRIPT_EXPR
,
// MSPropertySubscriptExpr
EXPR_CXX_UUIDOF_EXPR
,
// CXXUuidofExpr (of expr).
EXPR_CXX_UUIDOF_TYPE
,
// CXXUuidofExpr (of type).
STMT_SEH_LEAVE
,
// SEHLeaveStmt
STMT_SEH_EXCEPT
,
// SEHExceptStmt
STMT_SEH_FINALLY
,
// SEHFinallyStmt
STMT_SEH_TRY
,
// SEHTryStmt
EXPR_CXX_UUIDOF_EXPR
,
// CXXUuidofExpr (of expr).
EXPR_CXX_UUIDOF_TYPE
,
// CXXUuidofExpr (of type).
STMT_SEH_LEAVE
,
// SEHLeaveStmt
STMT_SEH_EXCEPT
,
// SEHExceptStmt
STMT_SEH_FINALLY
,
// SEHFinallyStmt
STMT_SEH_TRY
,
// SEHTryStmt
// OpenMP directives
STMT_OMP_PARALLEL_DIRECTIVE
,
STMT_OMP_SIMD_DIRECTIVE
,
STMT_OMP_TILE_DIRECTIVE
,
STMT_OMP_FOR_DIRECTIVE
,
STMT_OMP_FOR_SIMD_DIRECTIVE
,
STMT_OMP_SECTIONS_DIRECTIVE
,
...
...
@@ -1935,16 +1936,15 @@ public:
STMT_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_DIRECTIVE
,
STMT_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_DIRECTIVE
,
STMT_OMP_TARGET_TEAMS_DISTRIBUTE_SIMD_DIRECTIVE
,
STMT_OMP_TILE_DIRECTIVE
,
EXPR_OMP_ARRAY_SECTION
,
EXPR_OMP_ARRAY_SHAPING
,
EXPR_OMP_ITERATOR
,
// ARC
EXPR_OBJC_BRIDGED_CAST
,
// ObjCBridgedCastExpr
EXPR_OBJC_BRIDGED_CAST
,
// ObjCBridgedCastExpr
STMT_MS_DEPENDENT_EXISTS
,
// MSDependentExistsStmt
EXPR_LAMBDA
,
// LambdaExpr
STMT_MS_DEPENDENT_EXISTS
,
// MSDependentExistsStmt
EXPR_LAMBDA
,
// LambdaExpr
STMT_COROUTINE_BODY
,
STMT_CORETURN
,
EXPR_COAWAIT
,
...
...
clang/lib/AST/ASTTypeTraits.cpp
View file @
86862232
...
...
@@ -21,25 +21,25 @@
using
namespace
clang
;
const
ASTNodeKind
::
KindInfo
ASTNodeKind
::
AllKindInfo
[]
=
{
{
NKI_None
,
"<None>"
},
{
NKI_None
,
"TemplateArgument"
},
{
NKI_None
,
"TemplateName"
},
{
NKI_None
,
"NestedNameSpecifierLoc"
},
{
NKI_None
,
"QualType"
},
{
NKI_None
,
"TypeLoc"
},
{
NKI_None
,
"CXXBaseSpecifier"
},
{
NKI_None
,
"CXXCtorInitializer"
},
{
NKI_None
,
"NestedNameSpecifier"
},
{
NKI_None
,
"Decl"
},
{
NKI_None
,
"<None>"
},
{
NKI_None
,
"TemplateArgument"
},
{
NKI_None
,
"TemplateName"
},
{
NKI_None
,
"NestedNameSpecifierLoc"
},
{
NKI_None
,
"QualType"
},
{
NKI_None
,
"TypeLoc"
},
{
NKI_None
,
"CXXBaseSpecifier"
},
{
NKI_None
,
"CXXCtorInitializer"
},
{
NKI_None
,
"NestedNameSpecifier"
},
{
NKI_None
,
"Decl"
},
#define DECL(DERIVED, BASE) { NKI_##BASE, #DERIVED "Decl" },
#include "clang/AST/DeclNodes.inc"
{
NKI_None
,
"Stmt"
},
{
NKI_None
,
"Stmt"
},
#define STMT(DERIVED, BASE) { NKI_##BASE, #DERIVED },
#include "clang/AST/StmtNodes.inc"
{
NKI_None
,
"Type"
},
{
NKI_None
,
"Type"
},
#define TYPE(DERIVED, BASE) { NKI_##BASE, #DERIVED "Type" },
#include "clang/AST/TypeNodes.inc"
{
NKI_None
,
"OMPClause"
},
{
NKI_None
,
"OMPClause"
},
#define OMP_CLAUSE_CLASS(Enum, Str, Class) {NKI_OMPClause, #Class},
#include "llvm/Frontend/OpenMP/OMPKinds.def"
};
...
...
clang/lib/AST/OpenMPClause.cpp
View file @
86862232
...
...
@@ -100,6 +100,7 @@ const OMPClauseWithPreInit *OMPClauseWithPreInit::get(const OMPClause *C) {
case
OMPC_proc_bind
:
case
OMPC_safelen
:
case
OMPC_simdlen
:
case
OMPC_sizes
:
case
OMPC_allocator
:
case
OMPC_allocate
:
case
OMPC_collapse
:
...
...
@@ -151,7 +152,6 @@ const OMPClauseWithPreInit *OMPClauseWithPreInit::get(const OMPClause *C) {
case
OMPC_detach
:
case
OMPC_inclusive
:
case
OMPC_exclusive
:
case
OMPC_sizes
:
case
OMPC_uses_allocators
:
case
OMPC_affinity
:
break
;
...
...
@@ -187,6 +187,7 @@ const OMPClauseWithPostUpdate *OMPClauseWithPostUpdate::get(const OMPClause *C)
case
OMPC_num_threads
:
case
OMPC_safelen
:
case
OMPC_simdlen
:
case
OMPC_sizes
:
case
OMPC_allocator
:
case
OMPC_allocate
:
case
OMPC_collapse
:
...
...
@@ -244,7 +245,6 @@ const OMPClauseWithPostUpdate *OMPClauseWithPostUpdate::get(const OMPClause *C)
case
OMPC_detach
:
case
OMPC_inclusive
:
case
OMPC_exclusive
:
case
OMPC_sizes
:
case
OMPC_uses_allocators
:
case
OMPC_affinity
:
break
;
...
...
@@ -899,6 +899,25 @@ OMPInReductionClause *OMPInReductionClause::CreateEmpty(const ASTContext &C,
return
new
(
Mem
)
OMPInReductionClause
(
N
);
}
OMPSizesClause
*
OMPSizesClause
::
Create
(
const
ASTContext
&
C
,
SourceLocation
StartLoc
,
SourceLocation
LParenLoc
,
SourceLocation
EndLoc
,
ArrayRef
<
Expr
*>
Sizes
)
{
OMPSizesClause
*
Clause
=
CreateEmpty
(
C
,
Sizes
.
size
());
Clause
->
setLocStart
(
StartLoc
);
Clause
->
setLParenLoc
(
LParenLoc
);
Clause
->
setLocEnd
(
EndLoc
);
Clause
->
setSizesRefs
(
Sizes
);
return
Clause
;
}
OMPSizesClause
*
OMPSizesClause
::
CreateEmpty
(
const
ASTContext
&
C
,
unsigned
NumSizes
)
{
void
*
Mem
=
C
.
Allocate
(
totalSizeToAlloc
<
Expr
*>
(
NumSizes
));