-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[flang][fir] Lower do concurrent
loop nests to fir.do_concurrent
#132904
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
Changes from all commits
ece5e23
8e081d2
765c061
b4e5059
0d841d3
91ad25d
f1061b4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -280,6 +280,9 @@ mlir::Block *fir::FirOpBuilder::getAllocaBlock() { | |
if (auto cufKernelOp = getRegion().getParentOfType<cuf::KernelOp>()) | ||
return &cufKernelOp.getRegion().front(); | ||
|
||
if (auto doConcurentOp = getRegion().getParentOfType<fir::DoConcurrentOp>()) | ||
return doConcurentOp.getBody(); | ||
Comment on lines
+283
to
+284
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. Do we need this for any allocation in the do concurrent? We did not have this so far so I'm just wondering. 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. We do it this way for the new 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. Ok for the iteration variables but what about any temporary that will be allocated during the body lowering. Is it ok to add them at the same place as the iteration variables? 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. These will be emitted in the body of the loop itself (for every iteration), just like what would happen now when targeting the old Let me know if I misunderstood what you meant. 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. I don't think they are created in the loop body. The code calls 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. You are right, I got confused here. This is still fine since the temp allocations will be emitted in the |
||
|
||
return getEntryBlock(); | ||
} | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.