[flang-commits] [clang] [flang] [flang][OpenMP] Upstream `do concurrent` loop-nest detection. (PR #127595)
Kiran Chandramohan via flang-commits
flang-commits at lists.llvm.org
Tue Feb 18 01:13:03 PST 2025
kiranchandramohan wrote:
It is slightly unfortunate to rediscover the loops so early in the flow when we had it in source. Have you considered changing the representation of do_concurrent in the IR for multi-range do concurrent loops? Representation could in HLFIR capture all the loops, so there is no need to re-discover the loops. It could be modelled on the old workshare loop `hlfir.do_concurrent (i,j) : (start_i,start_j) (end_i,end_j) (step_i,step_j)` or the current representation
```
hlfir.do_concurrent {
fir.do
fir.do
}
```
Alternatively would adding attributes to denote a multi-range loop help this?
```
fir.do_loop unordered multi-range
fir.do_loop unordered multi-range
```
Might be worth a discussion with @clementval and @jeanPerier to see whether there is appetite for it.
https://github.com/llvm/llvm-project/pull/127595
More information about the flang-commits
mailing list