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.
47 KiB
47 KiB