2 Commits

Author SHA1 Message Date
Slava Zakharin
f1ea831dbc
[flang][hlfir] Make alias analysis trace through box designators. (#67353)
The changes are needed to get leslie3d same performance with HLFIR
as with FIR lowering. The two module allocatable variables cannot
alias, so the optimized bufferization should be able to elide
the temporary and inline the assignment loop.
2023-09-25 11:27:28 -07:00
Slava Zakharin
cdd5b1629a [flang][hlfir] Expand array hlfir.assign's.
Expand hlfir.assign with in-memory array RHS and LHS into
a loop nest with element-by-element assignments.
For small arrays this may result in further loop nest unrolling
enabling more value propagation and redundancy elimination.

Note the change in flang/test/HLFIR/opt-bufferization.fir:
the hlfir.assign inside hlfir.elemental gets expanded by the new
pattern.

Depends on D159151

Reviewed By: tblah

Differential Revision: https://reviews.llvm.org/D159246
2023-08-31 08:46:26 -07:00