cmd/compile: improve escape analysis of make([]T, len, cap) where len is non-constant #37975
Labels
FrozenDueToAge
help wanted
NeedsFix
The path to resolution is known, but the work has not been done.
Performance
Milestone
In this program, the compiler's escape analysis judges that the array allocated by make escapes to the heap, when
len
is variable. But actually this array can be allocated on stack because we can't makelen
greater thancap
in runtime andcap
is constant.The text was updated successfully, but these errors were encountered: