mirror of
https://github.com/golang/go
synced 2024-09-23 21:20:13 -06:00
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>
This commit is contained in:
parent
60ab197bc2
commit
109d7580a5
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,8 @@
|
||||
// errorcheckwithauto -0 -l -live -wb=0 -d=ssa/insert_resched_checks/off
|
||||
// +build amd64,goexperiment.regabidefer,goexperiment.regabiargs
|
||||
// +build amd64,goexperiment.regabidefer,goexperiment.regabiargs,ignore
|
||||
|
||||
// Disabled for now. The compiler sometimes has bad name-value association
|
||||
// for args, causing args appears as autotmps.
|
||||
|
||||
// Copyright 2014 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
|
Loading…
Reference in New Issue
Block a user