[flang-commits] [flang] [flang][hlfir] Add MLIR op for `do concurrent` (PR #130893)

via flang-commits flang-commits at lists.llvm.org
Wed Mar 12 10:32:00 PDT 2025


https://github.com/jeanPerier commented:

Thanks!

The approach looks good to me. A few questions:

- Why HFLIR and not FIR?

Putting it in HLFIR  forces lowering it when moving from HLFIR to FIR, while it seems there is no deep requirement for this operation to be in HLFIR. The main reason for things to be in HLFIR is when they can manipulate hlfir.expr, which makes the so called "bufferization" the natural transition between FIR and HLFIR, and I am not sure it is best to correlate the hlfir.do_concurrent to xxx with bufferization (although I understand why you would want to run hlfir.do_concurrent to xxx early in the pipeline for some xxx, and that is OK, but I think it is best to give freedom to maintain fir.do_concurrent up to when we lower fir.do_loop).

- What about locality specifiers?

I think you mentioned in the [RFC](https://discourse.llvm.org/t/modeling-do-concurrent-loops-in-the-fir-dialect/84950/6) that you intend to add them later to these ops, I just want to check that I got that part right.


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


More information about the flang-commits mailing list