-
Notifications
You must be signed in to change notification settings - Fork 14.2k
[flang] Updated the parsing structure of some OpenAcc constructs to give better/more uniform inspection #138076
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5243,38 +5243,65 @@ struct AccEndBlockDirective { | |
}; | ||
|
||
// ACC END ATOMIC | ||
EMPTY_CLASS(AccEndAtomic); | ||
struct AccEndAtomic { | ||
WRAPPER_CLASS_BOILERPLATE(AccEndAtomic, Verbatim); | ||
CharBlock source; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the |
||
}; | ||
|
||
// ACC ATOMIC READ | ||
struct AccAtomicReadDirective { | ||
TUPLE_CLASS_BOILERPLATE(AccAtomicReadDirective); | ||
std::tuple<Verbatim, AccClauseList> t; | ||
CharBlock source; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Both |
||
}; | ||
|
||
struct AccAtomicRead { | ||
TUPLE_CLASS_BOILERPLATE(AccAtomicRead); | ||
std::tuple<Verbatim, AccClauseList, Statement<AssignmentStmt>, | ||
std::tuple<AccAtomicReadDirective, Statement<AssignmentStmt>, | ||
std::optional<AccEndAtomic>> | ||
t; | ||
}; | ||
|
||
// ACC ATOMIC WRITE | ||
struct AccAtomicWriteDirective { | ||
TUPLE_CLASS_BOILERPLATE(AccAtomicWriteDirective); | ||
std::tuple<Verbatim, AccClauseList> t; | ||
CharBlock source; | ||
}; | ||
|
||
struct AccAtomicWrite { | ||
TUPLE_CLASS_BOILERPLATE(AccAtomicWrite); | ||
std::tuple<Verbatim, AccClauseList, Statement<AssignmentStmt>, | ||
std::tuple<AccAtomicWriteDirective, Statement<AssignmentStmt>, | ||
std::optional<AccEndAtomic>> | ||
t; | ||
}; | ||
|
||
// ACC ATOMIC UPDATE | ||
struct AccAtomicUpdateDirective { | ||
TUPLE_CLASS_BOILERPLATE(AccAtomicUpdateDirective); | ||
std::tuple<std::optional<Verbatim>, AccClauseList> t; | ||
CharBlock source; | ||
}; | ||
|
||
struct AccAtomicUpdate { | ||
TUPLE_CLASS_BOILERPLATE(AccAtomicUpdate); | ||
std::tuple<std::optional<Verbatim>, AccClauseList, Statement<AssignmentStmt>, | ||
std::tuple<AccAtomicUpdateDirective, Statement<AssignmentStmt>, | ||
std::optional<AccEndAtomic>> | ||
t; | ||
}; | ||
|
||
// ACC ATOMIC CAPTURE | ||
struct AccAtomicCaptureDirective { | ||
TUPLE_CLASS_BOILERPLATE(AccAtomicCaptureDirective); | ||
std::tuple<Verbatim, AccClauseList> t; | ||
CharBlock source; | ||
}; | ||
|
||
struct AccAtomicCapture { | ||
TUPLE_CLASS_BOILERPLATE(AccAtomicCapture); | ||
WRAPPER_CLASS(Stmt1, Statement<AssignmentStmt>); | ||
WRAPPER_CLASS(Stmt2, Statement<AssignmentStmt>); | ||
std::tuple<Verbatim, AccClauseList, Stmt1, Stmt2, AccEndAtomic> t; | ||
std::tuple<AccAtomicCaptureDirective, Stmt1, Stmt2, AccEndAtomic> t; | ||
}; | ||
|
||
struct OpenACCAtomicConstruct { | ||
|
@@ -5287,6 +5314,7 @@ struct OpenACCAtomicConstruct { | |
struct OpenACCBlockConstruct { | ||
TUPLE_CLASS_BOILERPLATE(OpenACCBlockConstruct); | ||
std::tuple<AccBeginBlockDirective, Block, AccEndBlockDirective> t; | ||
CharBlock source; | ||
}; | ||
|
||
struct OpenACCStandaloneDeclarativeConstruct { | ||
|
@@ -5324,14 +5352,19 @@ struct OpenACCDeclarativeConstruct { | |
}; | ||
|
||
// OpenACC directives enclosing do loop | ||
EMPTY_CLASS(AccEndLoop); | ||
struct AccEndLoop { | ||
WRAPPER_CLASS_BOILERPLATE(AccEndLoop, Verbatim); | ||
CharBlock source; | ||
}; | ||
|
||
struct OpenACCLoopConstruct { | ||
TUPLE_CLASS_BOILERPLATE(OpenACCLoopConstruct); | ||
OpenACCLoopConstruct(AccBeginLoopDirective &&a) | ||
: t({std::move(a), std::nullopt, std::nullopt}) {} | ||
std::tuple<AccBeginLoopDirective, std::optional<DoConstruct>, | ||
std::optional<AccEndLoop>> | ||
t; | ||
CharBlock source; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do you need a |
||
}; | ||
|
||
struct OpenACCEndConstruct { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These used to be in alphabetic order. Now they are not.