[flang-commits] [flang] [flang][hlfir] Better recognize non-overlapping array sections. (PR #65707)

Slava Zakharin via flang-commits flang-commits at lists.llvm.org
Fri Sep 8 08:40:20 PDT 2023


vzakhari wrote:

> Looks good to me! Nice work. Is that all of the performance stuff done?

Unfortunately, this does not resolve the nf performance regression.  In the benchmark, in addition to non-overlapping slices of `x` on the LHS and RHS, there is a use of a host associated variable on the RHS, and this use is reported as conflicting by the current alias analysis.  ArrayValueCopy is able to claim no-overlap in this case somehow.  The chain of operations for this host associated variable access up to the dummy block argument (for the host associated variables) looks quite complex, e.g. there are indexing of the host associate block and box loads.  I think we may need to attribute the corresponding `hlfir.declare` with `fir.host_assoc` so that the alias analysis can disambiguate dummy argument accesses vs the host associated variables accesses.

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


More information about the flang-commits mailing list