]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: disable name preservation on copies in expand_calls
authorCherry Zhang <cherryyz@google.com>
Tue, 20 Apr 2021 15:59:40 +0000 (11:59 -0400)
committerCherry Zhang <cherryyz@google.com>
Tue, 20 Apr 2021 16:44:18 +0000 (16:44 +0000)
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>

src/cmd/compile/internal/ssa/expand_calls.go
test/live_regabi.go

index b2b2b5d877fbde4ef43ce8182b9908d06bb31550..be460457a8b71fa46df5978056788827f2e0c2a4 100644 (file)
@@ -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
                        }
                }
        }
index 2b0278ecb83c903531e7076d865e1d6d6fec63b2..af14ede73f226caac44519d535d4140181b66a38 100644 (file)
@@ -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