cmd/compile/internal/ssa: only get a fresh memstat if we need it