[flang-commits] [flang] [draft][flang] Undo the effects of CSE for hlfir.exactly_once. (PR #140190)
via flang-commits
flang-commits at lists.llvm.org
Fri May 16 01:08:36 PDT 2025
https://github.com/jeanPerier commented:
Thanks Slava, this looks great!
I also thought about what you said about having exactly_once be a side region, and I think that may be the cleanest solution if what you have here were to hit issues with operations with memory effect being moved (which I do not think is possible given the current CSE works because the dominance is clear in the IR syntax, and that is all it needs for operation that will behave the same if re-evaluated with the same inputs, but any pass moving memory operations would need to understand the control path between the two operations to check for modifications, and I do not think it is possible for MLIR to do such analysis without more info on the control flow behavior of the where/forall/region_assign/exactly_once operations).
https://github.com/llvm/llvm-project/pull/140190
More information about the flang-commits
mailing list