-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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
[flang][OpenMP] Main splitting functionality dev-complete #82495
Closed
kparzysz
wants to merge
19
commits into
llvm:users/kparzysz/spr/b06-dsp
from
kparzysz:breakup-composite-generic-squashed
Closed
[flang][OpenMP] Main splitting functionality dev-complete #82495
kparzysz
wants to merge
19
commits into
llvm:users/kparzysz/spr/b06-dsp
from
kparzysz:breakup-composite-generic-squashed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The new set of classes representing OpenMP classes mimics the contents of parser::OmpClause, but differs in a few aspects: - it can be easily created, copied, etc. - is based on semantics::SomeExpr instead of parser objects. The class `OmpObject` is represented by `omp::Object`, which contains the symbol associated with the object, and semantics::MaybeExpr representing the designator for the symbol reference. This patch only introduces the new classes, they are not yet used anywhere.
Temporarily rename old clause list to `clauses2`, old clause iterator to `ClauseIterator2`. Change `findUniqueClause` to iterate over `omp::Clause` objects, modify all handlers to operate on 'omp::clause::xyz` equivalents.
…essor Rename `findRepeatableClause` to `findRepeatableClause2`, and make the new `findRepeatableClause` operate on new `omp::Clause` objects. Leave `Map` unchanged, because it will require more changes for it to work.
The related functions are `gatherDataOperandAddrAndBounds` and `genBoundsOps`. The former is used in OpenACC as well, and it was updated to pass evaluate::Expr instead of parser objects. The difference in the test case comes from unfolded conversions of index expressions, which are explicitly of type integer(kind=8). Delete now unused `findRepeatableClause2` and `findClause2`. Add `AsGenericExpr` that takes std::optional. It already returns optional Expr. Making it accept an optional Expr as input would reduce the number of necessary checks when handling frequent optional values in evaluator.
Remove `ClauseIterator2` and `clauses2` from ClauseProcessor.
The new set of classes representing OpenMP classes mimics the contents of parser::OmpClause, but differs in a few aspects: - it can be easily created, copied, etc. - is based on semantics::SomeExpr instead of parser objects. The class `OmpObject` is represented by `omp::Object`, which contains the symbol associated with the object, and semantics::MaybeExpr representing the designator for the symbol reference. This patch only introduces the new classes, they are not yet used anywhere.
Temporarily rename old clause list to `clauses2`, old clause iterator to `ClauseIterator2`. Change `findUniqueClause` to iterate over `omp::Clause` objects, modify all handlers to operate on 'omp::clause::xyz` equivalents.
…essor Rename `findRepeatableClause` to `findRepeatableClause2`, and make the new `findRepeatableClause` operate on new `omp::Clause` objects. Leave `Map` unchanged, because it will require more changes for it to work.
The related functions are `gatherDataOperandAddrAndBounds` and `genBoundsOps`. The former is used in OpenACC as well, and it was updated to pass evaluate::Expr instead of parser objects. The difference in the test case comes from unfolded conversions of index expressions, which are explicitly of type integer(kind=8). Delete now unused `findRepeatableClause2` and `findClause2`. Add `AsGenericExpr` that takes std::optional. It already returns optional Expr. Making it accept an optional Expr as input would reduce the number of necessary checks when handling frequent optional values in evaluator.
Remove `ClauseIterator2` and `clauses2` from ClauseProcessor.
The splitting code is now separated into its own file. [flang][OpenMP] TableGen support for getting leaf constructs Implement getLeafConstructs(D), which for a composite directive D will return the list of the constituent leaf directives. [flang][OpenMP] Set OpenMP attributes in MLIR module in bbc before lowering Right now attributes like OpenMP version or target attributes for offload are set after lowering in bbc. The flang frontend sets them before lowering, making them available in the lowering process. This change sets them before lowering in bbc as well. getOpenMPVersion Split function complete Some TODOs still remain.
b4351a1
to
158901f
Compare
158901f
to
0df6d56
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The splitting code is now separated into its own file.
This is still just the splitting part, it's not applied yet.
[flang][OpenMP] TableGen support for getting leaf constructs
Implement getLeafConstructs(D), which for a composite directive D will return the list of the constituent leaf directives.
[flang][OpenMP] Set OpenMP attributes in MLIR module in bbc before lowering
Right now attributes like OpenMP version or target attributes for offload are set after lowering in bbc. The flang frontend sets them before lowering, making them available in the lowering process.
This change sets them before lowering in bbc as well.
getOpenMPVersion
Split function complete
Some TODOs still remain.