forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 48
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][MLIR][Lower] Update lowering to use wrapper ops #49
Closed
skatrak
wants to merge
3
commits into
users/skatrak/composite-02-loop-ops-update
from
users/skatrak/composite-03-lowering
Closed
[Flang][OpenMP][MLIR][Lower] Update lowering to use wrapper ops #49
skatrak
wants to merge
3
commits into
users/skatrak/composite-02-loop-ops-update
from
users/skatrak/composite-03-lowering
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
skatrak
requested review from
ergawy,
jsjodin,
agozillon,
DominikAdamski,
TIFitis and
kparzysz
March 8, 2024 16:07
skatrak
force-pushed
the
users/skatrak/composite-02-loop-ops-update
branch
from
March 13, 2024 13:08
1440c0d
to
0553a46
Compare
kparzysz
reviewed
Mar 13, 2024
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.
Could you isolate the addition of CanonicalLoop op into a separate PR?
Overall the changes look ok, but there are several logical groups of changes that make more sense in separate PRs.
This patch introduces the following changes: - Complete OpenMP directive sets to include masked and taskloop-related ones. - Refactor clause processing to store related operands in structures. These are combined into construct-specific operand structures using a mixin pattern and simplify keeping track of operand lists used for creating OpenMP operations and reduces argument lists. - Update the lowering to MLIR of loop constructs to follow the wrapper + canonical loop approach. This includes some changes to privatization that need testing. - Add lowering for the omp.canonical_loop operation, based on omp.wsloop. - Significant refactor of OpenMP construct lowering, separating composite constructs into their own "gen" functions and handling combined loop constructs in a more scalable way. Updated genOMP functions to follow the same set of patterns to make it more understandable. Split clause processing calls from code generation for operations in preparation for reusing the same code when dealing with composite constructs. - Add basic support for taskloop, for completeness sake. - Document missing clauses. - Move some code from OpenMP.cpp to ClauseProcessor.cpp and call it there to simplify calls to certain process methods that were always followed by the same post-processing. - Add and populate "composite" attribute on wrapper operations. - Add empty constructors for wrapper operations. - Update `LoopWrapperInterface` to avoid compilation problems. - Update `Task*` operation's names to follow the same capitalization convention. - Changes to SCF to OpenMP conversion to produce a wrapper omp.wsloop with a nested omp.canonical_loop rather than an invalid omp.wsloop. - Document missing verifier checks on wrapper operations. - Make temporary changes to OpenMP to LLVM IR translation to make this compilable. All these changes are still WIP, as they haven't been tested.
skatrak
force-pushed
the
users/skatrak/composite-03-lowering
branch
from
March 14, 2024 11:45
2266fb1
to
1e47d70
Compare
Akash- Fix tests related to omp.wsloop.
Features in this PR already landed via merge from main. |
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.
This patch introduces the following changes:
process...()
methods that were always followed by the same post-processing.LoopWrapperInterface
to avoid compilation problems.Task*
operation's names to follow the same capitalization convention.All these changes are still WIP, as they haven't been tested. It's also a TODO to support composite constructs, though almost everything is in place in order to allow that. I'll update this PR after I spend some time testing it and add support for composite constructs.