-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[flang][OpenMP] Try to unify induction var privatization for OMP regions. #91116
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
Merged
Changes from 6 commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
6ad9565
[flang][OpenMP] Try to unify induction var privatization
ergawy 833b600
Add `assert(!OmpPreDetermined)`
ergawy e29c7d4
Undo assert.
ergawy 1bf0e55
Merge remote-tracking branch 'upstream/main' into unify_privatization…
ergawy d74cb3e
Merge remote-tracking branch 'upstream/main' into unify_privatization…
ergawy fe35620
retain flag setting, check parallel
ergawy fd2d53f
Merge remote-tracking branch 'upstream/main' into unify_privatization…
ergawy 81f4e77
collect all privatized symbols in one list
ergawy cdb92c9
Merge remote-tracking branch 'upstream/main' into unify_privatization…
ergawy 894a83e
xxx
ergawy dfade68
Merge remote-tracking branch 'upstream/main' into unify_privatization…
ergawy 0d24b41
yyy
ergawy 001c0fe
Merge remote-tracking branch 'upstream/main' into unify_privatization…
ergawy 82d8ea0
zzz
ergawy b513a79
Merge remote-tracking branch 'upstream/main' into unify_privatization…
ergawy 919309e
aaa
ergawy 27ebcea
Merge remote-tracking branch 'upstream/main' into unify_privatization…
ergawy 6985a27
bbb
ergawy f77c47f
Merge remote-tracking branch 'upstream/main' into unify_privatization…
ergawy 696cde8
Merge remote-tracking branch 'upstream/main' into unify_privatization…
ergawy 05c013f
Merge remote-tracking branch 'upstream/main' into unify_privatization…
ergawy 2e067c4
handle upstream changes
ergawy 3abb935
Revert "handle upstream changes"
ergawy 1023e05
Merge remote-tracking branch 'upstream/main' into unify_privatization…
ergawy 0fe21cf
collect pre-determined only for last item in the construct queue
ergawy eb20e54
handle some review comments
ergawy b4612b3
Merge remote-tracking branch 'upstream/main' into unify_privatization…
ergawy 9c909d0
balance braces
ergawy cbdb1e5
Merge remote-tracking branch 'upstream/main' into unify_privatization…
ergawy 799c616
Merge remote-tracking branch 'upstream/main' into unify_privatization…
ergawy 25b8b9d
review comments
ergawy 33114ee
Merge remote-tracking branch 'upstream/main' into unify_privatization…
ergawy dcc1558
format
ergawy 9bb2215
handle critical
ergawy 3e5c63c
Merge remote-tracking branch 'upstream/main' into unify_privatization…
ergawy 6f1bcee
handle merge changes
ergawy 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -535,16 +535,21 @@ subroutine nested_constructs | |
|
||
integer :: y, z | ||
!CHECK: omp.parallel { | ||
!CHECK: %[[INNER_J:.*]] = fir.alloca i32 {bindc_name = "j", pinned} | ||
!CHECK: %[[INNER_J_DECL:.*]]:2 = hlfir.declare %[[INNER_J]] {{.*}} | ||
!CHECK: %[[INNER_I:.*]] = fir.alloca i32 {bindc_name = "i", pinned} | ||
!CHECK: %[[INNER_I_DECL:.*]]:2 = hlfir.declare %[[INNER_I]] {{.*}} | ||
|
||
!CHECK: %[[INNER_Y:.*]] = fir.alloca i32 {bindc_name = "y", pinned, uniq_name = "_QFnested_constructsEy"} | ||
!CHECK: %[[INNER_Y_DECL:.*]]:2 = hlfir.declare %[[INNER_Y]] {{.*}} | ||
!CHECK: %[[TEMP:.*]] = fir.load %[[Y_DECL]]#0 : !fir.ref<i32> | ||
!CHECK: hlfir.assign %[[TEMP]] to %[[INNER_Y_DECL]]#0 temporary_lhs : i32, !fir.ref<i32> | ||
|
||
!CHECK: %[[INNER_I:.*]] = fir.alloca i32 {bindc_name = "i", pinned, uniq_name | ||
!CHECK: %[[INNER_I_DECL:.*]]:2 = hlfir.declare %[[INNER_I]] {{.*}} | ||
|
||
!CHECK: %[[INNER_J:.*]] = fir.alloca i32 {bindc_name = "j", pinned, uniq_name | ||
!CHECK: %[[INNER_J_DECL:.*]]:2 = hlfir.declare %[[INNER_J]] {{.*}} | ||
|
||
!CHECK: %[[INNER_Z:.*]] = fir.alloca i32 {bindc_name = "z", pinned, uniq_name = "_QFnested_constructsEz"} | ||
!CHECK: %[[INNER_Z_DECL:.*]]:2 = hlfir.declare %[[INNER_Z]] {{.*}} | ||
|
||
!$omp parallel default(private) firstprivate(y) | ||
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. Please also add a test with a loop inside a parallel region without
|
||
!CHECK: {{.*}} = fir.do_loop {{.*}} { | ||
do i = 1, 10 | ||
|
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.