-
Notifications
You must be signed in to change notification settings - Fork 15.3k
[Clang][OpenMP] Support for dispatch construct (Sema & Codegen) support #131838
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
Open
SunilKuravinakop
wants to merge
40
commits into
llvm:main
Choose a base branch
from
SunilKuravinakop:dispatch_depend
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 35 commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
1703aa6
Support for dispatch construct (Sema & Codegen) support. Support for …
5ae3ffe
Taking care of feedback comments from Alexey Bataev.
daf681c
Changed the comments for replaceWithNewTraitsOrDirectCall().
bc3c018
Removing an unnecessary bracket in if statement in ActOnOpenMPCall().
b83e0ba
Removing unnecessary brackets around if statement.
997fe7c
1) Claiming support for "dispatch" construct.
182d026
Spacing problems for claiming "dispatch construct".
dca846e
Adding support for dispatch construct in Release Notes.
26427bf
re-wording message in warn_omp_dispatch_clause_novariants_nocontext.
e379325
Changes in expected-warning message for "#pragma omp dispatch
bab22e6
Removing the word CodeGen from comments, which can lead to confusion.
00ac6cf
Moving the helper functions to CodeGen by using AnnotateAttr in Sema.
ff2f370
Changing the commit message from:
de5b7cc
All clang/test/OpenMP/dispatch_*.cpp tests pass with the changes in t…
5d5b152
Merge branch 'main' into dispatch_depend
817f6df
Handling:
984446d
Undoing changes to handle templates.
4cb7bdd
Merge branch 'main' into dispatch_depend
bd2e38a
Merge branch 'main' into dispatch_depend
c1a83cc
Separating virtual regions of taskwait directive and dispatch directive
07354f0
Merge branch 'main' into dispatch_depend
f204bc4
Merge branch 'main' into dispatch_depend
ce9bff0
Merge branch 'main' into dispatch_depend
bb176c8
Moving handling of dispatch depend into CodeGen.
d217bc5
Changes to be committed:
8fba558
-ast-dump is working with addition of extra virtual region. CodeGen is
5ec20c3
modified: clang/lib/Sema/SemaOpenMP.cpp
cd8fae5
Formatting problems.
f47769a
CodeGen works with this change.
503222e
All tests pass with this change.
de8b736
1) Changing the name of the function from
f1e91f0
Merge branch 'main' into dispatch_depend
b2571fa
Merge branch 'main' into dispatch_depend
b60c252
Added OMPLexicalScope before emitting if-else statement.
d23c523
Changing LexicalScope to OMPD_dispatch.
f186576
Removed unused statements.
fd150c2
Replacing getCapturedExprFromImplicitCastExpr() with
07d8827
Adding support for clauses novariants and nocontext occuring on the same
4206c6e
Rolling back changes to make template related changes in this patch.
6a35664
Minor changes based on review feedback.
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
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.
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.
Why this is a warning, not an error?
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.
This message is to indicate the user that if novariants and nocontext are specified then novariants is taken into account. This warning is to inform the user and not an error.
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.
Why it is not an error?
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.
I do not need to stop execution if novariants and nocontext occur together. In a dispatch directive like
#pragma omp dispatch nocontext(c1) novariants(c2)then I do not find a way to generateFor the "condition" in
ifstatement I do not know a way to use c1 & c2 together. Hence I preferred to indicate this to user and usenovariants(c2). I do not want to stop the compilation with an error message because the spec does not indicate what to do in this case.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.
Should it be just
c1 || c2? What's the problem in emitting the combined expression?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.
I see this in the standard:
If do-not-use-variant evaluates to true, no function variant is selected for the target-call of the
13 dispatch region associated with the novariants clause even if one would be selected
14 normally.
Doe it mean that novariant has higher priority than nocontext?
Uh oh!
There was an error while loading. Please reload this page.
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.
This relates only to the novariants clause only. However, I can extrapolate the spec to mean whatever I have implemented. It will be good to provide a warning.
If you feel that warning is not needed then I can remove it but, the user should not be left wondering why nocontext was not considered.
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.
@dreachem thoughts?
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.
The effect of the nocontext clause is to not add the dispatch construct to the construct trait set. It will only matter once we support dispatch in a construct trait selector (support for this is not required in 5.2, but is required in 6.0).
Assuming we support dispatch in a construct trait selector, then this is what the various combinations would mean:
In summary, novariants takes precedence and nocontext can be ignored ONLY if the do-not-use-variant argument evaluates to true.
Uh oh!
There was an error while loading. Please reload this page.
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.
Alexey,
I have added support for clauses novariants and nocontext occuring on the same dispatch directive and removed the warning message.
Can you please review the code?
--Sunil