1
0
mirror of https://github.com/golang/go synced 2024-11-11 20:20:23 -07:00

[dev.ssa] cmd/compile: enable SSA on ARM by default

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>
This commit is contained in:
Cherry Zhang 2016-06-07 14:18:04 -04:00
parent 41a7dca272
commit 42181ad852
6 changed files with 11 additions and 8 deletions

View File

@ -37,8 +37,13 @@ func shouldssa(fn *Node) bool {
if os.Getenv("SSATEST") == "" { if os.Getenv("SSATEST") == "" {
return false return false
} }
// Generally available. case "arm":
// nacl/arm doesn't work yet
if obj.Getgoos() == "nacl" && os.Getenv("SSATEST") == "" {
return false
}
case "amd64": case "amd64":
// Generally available.
} }
if !ssaEnabled { if !ssaEnabled {
return false return false

View File

@ -1,4 +1,4 @@
// +build !amd64 // +build !amd64,!arm nacl,arm
// errorcheck -0 -l -live -wb=0 // errorcheck -0 -l -live -wb=0
// Copyright 2014 The Go Authors. All rights reserved. // Copyright 2014 The Go Authors. All rights reserved.

View File

@ -1,4 +1,4 @@
// +build amd64 // +build amd64 arm,!nacl
// errorcheck -0 -l -live -wb=0 // errorcheck -0 -l -live -wb=0
// Copyright 2014 The Go Authors. All rights reserved. // Copyright 2014 The Go Authors. All rights reserved.

View File

@ -2,7 +2,7 @@
// Fails on ppc64x because of incomplete optimization. // Fails on ppc64x because of incomplete optimization.
// See issues 9058. // See issues 9058.
// Same reason for mips64x and s390x. // 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. // Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style

View File

@ -1,7 +1,5 @@
// errorcheck -0 -d=nil // errorcheck -0 -d=nil
// Fails on ppc64x because of incomplete optimization. // +build amd64 arm,!nacl
// See issues 9058.
// +build !ppc64,!ppc64le,amd64
// Copyright 2013 The Go Authors. All rights reserved. // Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style

View File

@ -1,4 +1,4 @@
// +build !amd64 // +build !amd64,!arm nacl,arm
// errorcheck -0 -d=append,slice // errorcheck -0 -d=append,slice
// Copyright 2015 The Go Authors. All rights reserved. // Copyright 2015 The Go Authors. All rights reserved.