[flang][hlfir] avoid useless LHS temporaries inside WHERE
The need to save LHS addresses on a stack before doing an assignment is very limited: it is only really needed for forall and vectore subscripted LHS where the LHS cannot be computed as a descriptor. The previous current WHERE codegen was creating address stacks for LHS element addresses when the LHS evaluation conflicts with the assignment (may depend on the LHS value). This is not needed since the computed array designator for the LHS is already "saved" before the assignment from an SSA point of view. This patch prevents LHS temporary stack from being created outside of forall and vector subscripted assignments. Differential Revision: https://reviews.llvm.org/D154418
Loading
Please sign in to comment