]> Cypherpunks.ru repositories - gostls13.git/commitdiff
[dev.ssa] cmd/compile: enable SSA on ARM by default
authorCherry Zhang <cherryyz@google.com>
Tue, 7 Jun 2016 18:18:04 +0000 (14:18 -0400)
committerCherry Zhang <cherryyz@google.com>
Wed, 6 Jul 2016 15:05:50 +0000 (15:05 +0000)
As Josh mentioned in CL 24716, there has been requests for using SSA
for ARM. SSA can still be disabled by setting -ssa=0 for cmd/compile,
or partially enabled with GOSSAFUNC, GOSSAPKG, and GOSSAHASH.

Not enable SSA by default on NaCl, which is not supported yet.

Enable SSA-specific tests on ARM: live_ssa.go and nilptr3_ssa.go;
disable non-SSA tests: live.go, nilptr3.go, and slicepot.go.

Updates #15365.

Change-Id: Ic2ca8d166aeca8517b9d262a55e92f2130683a16
Reviewed-on: https://go-review.googlesource.com/23953
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/gc/ssa.go
test/live.go
test/live_ssa.go
test/nilptr3.go
test/nilptr3_ssa.go
test/sliceopt.go

index 90f48dcab40fcd167449966f99715fa179f7f52a..4942466b7103910da5d52484fa8ea8c2308306e0 100644 (file)
@@ -37,8 +37,13 @@ func shouldssa(fn *Node) bool {
                if os.Getenv("SSATEST") == "" {
                        return false
                }
-               // Generally available.
+       case "arm":
+               // nacl/arm doesn't work yet
+               if obj.Getgoos() == "nacl" && os.Getenv("SSATEST") == "" {
+                       return false
+               }
        case "amd64":
+               // Generally available.
        }
        if !ssaEnabled {
                return false
index da0606db715a35c3660f03f82cfda59304051850..a8e1f28c13963a455937b4823209ba4d41af4ea8 100644 (file)
@@ -1,4 +1,4 @@
-// +build !amd64
+// +build !amd64,!arm nacl,arm
 // errorcheck -0 -l -live -wb=0
 
 // Copyright 2014 The Go Authors. All rights reserved.
index bd709246f63ce8ee88706b50251012aab681deb6..91bad0c8b906c5796e1da5b9e4a818a173096de7 100644 (file)
@@ -1,4 +1,4 @@
-// +build amd64
+// +build amd64 arm,!nacl
 // errorcheck -0 -l -live -wb=0
 
 // Copyright 2014 The Go Authors. All rights reserved.
index 8922729ec8952040695499ea5addd3531db2c60f..75f5a10bd0453cf2ee634e6ee2e938b5f3c59061 100644 (file)
@@ -2,7 +2,7 @@
 // Fails on ppc64x because of incomplete optimization.
 // See issues 9058.
 // Same reason for mips64x and s390x.
-// +build !ppc64,!ppc64le,!mips64,!mips64le,!amd64,!s390x
+// +build !ppc64,!ppc64le,!mips64,!mips64le,!amd64,!s390x,!arm nacl,arm
 
 // Copyright 2013 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
index 0d690eb44622c0b9e6eea7ea6545357d76fb9289..8482175139e087bde51d349f06309fdeda3371cc 100644 (file)
@@ -1,7 +1,5 @@
 // errorcheck -0 -d=nil
-// Fails on ppc64x because of incomplete optimization.
-// See issues 9058.
-// +build !ppc64,!ppc64le,amd64
+// +build amd64 arm,!nacl
 
 // Copyright 2013 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
index a830ab7cf6b9f612b6eaa11daabef5c294749369..e60516571bef171ff6e5d80cf8c73cf7b03bae72 100644 (file)
@@ -1,4 +1,4 @@
-// +build !amd64
+// +build !amd64,!arm nacl,arm
 // errorcheck -0 -d=append,slice
 
 // Copyright 2015 The Go Authors. All rights reserved.