Skip to content

Commit 3870e54

Browse files
authored
[flang][OpenMP] Delete no longer used Omp[End]CriticalDirective, NFC (#155099)
1 parent e007a38 commit 3870e54

File tree

5 files changed

+0
-33
lines changed

5 files changed

+0
-33
lines changed

flang/examples/FeatureList/FeatureList.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,6 @@ struct NodeVisitor {
450450
READ_FEATURE(OmpBeginSectionsDirective)
451451
READ_FEATURE(OmpClause)
452452
READ_FEATURE(OmpClauseList)
453-
READ_FEATURE(OmpCriticalDirective)
454453
READ_FEATURE(OmpDeclareTargetSpecifier)
455454
READ_FEATURE(OmpDeclareTargetWithClause)
456455
READ_FEATURE(OmpDeclareTargetWithList)
@@ -472,7 +471,6 @@ struct NodeVisitor {
472471
READ_FEATURE(OmpIterationOffset)
473472
READ_FEATURE(OmpIterationVector)
474473
READ_FEATURE(OmpEndDirective)
475-
READ_FEATURE(OmpEndCriticalDirective)
476474
READ_FEATURE(OmpEndLoopDirective)
477475
READ_FEATURE(OmpEndSectionsDirective)
478476
READ_FEATURE(OmpGrainsizeClause)

flang/include/flang/Parser/dump-parse-tree.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,6 @@ class ParseTreeDumper {
537537
NODE_ENUM(OmpCloseModifier, Value)
538538
NODE(parser, OmpContainsClause)
539539
NODE(parser, OmpContextSelectorSpecification)
540-
NODE(parser, OmpCriticalDirective)
541540
NODE(parser, OmpDeclareTargetSpecifier)
542541
NODE(parser, OmpDeclareTargetWithClause)
543542
NODE(parser, OmpDeclareTargetWithList)
@@ -572,7 +571,6 @@ class ParseTreeDumper {
572571
NODE(parser, OmpDynGroupprivateClause)
573572
NODE(OmpDynGroupprivateClause, Modifier)
574573
NODE(parser, OmpEndAssumeDirective)
575-
NODE(parser, OmpEndCriticalDirective)
576574
NODE(parser, OmpEndDirective)
577575
NODE(parser, OmpEndLoopDirective)
578576
NODE(parser, OmpEndSectionsDirective)

flang/include/flang/Parser/openmp-utils.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ struct ConstructId {
3939
}
4040

4141
MAKE_CONSTR_ID(OmpAssumeDirective, D::OMPD_assume);
42-
MAKE_CONSTR_ID(OmpCriticalDirective, D::OMPD_critical);
4342
MAKE_CONSTR_ID(OmpDeclareVariantDirective, D::OMPD_declare_variant);
4443
MAKE_CONSTR_ID(OmpErrorDirective, D::OMPD_error);
4544
MAKE_CONSTR_ID(OmpMetadirectiveDirective, D::OMPD_metadirective);
@@ -105,7 +104,6 @@ struct DirectiveNameScope {
105104
if constexpr (std::is_base_of_v<OmpBlockConstruct, T>) {
106105
return std::get<OmpBeginDirective>(x.t).DirName();
107106
} else if constexpr (std::is_same_v<T, OmpAssumeDirective> ||
108-
std::is_same_v<T, OmpCriticalDirective> ||
109107
std::is_same_v<T, OmpDeclareVariantDirective> ||
110108
std::is_same_v<T, OmpErrorDirective> ||
111109
std::is_same_v<T, OmpMetadirectiveDirective> ||

flang/include/flang/Parser/parse-tree.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5000,18 +5000,6 @@ struct OpenMPDeclarativeConstruct {
50005000
u;
50015001
};
50025002

5003-
// 2.13.2 CRITICAL [Name] <block> END CRITICAL [Name]
5004-
struct OmpCriticalDirective {
5005-
TUPLE_CLASS_BOILERPLATE(OmpCriticalDirective);
5006-
CharBlock source;
5007-
std::tuple<Verbatim, std::optional<Name>, OmpClauseList> t;
5008-
};
5009-
struct OmpEndCriticalDirective {
5010-
TUPLE_CLASS_BOILERPLATE(OmpEndCriticalDirective);
5011-
CharBlock source;
5012-
std::tuple<Verbatim, std::optional<Name>> t;
5013-
};
5014-
50155003
struct OpenMPCriticalConstruct : public OmpBlockConstruct {
50165004
INHERITED_TUPLE_CLASS_BOILERPLATE(OpenMPCriticalConstruct, OmpBlockConstruct);
50175005
};

flang/lib/Parser/unparse.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2595,21 +2595,6 @@ class UnparseVisitor {
25952595
Word("!$OMP END ASSUME\n");
25962596
EndOpenMP();
25972597
}
2598-
void Unparse(const OmpCriticalDirective &x) {
2599-
BeginOpenMP();
2600-
Word("!$OMP CRITICAL");
2601-
Walk(" (", std::get<std::optional<Name>>(x.t), ")");
2602-
Walk(std::get<OmpClauseList>(x.t));
2603-
Put("\n");
2604-
EndOpenMP();
2605-
}
2606-
void Unparse(const OmpEndCriticalDirective &x) {
2607-
BeginOpenMP();
2608-
Word("!$OMP END CRITICAL");
2609-
Walk(" (", std::get<std::optional<Name>>(x.t), ")");
2610-
Put("\n");
2611-
EndOpenMP();
2612-
}
26132598
void Unparse(const OpenMPCriticalConstruct &x) {
26142599
Unparse(static_cast<const OmpBlockConstruct &>(x));
26152600
}

0 commit comments

Comments
 (0)