For inspiration you might look at InplaceOps.jl. This only changes functions where it knows that the f! version exists. (IIRC there used to be a larger zoo of LinearAlgebra functions which it treated, many of which became mul!, and broadcasting was less clever.)
3 Likes