Files
clang-p2996/flang/lib/Optimizer/HLFIR/Transforms/OptimizedBufferization.cpp
khaki3 5d48248755 [flang] Inline minval/maxval over elemental/designate (#103503)
This PR intends to optimize away `hlfir.elemental` operations, which
leave temporary buffers (`allocmem`) in FIR. We typically see elemental
operations in the arguments of reduction intrinsics, so extending
`OptimizedBufferization` shall be the first solution to get heap-free
code.

Here we newly handle `minval`/`maxval` along with other reduction
intrinsics. Those functions over elemental become do loops. Furthermore,
we take the same action with `hlfir.designate` in order to inline more
intrinsics, which otherwise call runtime routines.
2024-08-15 17:32:56 -07:00

47 KiB