[flang][OpenMP] Rename some "construct" AST nodes to directives, NFC (#198196)

Change
  OpenMPAssumeConstruct    -> OmpAssumeDirective
  OpenMPDeclarativeAssumes -> OmpAssumesDirective
  OpenMPSectionConstruct   -> OmpSectionDirective
This commit is contained in:
Krzysztof Parzyszek authored and GitHub committed 2026-05-17 12:34:46 -05:00
1 parent 195c622972
commit 30e950f4c4
16 files changed
+66 -68

No files matched your search

+1 -1
View File
@@ -559,7 +559,7 @@ public:
READ_FEATURE(OmpRequiresDirective)
READ_FEATURE(OpenMPSimpleStandaloneConstruct)
READ_FEATURE(OpenMPStandaloneConstruct)
READ_FEATURE(OpenMPSectionConstruct)
READ_FEATURE(OmpSectionDirective)
READ_FEATURE(OpenMPSectionsConstruct)
READ_FEATURE(OmpThreadprivateDirective)
READ_FEATURE(OpenStmt)
+3 -3
View File
@@ -550,6 +550,8 @@ public:
NODE(OmpAppendArgsClause, OmpAppendOp)
NODE(parser, OmpArgument)
NODE(parser, OmpArgumentList)
NODE(parser, OmpAssumeDirective)
NODE(parser, OmpAssumesDirective)
NODE(parser, OmpAtClause)
NODE_ENUM(OmpAtClause, ActionTime)
NODE(parser, OmpAtomicDefaultMemOrderClause)
@@ -717,6 +719,7 @@ public:
NODE(parser, OmpScheduleClause)
NODE(OmpScheduleClause, Modifier)
NODE_ENUM(OmpScheduleClause, Kind)
NODE(parser, OmpSectionDirective)
NODE(parser, OmpSelfMapsClause)
NODE(parser, OmpSelfModifier)
NODE_ENUM(OmpSelfModifier, Value)
@@ -783,13 +786,11 @@ public:
NODE(parser, OpenACCWaitConstruct)
NODE(parser, OpenMPAllocatorsConstruct)
NODE(parser, OpenMPAssumeConstruct)
NODE(parser, OpenMPAtomicConstruct)
NODE(parser, OpenMPCancelConstruct)
NODE(parser, OpenMPCancellationPointConstruct)
NODE(parser, OpenMPConstruct)
NODE(parser, OpenMPCriticalConstruct)
NODE(parser, OpenMPDeclarativeAssumes)
NODE(parser, OpenMPDeclarativeConstruct)
NODE(parser, OpenMPDepobjConstruct)
NODE(parser, OpenMPDispatchConstruct)
@@ -797,7 +798,6 @@ public:
NODE(parser, OpenMPInvalidDirective)
NODE(parser, OpenMPLoopConstruct)
NODE(parser, OpenMPMisplacedEndDirective)
NODE(parser, OpenMPSectionConstruct)
NODE(parser, OpenMPSectionsConstruct)
NODE(parser, OpenMPSimpleStandaloneConstruct)
NODE(parser, OpenMPStandaloneConstruct)
+1 -1
View File
@@ -63,7 +63,7 @@ struct DirectiveNameScope {
return x;
}
static OmpDirectiveName GetOmpDirectiveName(const OpenMPSectionConstruct &x) {
static OmpDirectiveName GetOmpDirectiveName(const OmpSectionDirective &x) {
if (auto &spec{std::get<std::optional<OmpDirectiveSpecification>>(x.t)}) {
return spec->DirName();
} else {
+10 -11
View File
@@ -5164,9 +5164,8 @@ struct OmpUtilityDirective {
// assumes-construct ->
// ASSUMES absent-clause | contains-clause | holds-clause | no-openmp-clause |
// no-openmp-routines-clause | no-parallelism-clause
struct OpenMPDeclarativeAssumes {
WRAPPER_CLASS_BOILERPLATE(
OpenMPDeclarativeAssumes, OmpDirectiveSpecification);
struct OmpAssumesDirective {
WRAPPER_CLASS_BOILERPLATE(OmpAssumesDirective, OmpDirectiveSpecification);
CharBlock source;
};
@@ -5176,8 +5175,8 @@ struct OpenMPDeclarativeAssumes {
// ASSUME assumption-clause...
// block
// [END ASSUME]
struct OpenMPAssumeConstruct : public OmpBlockConstruct {
INHERITED_TUPLE_CLASS_BOILERPLATE(OpenMPAssumeConstruct, OmpBlockConstruct);
struct OmpAssumeDirective : public OmpBlockConstruct {
INHERITED_TUPLE_CLASS_BOILERPLATE(OmpAssumeDirective, OmpBlockConstruct);
};
// 2.7.2 SECTIONS
@@ -5196,8 +5195,8 @@ struct OmpEndSectionsDirective : public OmpEndDirective {
// [!$omp section
// structured-block]
// ...
struct OpenMPSectionConstruct {
TUPLE_CLASS_BOILERPLATE(OpenMPSectionConstruct);
struct OmpSectionDirective {
TUPLE_CLASS_BOILERPLATE(OmpSectionDirective);
std::tuple<std::optional<OmpDirectiveSpecification>, Block> t;
CharBlock source;
};
@@ -5212,7 +5211,7 @@ struct OpenMPSectionsConstruct {
return std::get<std::optional<OmpEndSectionsDirective>>(t);
}
// Each of the OpenMPConstructs in the list below contains an
// OpenMPSectionConstruct. This is guaranteed by the parser.
// OmpSectionDirective. This is guaranteed by the parser.
// The end sections directive is optional here because it is difficult to
// generate helpful error messages for a missing end directive within the
// parser. Semantics will generate an error if this is absent.
@@ -5325,7 +5324,7 @@ struct OmpAllocateDirective : public OmpBlockConstruct {
struct OpenMPDeclarativeConstruct {
UNION_CLASS_BOILERPLATE(OpenMPDeclarativeConstruct);
CharBlock source;
std::variant<OmpAllocateDirective, OpenMPDeclarativeAssumes,
std::variant<OmpAllocateDirective, OmpAssumesDirective,
OmpDeclareMapperDirective, OmpDeclareReductionDirective,
OmpDeclareSimdDirective, OmpDeclareTargetDirective,
OmpDeclareVariantDirective, OmpGroupprivateDirective,
@@ -5473,9 +5472,9 @@ struct OpenMPExecDirective {
struct OpenMPConstruct {
UNION_CLASS_BOILERPLATE(OpenMPConstruct);
std::variant<OpenMPStandaloneConstruct, OpenMPSectionsConstruct,
OpenMPSectionConstruct, OpenMPLoopConstruct, OmpBlockConstruct,
OmpSectionDirective, OpenMPLoopConstruct, OmpBlockConstruct,
OpenMPAtomicConstruct, OmpAllocateDirective, OpenMPDispatchConstruct,
OmpUtilityDirective, OpenMPAllocatorsConstruct, OpenMPAssumeConstruct,
OmpUtilityDirective, OpenMPAllocatorsConstruct, OmpAssumeDirective,
OpenMPCriticalConstruct, OmpDelimitedMetadirectiveDirective>
u;
};
+5 -5
View File
@@ -2607,13 +2607,13 @@ genSectionsOp(lower::AbstractConverter &converter, lower::SymMap &symTable,
lower::genOpenMPTerminator(builder, sectionsOp, loc);
// Generate nested SECTION constructs.
// This is done here rather than in genOMP([...], OpenMPSectionConstruct )
// This is done here rather than in genOMP([...], OmpSectionDirective )
// because we need to run genReductionVars on each omp.section so that the
// reduction variable gets mapped to the private version
for (auto [construct, nestedEval] :
llvm::zip(sectionBlocks, eval.getNestedEvaluations())) {
const auto *sectionConstruct =
std::get_if<parser::OpenMPSectionConstruct>(&construct.u);
std::get_if<parser::OmpSectionDirective>(&construct.u);
if (!sectionConstruct) {
assert(false &&
"unexpected construct nested inside of SECTIONS construct");
@@ -3973,7 +3973,7 @@ static void genOMP(lower::AbstractConverter &converter, lower::SymMap &symTable,
static void genOMP(lower::AbstractConverter &converter, lower::SymMap &symTable,
semantics::SemanticsContext &semaCtx,
lower::pft::Evaluation &eval,
const parser::OpenMPDeclarativeAssumes &assumesConstruct) {
const parser::OmpAssumesDirective &assumesConstruct) {
if (!semaCtx.langOptions().OpenMPSimd)
TODO(converter.getCurrentLocation(), "OpenMP ASSUMES declaration");
}
@@ -4678,7 +4678,7 @@ static void genOMP(lower::AbstractConverter &converter, lower::SymMap &symTable,
static void genOMP(lower::AbstractConverter &converter, lower::SymMap &symTable,
semantics::SemanticsContext &semaCtx,
lower::pft::Evaluation &eval,
const parser::OpenMPAssumeConstruct &assumeConstruct) {
const parser::OmpAssumeDirective &assumeConstruct) {
mlir::Location clauseLocation = converter.genLocation(assumeConstruct.source);
if (!semaCtx.langOptions().OpenMPSimd)
TODO(clauseLocation, "OpenMP ASSUME construct");
@@ -4772,7 +4772,7 @@ static void genOMP(lower::AbstractConverter &converter, lower::SymMap &symTable,
static void genOMP(lower::AbstractConverter &converter, lower::SymMap &symTable,
semantics::SemanticsContext &semaCtx,
lower::pft::Evaluation &eval,
const parser::OpenMPSectionConstruct &sectionConstruct) {
const parser::OmpSectionDirective &sectionConstruct) {
// Do nothing here. SECTION is lowered inside of the lowering for Sections
}
+7 -7
View File
@@ -2442,7 +2442,7 @@ TYPE_PARSER(sourced( //
OmpDirectiveSpecificationParser{})))
// Assumes Construct
TYPE_PARSER(sourced(construct<OpenMPDeclarativeAssumes>(
TYPE_PARSER(sourced(construct<OmpAssumesDirective>(
predicated(OmpDirectiveNameParser{},
IsDirective(llvm::omp::Directive::OMPD_assumes)) >=
OmpDirectiveSpecificationParser{})))
@@ -2451,7 +2451,7 @@ TYPE_PARSER(sourced(construct<OpenMPDeclarativeAssumes>(
TYPE_PARSER(
startOmpLine >> withMessage("expected OpenMP construct"_err_en_US,
sourced(construct<OpenMPDeclarativeConstruct>(
Parser<OpenMPDeclarativeAssumes>{}) ||
Parser<OmpAssumesDirective>{}) ||
construct<OpenMPDeclarativeConstruct>(
Parser<OmpDeclareReductionDirective>{}) ||
construct<OpenMPDeclarativeConstruct>(
@@ -2476,7 +2476,7 @@ TYPE_PARSER(
Parser<OmpMetadirectiveDirective>{})) /
endOmpLine))
TYPE_PARSER(sourced(construct<OpenMPAssumeConstruct>(
TYPE_PARSER(sourced(construct<OmpAssumeDirective>(
OmpBlockConstructParser{llvm::omp::Directive::OMPD_assume})))
// Block Construct
@@ -2538,9 +2538,9 @@ TYPE_PARSER(sourced(construct<OpenMPSectionsConstruct>(
Parser<OmpBeginSectionsDirective>{} / endOmpLine,
cons( //
construct<OpenMPConstruct>(sourced(
construct<OpenMPSectionConstruct>(maybe(sectionDir), validBlock))),
many(construct<OpenMPConstruct>(sourced(
construct<OpenMPSectionConstruct>(sectionDir, validBlock))))),
construct<OmpSectionDirective>(maybe(sectionDir), validBlock))),
many(construct<OpenMPConstruct>(
sourced(construct<OmpSectionDirective>(sectionDir, validBlock))))),
maybe(Parser<OmpEndSectionsDirective>{} / endOmpLine))))
static bool IsExecutionPart(const OmpDirectiveName &name) {
@@ -2569,7 +2569,7 @@ TYPE_CONTEXT_PARSER("OpenMP construct"_en_US,
construct<OpenMPConstruct>(Parser<OmpUtilityDirective>{}),
construct<OpenMPConstruct>(Parser<OpenMPDispatchConstruct>{}),
construct<OpenMPConstruct>(Parser<OpenMPAllocatorsConstruct>{}),
construct<OpenMPConstruct>(Parser<OpenMPAssumeConstruct>{}),
construct<OpenMPConstruct>(Parser<OmpAssumeDirective>{}),
construct<OpenMPConstruct>(Parser<OpenMPCriticalConstruct>{}),
construct<OpenMPConstruct>(
Parser<OmpDelimitedMetadirectiveDirective>{}))))
+1 -1
View File
@@ -80,7 +80,7 @@ struct DirectiveSpecificationScope {
return std::visit(
[](auto &&s) -> decltype(auto) { return GetODS(s); }, x.u);
} else {
static_assert(std::is_same_v<OpenMPSectionConstruct, T>);
static_assert(std::is_same_v<OmpSectionDirective, T>);
llvm_unreachable("This function does not work for SECTION");
}
}
+1 -1
View File
@@ -240,7 +240,7 @@ std::optional<Label> GetFinalLabel(const OpenMPConstruct &x) {
}
} else if constexpr ( //
std::is_same_v<TypeS, OpenMPLoopConstruct> ||
std::is_same_v<TypeS, OpenMPSectionConstruct> ||
std::is_same_v<TypeS, OmpSectionDirective> ||
std::is_base_of_v<OmpBlockConstruct, TypeS>) {
return GetFinalLabel(std::get<Block>(s.t));
} else {
+3 -3
View File
@@ -2636,7 +2636,7 @@ public:
void Unparse(const OpenMPAllocatorsConstruct &x) {
Unparse(static_cast<const OmpBlockConstruct &>(x));
}
void Unparse(const OpenMPAssumeConstruct &x) {
void Unparse(const OmpAssumeDirective &x) {
Unparse(static_cast<const OmpBlockConstruct &>(x));
}
void Unparse(const OpenMPAtomicConstruct &x) {
@@ -2659,7 +2659,7 @@ public:
void Unparse(const OpenMPCriticalConstruct &x) {
Unparse(static_cast<const OmpBlockConstruct &>(x));
}
void Unparse(const OpenMPDeclarativeAssumes &x) {
void Unparse(const OmpAssumesDirective &x) {
BeginOpenMP();
Word("!$OMP ");
Walk(x.v);
@@ -2749,7 +2749,7 @@ public:
Put("\n");
EndOpenMP();
}
void Unparse(const OpenMPSectionConstruct &x) {
void Unparse(const OmpSectionDirective &x) {
if (auto &&dirSpec{
std::get<std::optional<OmpDirectiveSpecification>>(x.t)}) {
BeginOpenMP();
+5 -5
View File
@@ -1284,19 +1284,19 @@ void OmpStructureChecker::CheckMasterNesting(
}
}
void OmpStructureChecker::Enter(const parser::OpenMPAssumeConstruct &x) {
void OmpStructureChecker::Enter(const parser::OmpAssumeDirective &x) {
PushContextAndClauseSets(x.source, llvm::omp::Directive::OMPD_assume);
}
void OmpStructureChecker::Leave(const parser::OpenMPAssumeConstruct &) {
void OmpStructureChecker::Leave(const parser::OmpAssumeDirective &) {
dirContext_.pop_back();
}
void OmpStructureChecker::Enter(const parser::OpenMPDeclarativeAssumes &x) {
void OmpStructureChecker::Enter(const parser::OmpAssumesDirective &x) {
PushContextAndClauseSets(x.source, llvm::omp::Directive::OMPD_assumes);
}
void OmpStructureChecker::Leave(const parser::OpenMPDeclarativeAssumes &) {
void OmpStructureChecker::Leave(const parser::OmpAssumesDirective &) {
dirContext_.pop_back();
}
@@ -1425,7 +1425,7 @@ void OmpStructureChecker::Enter(const parser::OpenMPSectionsConstruct &x) {
const auto &sectionBlocks{std::get<std::list<parser::OpenMPConstruct>>(x.t)};
for (const parser::OpenMPConstruct &construct : sectionBlocks) {
auto &section{std::get<parser::OpenMPSectionConstruct>(construct.u)};
auto &section{std::get<parser::OmpSectionDirective>(construct.u)};
CheckNoBranching(
std::get<parser::Block>(section.t), beginName.v, beginName.source);
}
+4 -4
View File
@@ -107,10 +107,10 @@ public:
void Enter(const parser::OpenMPLoopConstruct &);
void Leave(const parser::OpenMPLoopConstruct &);
void Enter(const parser::OpenMPAssumeConstruct &);
void Leave(const parser::OpenMPAssumeConstruct &);
void Enter(const parser::OpenMPDeclarativeAssumes &);
void Leave(const parser::OpenMPDeclarativeAssumes &);
void Enter(const parser::OmpAssumeDirective &);
void Leave(const parser::OmpAssumeDirective &);
void Enter(const parser::OmpAssumesDirective &);
void Leave(const parser::OmpAssumesDirective &);
void Enter(const parser::OpenMPInteropConstruct &);
void Leave(const parser::OpenMPInteropConstruct &);
void Enter(const parser::OmpBlockConstruct &);
+6 -6
View File
@@ -590,8 +590,8 @@ public:
bool Pre(const parser::OpenMPSectionsConstruct &);
void Post(const parser::OpenMPSectionsConstruct &) { PopContext(); }
bool Pre(const parser::OpenMPSectionConstruct &);
void Post(const parser::OpenMPSectionConstruct &) { PopContext(); }
bool Pre(const parser::OmpSectionDirective &);
void Post(const parser::OmpSectionDirective &) { PopContext(); }
bool Pre(const parser::OpenMPCriticalConstruct &critical);
void Post(const parser::OpenMPCriticalConstruct &) { PopContext(); }
@@ -705,8 +705,8 @@ public:
bool Pre(const parser::OmpAllocateDirective &);
bool Pre(const parser::OpenMPAssumeConstruct &);
void Post(const parser::OpenMPAssumeConstruct &) { PopContext(); }
bool Pre(const parser::OmpAssumeDirective &);
void Post(const parser::OmpAssumeDirective &) { PopContext(); }
bool Pre(const parser::OpenMPAtomicConstruct &);
void Post(const parser::OpenMPAtomicConstruct &) { PopContext(); }
@@ -2179,7 +2179,7 @@ bool OmpAttributeVisitor::Pre(const parser::OpenMPSectionsConstruct &x) {
return true;
}
bool OmpAttributeVisitor::Pre(const parser::OpenMPSectionConstruct &x) {
bool OmpAttributeVisitor::Pre(const parser::OmpSectionDirective &x) {
PushContext(x.source, llvm::omp::Directive::OMPD_section);
GetContext().withinConstruct = true;
return true;
@@ -2255,7 +2255,7 @@ bool OmpAttributeVisitor::Pre(const parser::OmpAllocateDirective &x) {
return false;
}
bool OmpAttributeVisitor::Pre(const parser::OpenMPAssumeConstruct &x) {
bool OmpAttributeVisitor::Pre(const parser::OmpAssumeDirective &x) {
PushContext(x.source, llvm::omp::Directive::OMPD_assume);
return true;
}
+1 -2
View File
@@ -223,8 +223,7 @@ void RewriteMutator::OpenMPSimdOnly(
std::get<std::list<parser::OpenMPConstruct>>(ompCon->t);
auto insertPos = std::next(it);
for (auto &sectionCon : sections) {
auto &section =
std::get<parser::OpenMPSectionConstruct>(sectionCon.u);
auto &section = std::get<parser::OmpSectionDirective>(sectionCon.u);
auto &innerBlock = std::get<parser::Block>(section.t);
block.splice(insertPos, innerBlock);
}
+7 -7
View File
@@ -39,7 +39,7 @@ end subroutine sub1
!UNPARSE: PRINT *, r
!UNPARSE: END SUBROUTINE sub1
!PARSE-TREE: ExecutionPartConstruct -> ExecutableConstruct -> OpenMPConstruct -> OpenMPAssumeConstruct
!PARSE-TREE: ExecutionPartConstruct -> ExecutableConstruct -> OpenMPConstruct -> OmpAssumeDirective
!PARSE-TREE: | OmpBeginDirective
!PARSE-TREE: | | OmpDirectiveName -> llvm::omp::Directive = assume
!PARSE-TREE: | | OmpClauseList -> OmpClause -> NoOpenmp
@@ -49,7 +49,7 @@ end subroutine sub1
!PARSE-TREE: | | OmpDirectiveName -> llvm::omp::Directive = assume
!PARSE-TREE: | | OmpClauseList ->
!PARSE-TREE: | | Flags = {}
!PARSE-TREE: ExecutionPartConstruct -> ExecutableConstruct -> OpenMPConstruct -> OpenMPAssumeConstruct
!PARSE-TREE: ExecutionPartConstruct -> ExecutableConstruct -> OpenMPConstruct -> OmpAssumeDirective
!PARSE-TREE: | OmpBeginDirective
!PARSE-TREE: | | OmpDirectiveName -> llvm::omp::Directive = assume
!PARSE-TREE: | | OmpClauseList -> OmpClause -> NoParallelism
@@ -59,7 +59,7 @@ end subroutine sub1
!PARSE-TREE: | | OmpDirectiveName -> llvm::omp::Directive = assume
!PARSE-TREE: | | OmpClauseList ->
!PARSE-TREE: | | Flags = {}
!PARSE-TREE: ExecutionPartConstruct -> ExecutableConstruct -> OpenMPConstruct -> OpenMPAssumeConstruct
!PARSE-TREE: ExecutionPartConstruct -> ExecutableConstruct -> OpenMPConstruct -> OmpAssumeDirective
!PARSE-TREE: | OmpBeginDirective
!PARSE-TREE: | | OmpDirectiveName -> llvm::omp::Directive = assume
!PARSE-TREE: | | OmpClauseList -> OmpClause -> NoOpenmpRoutines
@@ -69,7 +69,7 @@ end subroutine sub1
!PARSE-TREE: | | OmpDirectiveName -> llvm::omp::Directive = assume
!PARSE-TREE: | | OmpClauseList ->
!PARSE-TREE: | | Flags = {}
!PARSE-TREE: ExecutionPartConstruct -> ExecutableConstruct -> OpenMPConstruct -> OpenMPAssumeConstruct
!PARSE-TREE: ExecutionPartConstruct -> ExecutableConstruct -> OpenMPConstruct -> OmpAssumeDirective
!PARSE-TREE: | OmpBeginDirective
!PARSE-TREE: | | OmpDirectiveName -> llvm::omp::Directive = assume
!PARSE-TREE: | | OmpClauseList -> OmpClause -> Absent -> OmpAbsentClause -> llvm::omp::Directive = allocate
@@ -83,7 +83,7 @@ end subroutine sub1
!PARSE-TREE: | | | | ImplicitPart ->
!PARSE-TREE: | | | Block
!PARSE-TREE: | | | EndBlockStmt ->
!PARSE-TREE: ExecutionPartConstruct -> ExecutableConstruct -> OpenMPConstruct -> OpenMPAssumeConstruct
!PARSE-TREE: ExecutionPartConstruct -> ExecutableConstruct -> OpenMPConstruct -> OmpAssumeDirective
!PARSE-TREE: | OmpBeginDirective
!PARSE-TREE: | | OmpDirectiveName -> llvm::omp::Directive = assume
!PARSE-TREE: | | OmpClauseList -> OmpClause -> Holds -> OmpHoldsClause -> Expr -> EQ
@@ -120,7 +120,7 @@ end subroutine sub2
!PARSE-TREE: ExecutionPartConstruct -> ExecutableConstruct -> ActionStmt -> AssignmentStmt
!PARSE-TREE: | Variable -> Designator -> DataRef -> Name = 'v'
!PARSE-TREE: | Expr -> LiteralConstant -> IntLiteralConstant = '87'
!PARSE-TREE: ExecutionPartConstruct -> ExecutableConstruct -> OpenMPConstruct -> OpenMPAssumeConstruct
!PARSE-TREE: ExecutionPartConstruct -> ExecutableConstruct -> OpenMPConstruct -> OmpAssumeDirective
!PARSE-TREE: | OmpBeginDirective
!PARSE-TREE: | | OmpDirectiveName -> llvm::omp::Directive = assume
!PARSE-TREE: | | OmpClauseList -> OmpClause -> NoOpenmp
@@ -144,7 +144,7 @@ end program p
!UNPARSE: !$OMP ASSUMES NO_OPENMP
!UNPARSE: END PROGRAM p
!PARSE-TREE: OpenMPDeclarativeConstruct -> OpenMPDeclarativeAssumes -> OmpDirectiveSpecification
!PARSE-TREE: OpenMPDeclarativeConstruct -> OmpAssumesDirective -> OmpDirectiveSpecification
!PARSE-TREE: | OmpDirectiveName -> llvm::omp::Directive = assumes
!PARSE-TREE: | OmpClauseList -> OmpClause -> NoOpenmp
!PARSE-TREE: | Flags = {}
+9 -9
View File
@@ -18,7 +18,7 @@ subroutine openmp_sections(x, y)
!PARSE-TREE: | | OmpDirectiveName -> llvm::omp::Directive = sections
!PARSE-TREE: | | OmpClauseList ->
!PARSE-TREE: | | Flags = {}
!PARSE-TREE: | OpenMPConstruct -> OpenMPSectionConstruct
!PARSE-TREE: | OpenMPConstruct -> OmpSectionDirective
!PARSE-TREE: | | Block
!PARSE-TREE: | OmpEndSectionsDirective
!PARSE-TREE: | | OmpDirectiveName -> llvm::omp::Directive = sections
@@ -40,7 +40,7 @@ subroutine openmp_sections(x, y)
!PARSE-TREE: | | OmpDirectiveName -> llvm::omp::Directive = sections
!PARSE-TREE: | | OmpClauseList ->
!PARSE-TREE: | | Flags = {}
!PARSE-TREE: | OpenMPConstruct -> OpenMPSectionConstruct
!PARSE-TREE: | OpenMPConstruct -> OmpSectionDirective
!PARSE-TREE: | | Block
!PARSE-TREE: | | | ExecutionPartConstruct -> ExecutableConstruct -> ActionStmt -> CallStmt = 'CALL f1()'
!PARSE-TREE: | | | | Call
@@ -67,7 +67,7 @@ subroutine openmp_sections(x, y)
!PARSE-TREE: | | OmpDirectiveName -> llvm::omp::Directive = sections
!PARSE-TREE: | | OmpClauseList ->
!PARSE-TREE: | | Flags = {}
!PARSE-TREE: | OpenMPConstruct -> OpenMPSectionConstruct
!PARSE-TREE: | OpenMPConstruct -> OmpSectionDirective
!PARSE-TREE: | | OmpDirectiveSpecification
!PARSE-TREE: | | | OmpDirectiveName -> llvm::omp::Directive = section
!PARSE-TREE: | | | OmpClauseList ->
@@ -106,7 +106,7 @@ subroutine openmp_sections(x, y)
!PARSE-TREE: | | OmpDirectiveName -> llvm::omp::Directive = sections
!PARSE-TREE: | | OmpClauseList ->
!PARSE-TREE: | | Flags = {}
!PARSE-TREE: | OpenMPConstruct -> OpenMPSectionConstruct
!PARSE-TREE: | OpenMPConstruct -> OmpSectionDirective
!PARSE-TREE: | | OmpDirectiveSpecification
!PARSE-TREE: | | | OmpDirectiveName -> llvm::omp::Directive = section
!PARSE-TREE: | | | OmpClauseList ->
@@ -115,7 +115,7 @@ subroutine openmp_sections(x, y)
!PARSE-TREE: | | | ExecutionPartConstruct -> ExecutableConstruct -> ActionStmt -> CallStmt = 'CALL f1()'
!PARSE-TREE: | | | | Call
!PARSE-TREE: | | | | | ProcedureDesignator -> Name = 'f1'
!PARSE-TREE: | OpenMPConstruct -> OpenMPSectionConstruct
!PARSE-TREE: | OpenMPConstruct -> OmpSectionDirective
!PARSE-TREE: | | OmpDirectiveSpecification
!PARSE-TREE: | | | OmpDirectiveName -> llvm::omp::Directive = section
!PARSE-TREE: | | | OmpClauseList ->
@@ -124,7 +124,7 @@ subroutine openmp_sections(x, y)
!PARSE-TREE: | | | ExecutionPartConstruct -> ExecutableConstruct -> ActionStmt -> CallStmt = 'CALL f2()'
!PARSE-TREE: | | | | Call
!PARSE-TREE: | | | | | ProcedureDesignator -> Name = 'f2'
!PARSE-TREE: | OpenMPConstruct -> OpenMPSectionConstruct
!PARSE-TREE: | OpenMPConstruct -> OmpSectionDirective
!PARSE-TREE: | | OmpDirectiveSpecification
!PARSE-TREE: | | | OmpDirectiveName -> llvm::omp::Directive = section
!PARSE-TREE: | | | OmpClauseList ->
@@ -164,7 +164,7 @@ subroutine openmp_sections(x, y)
!PARSE-TREE: | | OmpClauseList -> OmpClause -> Private -> OmpObjectList -> OmpObject -> Designator -> DataRef -> Name = 'x'
!PARSE-TREE: | | OmpClause -> Firstprivate -> OmpObjectList -> OmpObject -> Designator -> DataRef -> Name = 'y'
!PARSE-TREE: | | Flags = {}
!PARSE-TREE: | OpenMPConstruct -> OpenMPSectionConstruct
!PARSE-TREE: | OpenMPConstruct -> OmpSectionDirective
!PARSE-TREE: | | OmpDirectiveSpecification
!PARSE-TREE: | | | OmpDirectiveName -> llvm::omp::Directive = section
!PARSE-TREE: | | | OmpClauseList ->
@@ -173,7 +173,7 @@ subroutine openmp_sections(x, y)
!PARSE-TREE: | | | ExecutionPartConstruct -> ExecutableConstruct -> ActionStmt -> CallStmt = 'CALL f1()'
!PARSE-TREE: | | | | Call
!PARSE-TREE: | | | | | ProcedureDesignator -> Name = 'f1'
!PARSE-TREE: | OpenMPConstruct -> OpenMPSectionConstruct
!PARSE-TREE: | OpenMPConstruct -> OmpSectionDirective
!PARSE-TREE: | | OmpDirectiveSpecification
!PARSE-TREE: | | | OmpDirectiveName -> llvm::omp::Directive = section
!PARSE-TREE: | | | OmpClauseList ->
@@ -182,7 +182,7 @@ subroutine openmp_sections(x, y)
!PARSE-TREE: | | | ExecutionPartConstruct -> ExecutableConstruct -> ActionStmt -> CallStmt = 'CALL f2()'
!PARSE-TREE: | | | | Call
!PARSE-TREE: | | | | | ProcedureDesignator -> Name = 'f2'
!PARSE-TREE: | OpenMPConstruct -> OpenMPSectionConstruct
!PARSE-TREE: | OpenMPConstruct -> OmpSectionDirective
!PARSE-TREE: | | OmpDirectiveSpecification
!PARSE-TREE: | | | OmpDirectiveName -> llvm::omp::Directive = section
!PARSE-TREE: | | | OmpClauseList ->
+2 -2
View File
@@ -235,9 +235,9 @@ end subroutine
subroutine test_sections()
! CHECK-NOT: ExecutionPartConstruct -> ExecutableConstruct -> OpenMPConstruct -> OpenMPSectionsConstruct
!$omp sections
! CHECK-NOT: OpenMPConstruct -> OpenMPSectionConstruct
! CHECK-NOT: OpenMPConstruct -> OmpSectionDirective
!$omp section
! CHECK-NOT: OpenMPConstruct -> OpenMPSectionConstruct
! CHECK-NOT: OpenMPConstruct -> OmpSectionDirective
!$omp section
!$omp end sections
end subroutine