[flang-commits] [flang] [flang][HLFIR] Relax InlineElementals to support more than two users (PR #186916)

Tom Eccles via flang-commits flang-commits at lists.llvm.org
Tue Apr 21 04:31:07 PDT 2026


================
@@ -31,29 +33,217 @@ namespace hlfir {
 #include "flang/Optimizer/HLFIR/Passes.h.inc"
 } // namespace hlfir
 
+/// Collects all memory values (buffers/references) that the elemental body
+/// reads from.
+static void getReadDependencies(hlfir::ElementalOp elemental,
----------------
tblah wrote:

I worry that this does not fail safe when encountering new operations that it is unfamiliar with. A safer implementation would be to inspect the MLIR memory effects on every operation.

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


More information about the flang-commits mailing list