]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: reenable name preservation on copies in expand_calls
authorCherry Zhang <cherryyz@google.com>
Wed, 21 Apr 2021 01:07:23 +0000 (21:07 -0400)
committerCherry Zhang <cherryyz@google.com>
Wed, 21 Apr 2021 14:16:01 +0000 (14:16 +0000)
This reverts CL 311829, and reenables CL 309330. The issue
should be fixed in the previous CL.

Change-Id: I69db0565c72470a1814f135d8f8ec62c781bfc5a
Reviewed-on: https://go-review.googlesource.com/c/go/+/312094
Trust: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
src/cmd/compile/internal/ssa/expand_calls.go
test/live_regabi.go

index 48e40bb00a3e887f10973e688bd3e4ed9f99df69..4d5376b34489a12e089a8d7922eab9a5ea7436a8 100644 (file)
@@ -1452,17 +1452,15 @@ func expandCalls(f *Func) {
 
        // Step 6: elide any copies introduced.
        // Update named values.
-       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
+       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
                        }
                }
        }
index af14ede73f226caac44519d535d4140181b66a38..2b0278ecb83c903531e7076d865e1d6d6fec63b2 100644 (file)
@@ -1,8 +1,5 @@
 // errorcheckwithauto -0 -l -live -wb=0 -d=ssa/insert_resched_checks/off
-// +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.
+// +build amd64,goexperiment.regabidefer,goexperiment.regabiargs
 
 // Copyright 2014 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style