[flang-commits] [flang] [flang] Adding lowering of TEAMs features to PRIF in MIF Dialect (PR #165573)

Dan Bonachea via flang-commits flang-commits at lists.llvm.org
Tue Nov 4 07:50:59 PST 2025


================
@@ -257,8 +257,25 @@ void Fortran::lower::genSyncMemoryStatement(
 
 void Fortran::lower::genSyncTeamStatement(
----------------
bonachea wrote:

@jeanPerier If `Fortran::lower::genSyncTeamStatement` is moving to Coarray.cpp (and renaming that file to MultiImage.cpp) then for consistency we should probably move **all** of the multi-image features currently living in Runtime.cpp:

1. Fortran::lower::genSyncAllStatement
2. Fortran::lower::genSyncImagesStatement
3. Fortran::lower::genSyncMemoryStatement
4. Fortran::lower::genSyncTeamStatement (implemented in this PR)
5. Fortran::lower::genNotifyWaitStatement (not yet implemented)
6. Fortran::lower::genEventPostStatement (not yet implemented)
7. Fortran::lower::genEventWaitStatement (not yet implemented)
8. Fortran::lower::genLockStatement (not yet implemented)
9. Fortran::lower::genUnlockStatement (not yet implemented)

and possibly even: 

10. Fortran::lower::genStopStatement (not yet converted to multi-image)
11. Fortran::lower::genFailImageStatement (not yet converted to multi-image)

In short, the majority of features currently living in Runtime.cpp are actually multi-image features.

@jeanPerier How exactly do you believe we should proceed to resolve this? 
Options include:
1. Immediately move all the multi-image features listed above (1..11) to the renamed MultiImage.cpp as part of this PR
2. Move only the implemented multi-image features (1..4) in this PR, and then move subsequent features in subsequent PRs as they are implemented/upgraded to support multi-image execution.
3. Move only the newly implemented  `Fortran::lower::genSyncTeamStatement` (4) in this PR, and make a new PR to move (1..3) and possibly (5..11)
4. Something else?

https://github.com/llvm/llvm-project/pull/165573


More information about the flang-commits mailing list