-
Notifications
You must be signed in to change notification settings - Fork 14.9k
[flang][OpenACC] Relax COMMON block usage restriction in OpenACC directives #162659
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
Merged
+129
−22
Merged
Changes from 47 commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
042d2f6
[flang] Draft of the work to look up COMMON declarations in the modules
eugeneepshteyn f31c976
Merge branch 'main' into 2-acc-common
eugeneepshteyn 931b300
Try to handle use association, but didn't work, because no symbol
eugeneepshteyn 0bfb06c
Merge branch 'main' into 2-acc-common
eugeneepshteyn 86cb8b6
Searching for COMMON definition in top level modules
eugeneepshteyn f462bf5
Guard against null cb
eugeneepshteyn 14ce6b6
Unit test
eugeneepshteyn 8c344c3
Merge branch 'llvm:main' into 2-acc-common
eugeneepshteyn e00d8f5
Merge branch '2-acc-common' into 3-acc-common
eugeneepshteyn 827f8f0
Merge branch 'llvm:main' into 3-acc-common
eugeneepshteyn 430660f
Merge branch 'llvm:main' into 3-acc-common
eugeneepshteyn ff637dd
Updated Scope::FindCommonBlock() to be similar to Scope::FindSymbol()…
eugeneepshteyn 9e19979
clang-format
eugeneepshteyn 66028ef
Split FindCommonBlock() into FindCB() and FindCommonBlockInScopes(). …
eugeneepshteyn 41336f1
Add USE association details to COMMON blocks
eugeneepshteyn eac75b7
Handle the case of redeclared COMMON block
eugeneepshteyn 553a3c3
clang-format
eugeneepshteyn 63662d8
Merge branch 'llvm:main' into 3-acc-common
eugeneepshteyn adcd69b
Merge branch 'llvm:main' into 2-acc-common
eugeneepshteyn 74de636
Merge branch '3-acc-common' into 2-acc-common
eugeneepshteyn 6527159
Merge branch 'llvm:main' into 3-acc-common
eugeneepshteyn c042379
Code review feedback + separated COMMON lists into COMMON in the curr…
eugeneepshteyn 740894f
COMMON block uses renames. Extended test to using module chain
eugeneepshteyn ca82173
clang-format
eugeneepshteyn 2474da0
Enabled creating of USE symbols from USE symbols of COMMON blocks
eugeneepshteyn 68363d2
Merge branch 'llvm:main' into 3-acc-common
eugeneepshteyn 5c84d48
clang-format
eugeneepshteyn cc4145c
Merge branch 'llvm:main' into 2-acc-common
eugeneepshteyn 06b2a01
Merge branch '3-acc-common' into 2-acc-common
eugeneepshteyn 8f802f7
Code review feedback
eugeneepshteyn b711009
Renamed to FindCommonBlockInVisibleScope()
eugeneepshteyn ee0cdde
clang-format
eugeneepshteyn 5349a65
Merge branch 'llvm:main' into 2-acc-common
eugeneepshteyn b268f4e
Merge branch 'llvm:main' into 3-acc-common
eugeneepshteyn 6c8e7a0
Code review feedback
eugeneepshteyn bab4e67
Renamed to FindCommonBlockInVisibleScope()
eugeneepshteyn ab01526
clang-format
eugeneepshteyn f2028c7
Code review feedback
eugeneepshteyn 258050f
Merge branch 'llvm:main' into 3-acc-common
eugeneepshteyn adf6b5f
Merge branch 'llvm:main' into 2-acc-common
eugeneepshteyn 86dc6a7
Merge branch '3-acc-common' into 2-acc-common
eugeneepshteyn acde775
clang-format
eugeneepshteyn abd2f40
[AddOrUpdateCommonBlockUse] Implemented selection of largest COMMON b…
eugeneepshteyn fc6beb7
[AddOrUpdateCommonBlockUse] Implemented selection of largest COMMON b…
eugeneepshteyn 19c1534
clang-format
eugeneepshteyn 8689f0a
Merge branch 'llvm:main' into 2-acc-common
eugeneepshteyn e7370be
Updated the test with a_common defined with more variables in a diffe…
eugeneepshteyn dadf669
Moved Scope::FindCommonBlock() and Scope::FindCommonBlockUse() implem…
eugeneepshteyn c62a62d
Merge branch 'llvm:main' into 2-acc-common
eugeneepshteyn 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
! RUN: %python %S/../test_errors.py %s %flang -fopenacc | ||
module acc_common_decl | ||
implicit none | ||
integer a | ||
common /a_common/ a | ||
!$acc declare create (/a_common/) | ||
data a/42/ | ||
end module acc_common_decl | ||
|
||
module acc_common_another | ||
implicit none | ||
integer c, d | ||
common /a_common/ c, d | ||
!$acc declare create (/a_common/) | ||
end module acc_common_another | ||
|
||
module acc_common_intermediate | ||
use acc_common_decl | ||
implicit none | ||
integer b | ||
common /b_common/ b | ||
!$acc declare create (/b_common/) | ||
end module acc_common_intermediate | ||
|
||
program acc_decl_test | ||
use acc_common_intermediate | ||
use acc_common_another | ||
implicit none | ||
|
||
a = 1 | ||
b = 10 | ||
!$acc update device (/a_common/) | ||
a = 2 | ||
!$acc update device (/b_common/) | ||
b = 20 | ||
!$acc update device (/a_common/) | ||
c = 3 | ||
d = 30 | ||
!ERROR: Could not find COMMON block 'a_common_bad' used in OpenACC directive | ||
!$acc update device (/a_common_bad/) | ||
end program |
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.
Uh oh!
There was an error while loading. Please reload this page.