diff options
author | Cherry Zhang <cherryyz@google.com> | 2021-04-20 11:59:40 -0400 |
---|---|---|
committer | Cherry Zhang <cherryyz@google.com> | 2021-04-20 16:44:18 +0000 |
commit | 109d7580a5c507b1e4f460445a5c4cd7313e4aa6 (patch) | |
tree | 2b3034970c9586070bf41d388093153f05400e92 /src/cmd/compile/internal/ssa | |
parent | 60ab197bc2bebb0ad25e7f4610c6e4aae71d29e4 (diff) | |
download | go-109d7580a5c507b1e4f460445a5c4cd7313e4aa6.tar.gz go-109d7580a5c507b1e4f460445a5c4cd7313e4aa6.zip |
cmd/compile: disable name preservation on copies in expand_calls
Apparently CL 309330 caused the compiler OOMing on some large
input (giant generated switch statement). I don't quite understand
it for now. Disable it for now.
Change-Id: I19c84f3f5e158897bff0b32d6217fcff3c66874d
Reviewed-on: https://go-review.googlesource.com/c/go/+/311829
Trust: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/ssa')
-rw-r--r-- | src/cmd/compile/internal/ssa/expand_calls.go | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/cmd/compile/internal/ssa/expand_calls.go b/src/cmd/compile/internal/ssa/expand_calls.go index b2b2b5d877..be460457a8 100644 --- a/src/cmd/compile/internal/ssa/expand_calls.go +++ b/src/cmd/compile/internal/ssa/expand_calls.go @@ -1450,15 +1450,17 @@ func expandCalls(f *Func) { // Step 6: elide any copies introduced. // Update named values. - for _, name := range f.Names { - values := f.NamedValues[name] - for i, v := range values { - if v.Op == OpCopy { - a := v.Args[0] - for a.Op == OpCopy { - a = a.Args[0] + if false { // TODO: reeanable. It caused compiler OOMing on large input. + for _, name := range f.Names { + values := f.NamedValues[name] + for i, v := range values { + if v.Op == OpCopy { + a := v.Args[0] + for a.Op == OpCopy { + a = a.Args[0] + } + values[i] = a } - values[i] = a } } } |