aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/testdata
diff options
context:
space:
mode:
authorDavid Chase <drchase@google.com>2019-07-29 16:23:31 -0400
committerDavid Chase <drchase@google.com>2019-10-04 20:41:52 +0000
commitc450ace12c657e3953d79975c04f51605395cd50 (patch)
tree76faeebeefa1d8b68f66f737cedee8438fd33f5d /src/cmd/compile/internal/ssa/testdata
parent9a926911fea73017a25d6d38035946c59cf1b047 (diff)
downloadgo-c450ace12c657e3953d79975c04f51605395cd50.tar.gz
go-c450ace12c657e3953d79975c04f51605395cd50.zip
cmd/compile: remove statement marks from secondary calls
Calls are code-generated in an alternate path that inherits its positions from values, not from *SSAGenState. The default position on *SSAGenState was marked as not-a-statement, but this was not applied to the value itself, leading to spurious "is statement" marks in the output (convention: after code generation in the compiler, everything is either definitely a statement or definitely not a statement, nothing is in the undetermined state). This CL causes a 35 statement regression in ssa/stmtlines_test. This is down from the earlier 150 because of all the other CLs preceding this one that deal with the root causes of the missing lines (repeated lines on nested calls hid missing lines). This also removes some line repeats from ssa/debug_test. Change-Id: Ie9a507bd5447e906b35bbd098e3295211df2ae01 Reviewed-on: https://go-review.googlesource.com/c/go/+/188018 Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jeremy Faller <jeremy@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/ssa/testdata')
-rw-r--r--src/cmd/compile/internal/ssa/testdata/hist.dlv-opt.nexts8
-rw-r--r--src/cmd/compile/internal/ssa/testdata/hist.gdb-dbg.nexts2
-rw-r--r--src/cmd/compile/internal/ssa/testdata/hist.gdb-opt.nexts44
3 files changed, 10 insertions, 44 deletions
diff --git a/src/cmd/compile/internal/ssa/testdata/hist.dlv-opt.nexts b/src/cmd/compile/internal/ssa/testdata/hist.dlv-opt.nexts
index 1e4d35051b..2be83ce936 100644
--- a/src/cmd/compile/internal/ssa/testdata/hist.dlv-opt.nexts
+++ b/src/cmd/compile/internal/ssa/testdata/hist.dlv-opt.nexts
@@ -70,32 +70,24 @@
87: if a == 0 { //gdb-opt=(a,n,t)
92: fmt.Fprintf(os.Stderr, "%d\t%d\t%d\t%d\t%d\n", i, a, n, i*a, t) //gdb-dbg=(n,i,t)
91: n += a
-92: fmt.Fprintf(os.Stderr, "%d\t%d\t%d\t%d\t%d\n", i, a, n, i*a, t) //gdb-dbg=(n,i,t)
90: t += i * a
-92: fmt.Fprintf(os.Stderr, "%d\t%d\t%d\t%d\t%d\n", i, a, n, i*a, t) //gdb-dbg=(n,i,t)
86: for i, a := range hist {
87: if a == 0 { //gdb-opt=(a,n,t)
92: fmt.Fprintf(os.Stderr, "%d\t%d\t%d\t%d\t%d\n", i, a, n, i*a, t) //gdb-dbg=(n,i,t)
91: n += a
-92: fmt.Fprintf(os.Stderr, "%d\t%d\t%d\t%d\t%d\n", i, a, n, i*a, t) //gdb-dbg=(n,i,t)
90: t += i * a
-92: fmt.Fprintf(os.Stderr, "%d\t%d\t%d\t%d\t%d\n", i, a, n, i*a, t) //gdb-dbg=(n,i,t)
86: for i, a := range hist {
87: if a == 0 { //gdb-opt=(a,n,t)
86: for i, a := range hist {
87: if a == 0 { //gdb-opt=(a,n,t)
92: fmt.Fprintf(os.Stderr, "%d\t%d\t%d\t%d\t%d\n", i, a, n, i*a, t) //gdb-dbg=(n,i,t)
91: n += a
-92: fmt.Fprintf(os.Stderr, "%d\t%d\t%d\t%d\t%d\n", i, a, n, i*a, t) //gdb-dbg=(n,i,t)
90: t += i * a
-92: fmt.Fprintf(os.Stderr, "%d\t%d\t%d\t%d\t%d\n", i, a, n, i*a, t) //gdb-dbg=(n,i,t)
86: for i, a := range hist {
87: if a == 0 { //gdb-opt=(a,n,t)
92: fmt.Fprintf(os.Stderr, "%d\t%d\t%d\t%d\t%d\n", i, a, n, i*a, t) //gdb-dbg=(n,i,t)
91: n += a
-92: fmt.Fprintf(os.Stderr, "%d\t%d\t%d\t%d\t%d\n", i, a, n, i*a, t) //gdb-dbg=(n,i,t)
90: t += i * a
-92: fmt.Fprintf(os.Stderr, "%d\t%d\t%d\t%d\t%d\n", i, a, n, i*a, t) //gdb-dbg=(n,i,t)
86: for i, a := range hist {
87: if a == 0 { //gdb-opt=(a,n,t)
86: for i, a := range hist {
diff --git a/src/cmd/compile/internal/ssa/testdata/hist.gdb-dbg.nexts b/src/cmd/compile/internal/ssa/testdata/hist.gdb-dbg.nexts
index 4fde3bcc66..72df60c76f 100644
--- a/src/cmd/compile/internal/ssa/testdata/hist.gdb-dbg.nexts
+++ b/src/cmd/compile/internal/ssa/testdata/hist.gdb-dbg.nexts
@@ -9,7 +9,7 @@ l.end.y = 4
61: sink = dx + dy //gdb-opt=(dx,dy)
63: hist := make([]int, 7) //gdb-opt=(dx/O,dy/O) // TODO sink is missing if this code is in 'test' instead of 'main'
64: var reader io.Reader = strings.NewReader(cannedInput) //gdb-dbg=(hist/A) // TODO cannedInput/A is missing if this code is in 'test' instead of 'main'
-hist = []int = {0, 0, 0, 0, 0, 0, 0}
+hist = {array = <A>, len = 7, cap = 7}
65: if len(os.Args) > 1 {
73: scanner := bufio.NewScanner(reader)
74: for scanner.Scan() { //gdb-opt=(scanner/A)
diff --git a/src/cmd/compile/internal/ssa/testdata/hist.gdb-opt.nexts b/src/cmd/compile/internal/ssa/testdata/hist.gdb-opt.nexts
index 65c5d0a2ce..d3a34acf69 100644
--- a/src/cmd/compile/internal/ssa/testdata/hist.gdb-opt.nexts
+++ b/src/cmd/compile/internal/ssa/testdata/hist.gdb-opt.nexts
@@ -24,92 +24,74 @@ scanner = (bufio.Scanner *) <A>
76: i, err := strconv.ParseInt(s, 10, 64)
77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
err = {tab = 0x0, data = 0x0}
-hist = []int = {0, 0, 0, 0, 0, 0, 0}
+hist = {array = 0xc00005ae50, len = 7, cap = 7}
i = 1
81: hist = ensure(int(i), hist)
82: hist[int(i)]++
-74: for scanner.Scan() { //gdb-opt=(scanner/A)
-scanner = (bufio.Scanner *) <A>
75: s := scanner.Text()
76: i, err := strconv.ParseInt(s, 10, 64)
77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
err = {tab = 0x0, data = 0x0}
-hist = []int = {0, 1, 0, 0, 0, 0, 0}
+hist = {array = 0xc00005ae50, len = 7, cap = 7}
i = 1
81: hist = ensure(int(i), hist)
82: hist[int(i)]++
-74: for scanner.Scan() { //gdb-opt=(scanner/A)
-scanner = (bufio.Scanner *) <A>
75: s := scanner.Text()
76: i, err := strconv.ParseInt(s, 10, 64)
77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
err = {tab = 0x0, data = 0x0}
-hist = []int = {0, 2, 0, 0, 0, 0, 0}
+hist = {array = 0xc00005ae50, len = 7, cap = 7}
i = 1
81: hist = ensure(int(i), hist)
82: hist[int(i)]++
-74: for scanner.Scan() { //gdb-opt=(scanner/A)
-scanner = (bufio.Scanner *) <A>
75: s := scanner.Text()
76: i, err := strconv.ParseInt(s, 10, 64)
77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
err = {tab = 0x0, data = 0x0}
-hist = []int = {0, 3, 0, 0, 0, 0, 0}
+hist = {array = 0xc00005ae50, len = 7, cap = 7}
i = 2
81: hist = ensure(int(i), hist)
82: hist[int(i)]++
-74: for scanner.Scan() { //gdb-opt=(scanner/A)
-scanner = (bufio.Scanner *) <A>
75: s := scanner.Text()
76: i, err := strconv.ParseInt(s, 10, 64)
77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
err = {tab = 0x0, data = 0x0}
-hist = []int = {0, 3, 1, 0, 0, 0, 0}
+hist = {array = 0xc00005ae50, len = 7, cap = 7}
i = 2
81: hist = ensure(int(i), hist)
82: hist[int(i)]++
-74: for scanner.Scan() { //gdb-opt=(scanner/A)
-scanner = (bufio.Scanner *) <A>
75: s := scanner.Text()
76: i, err := strconv.ParseInt(s, 10, 64)
77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
err = {tab = 0x0, data = 0x0}
-hist = []int = {0, 3, 2, 0, 0, 0, 0}
+hist = {array = 0xc00005ae50, len = 7, cap = 7}
i = 2
81: hist = ensure(int(i), hist)
82: hist[int(i)]++
-74: for scanner.Scan() { //gdb-opt=(scanner/A)
-scanner = (bufio.Scanner *) <A>
75: s := scanner.Text()
76: i, err := strconv.ParseInt(s, 10, 64)
77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
err = {tab = 0x0, data = 0x0}
-hist = []int = {0, 3, 3, 0, 0, 0, 0}
+hist = {array = 0xc00005ae50, len = 7, cap = 7}
i = 4
81: hist = ensure(int(i), hist)
82: hist[int(i)]++
-74: for scanner.Scan() { //gdb-opt=(scanner/A)
-scanner = (bufio.Scanner *) <A>
75: s := scanner.Text()
76: i, err := strconv.ParseInt(s, 10, 64)
77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
err = {tab = 0x0, data = 0x0}
-hist = []int = {0, 3, 3, 0, 1, 0, 0}
+hist = {array = 0xc00005ae50, len = 7, cap = 7}
i = 4
81: hist = ensure(int(i), hist)
82: hist[int(i)]++
-74: for scanner.Scan() { //gdb-opt=(scanner/A)
-scanner = (bufio.Scanner *) <A>
75: s := scanner.Text()
76: i, err := strconv.ParseInt(s, 10, 64)
77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
err = {tab = 0x0, data = 0x0}
-hist = []int = {0, 3, 3, 0, 2, 0, 0}
+hist = {array = 0xc00005ae50, len = 7, cap = 7}
i = 5
81: hist = ensure(int(i), hist)
82: hist[int(i)]++
-74: for scanner.Scan() { //gdb-opt=(scanner/A)
-scanner = (bufio.Scanner *) <A>
86: for i, a := range hist {
87: if a == 0 { //gdb-opt=(a,n,t)
a = 0
@@ -122,9 +104,7 @@ n = 0
t = 0
92: fmt.Fprintf(os.Stderr, "%d\t%d\t%d\t%d\t%d\n", i, a, n, i*a, t) //gdb-dbg=(n,i,t)
91: n += a
-92: fmt.Fprintf(os.Stderr, "%d\t%d\t%d\t%d\t%d\n", i, a, n, i*a, t) //gdb-dbg=(n,i,t)
90: t += i * a
-92: fmt.Fprintf(os.Stderr, "%d\t%d\t%d\t%d\t%d\n", i, a, n, i*a, t) //gdb-dbg=(n,i,t)
86: for i, a := range hist {
87: if a == 0 { //gdb-opt=(a,n,t)
a = 3
@@ -132,9 +112,7 @@ n = 3
t = 3
92: fmt.Fprintf(os.Stderr, "%d\t%d\t%d\t%d\t%d\n", i, a, n, i*a, t) //gdb-dbg=(n,i,t)
91: n += a
-92: fmt.Fprintf(os.Stderr, "%d\t%d\t%d\t%d\t%d\n", i, a, n, i*a, t) //gdb-dbg=(n,i,t)
90: t += i * a
-92: fmt.Fprintf(os.Stderr, "%d\t%d\t%d\t%d\t%d\n", i, a, n, i*a, t) //gdb-dbg=(n,i,t)
86: for i, a := range hist {
87: if a == 0 { //gdb-opt=(a,n,t)
a = 0
@@ -147,9 +125,7 @@ n = 6
t = 9
92: fmt.Fprintf(os.Stderr, "%d\t%d\t%d\t%d\t%d\n", i, a, n, i*a, t) //gdb-dbg=(n,i,t)
91: n += a
-92: fmt.Fprintf(os.Stderr, "%d\t%d\t%d\t%d\t%d\n", i, a, n, i*a, t) //gdb-dbg=(n,i,t)
90: t += i * a
-92: fmt.Fprintf(os.Stderr, "%d\t%d\t%d\t%d\t%d\n", i, a, n, i*a, t) //gdb-dbg=(n,i,t)
86: for i, a := range hist {
87: if a == 0 { //gdb-opt=(a,n,t)
a = 1
@@ -157,9 +133,7 @@ n = 8
t = 17
92: fmt.Fprintf(os.Stderr, "%d\t%d\t%d\t%d\t%d\n", i, a, n, i*a, t) //gdb-dbg=(n,i,t)
91: n += a
-92: fmt.Fprintf(os.Stderr, "%d\t%d\t%d\t%d\t%d\n", i, a, n, i*a, t) //gdb-dbg=(n,i,t)
90: t += i * a
-92: fmt.Fprintf(os.Stderr, "%d\t%d\t%d\t%d\t%d\n", i, a, n, i*a, t) //gdb-dbg=(n,i,t)
86: for i, a := range hist {
87: if a == 0 { //gdb-opt=(a,n,t)
a = 0