]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: tighten for huge functions in -N mode
authorCherry Mui <cherryyz@google.com>
Fri, 10 Mar 2023 21:28:57 +0000 (16:28 -0500)
committerCherry Mui <cherryyz@google.com>
Mon, 13 Mar 2023 22:04:56 +0000 (22:04 +0000)
commit40a6e2dae5a9c75f1ddc6f97b48b9442c118653f
treedc5ba9498b79aac850a740bb27d38153e601cd3e
parent7f38067acb738c43d870400dd648662d31456f5f
cmd/compile: tighten for huge functions in -N mode

Currently, in -N mode we skip the tighten pass. However, for very
large functions, many values live across blocks can cause
pathological behavior in the register allocator, which could use
a huge amount of memory or cause the program to hang. For
functions that large, debugging using a debugger is unlikely to be
very useful (the function is probably generated anyway). So we do
a little optimization to make fewer values live across blocks and
make it easier for the compiler.

Fixes #52180.

Change-Id: I355fe31bb87ea5d0870bb52dd06405dd5d791dab
Reviewed-on: https://go-review.googlesource.com/c/go/+/475339
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ssa/compile.go
src/cmd/compile/internal/ssa/tighten.go