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

via flang-commits flang-commits at lists.llvm.org
Wed Apr 22 21:51:57 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,
----------------
anoopkg6 wrote:

Thanks for the feedback. 
Updated getReadDependencies with a fail-safe implementation using MemoryEffectOpInterface. It now conservatively captures external references for unknown operations.

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


More information about the flang-commits mailing list