diff options
author | David Chase <drchase@google.com> | 2017-10-24 17:51:05 -0400 |
---|---|---|
committer | David Chase <drchase@google.com> | 2017-11-05 17:30:11 +0000 |
commit | 38c725b14830bc1a95eb48cfb04d5f4c6d916a28 (patch) | |
tree | 0357eb78ef2d922316ebf514beadb0cc26cefeac /src/cmd/compile/internal/ssa/testdata | |
parent | c4b65fa4cc4b799cad461779564af30dbf232f13 (diff) | |
download | go-38c725b14830bc1a95eb48cfb04d5f4c6d916a28.tar.gz go-38c725b14830bc1a95eb48cfb04d5f4c6d916a28.zip |
cmd/compile: repair name propagation into aggregate parts
For structs, slices, strings, interfaces, etc, propagation of
names to their components (e.g., complex.real, complex.imag)
is fragile (depends on phase ordering) and not done right
for the "dec" pass.
The dec pass is subsumed into decomposeBuiltin,
and then names are pushed into the args of all
OpFooMake opcodes.
compile/ssa/debug_test.go was fixed to pay attention to
variable values, and the reference files include checks
for the fixes in this CL (which make debugging better).
Change-Id: Ic2591ebb1698d78d07292b92c53667e6c37fa0cd
Reviewed-on: https://go-review.googlesource.com/73210
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Diffstat (limited to 'src/cmd/compile/internal/ssa/testdata')
5 files changed, 151 insertions, 91 deletions
diff --git a/src/cmd/compile/internal/ssa/testdata/hist.dbg-dlv.nexts b/src/cmd/compile/internal/ssa/testdata/hist.dbg-dlv.nexts index d7d980789c..0ed9cd58ee 100644 --- a/src/cmd/compile/internal/ssa/testdata/hist.dbg-dlv.nexts +++ b/src/cmd/compile/internal/ssa/testdata/hist.dbg-dlv.nexts @@ -3,97 +3,97 @@ 57: l := line{point{1 + zero, 2 + zero}, point{3 + zero, 4 + zero}} 58: tinycall() // this forces l etc to stack 59: dx := l.end.x - l.begin.x //gdb-dbg=(l.begin.x,l.end.y) -60: dy := l.end.y - l.begin.y +60: dy := l.end.y - l.begin.y //gdb-opt=(dx) 61: sink = dx + dy -63: hist := make([]int, 7) +63: hist := make([]int, 7) //gdb-opt=(sink) 64: var reader io.Reader = strings.NewReader(cannedInput) //gdb-dbg=(hist/A,cannedInput/A) 65: if len(os.Args) > 1 { 70: return -74: for scanner.Scan() { +74: for scanner.Scan() { //gdb-opt=(scanner/A) 75: s := scanner.Text() 76: i, err := strconv.ParseInt(s, 10, 64) -77: if err != nil { //gdb-dbg=(i) +77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i) 81: hist = ensure(int(i), hist) 82: hist[int(i)]++ -74: for scanner.Scan() { +74: for scanner.Scan() { //gdb-opt=(scanner/A) 75: s := scanner.Text() 76: i, err := strconv.ParseInt(s, 10, 64) -77: if err != nil { //gdb-dbg=(i) +77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i) 81: hist = ensure(int(i), hist) 82: hist[int(i)]++ -74: for scanner.Scan() { +74: for scanner.Scan() { //gdb-opt=(scanner/A) 75: s := scanner.Text() 76: i, err := strconv.ParseInt(s, 10, 64) -77: if err != nil { //gdb-dbg=(i) +77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i) 81: hist = ensure(int(i), hist) 82: hist[int(i)]++ -74: for scanner.Scan() { +74: for scanner.Scan() { //gdb-opt=(scanner/A) 75: s := scanner.Text() 76: i, err := strconv.ParseInt(s, 10, 64) -77: if err != nil { //gdb-dbg=(i) +77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i) 81: hist = ensure(int(i), hist) 82: hist[int(i)]++ -74: for scanner.Scan() { +74: for scanner.Scan() { //gdb-opt=(scanner/A) 75: s := scanner.Text() 76: i, err := strconv.ParseInt(s, 10, 64) -77: if err != nil { //gdb-dbg=(i) +77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i) 81: hist = ensure(int(i), hist) 82: hist[int(i)]++ -74: for scanner.Scan() { +74: for scanner.Scan() { //gdb-opt=(scanner/A) 75: s := scanner.Text() 76: i, err := strconv.ParseInt(s, 10, 64) -77: if err != nil { //gdb-dbg=(i) +77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i) 81: hist = ensure(int(i), hist) 82: hist[int(i)]++ -74: for scanner.Scan() { +74: for scanner.Scan() { //gdb-opt=(scanner/A) 75: s := scanner.Text() 76: i, err := strconv.ParseInt(s, 10, 64) -77: if err != nil { //gdb-dbg=(i) +77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i) 81: hist = ensure(int(i), hist) 82: hist[int(i)]++ -74: for scanner.Scan() { +74: for scanner.Scan() { //gdb-opt=(scanner/A) 75: s := scanner.Text() 76: i, err := strconv.ParseInt(s, 10, 64) -77: if err != nil { //gdb-dbg=(i) +77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i) 81: hist = ensure(int(i), hist) 82: hist[int(i)]++ -74: for scanner.Scan() { +74: for scanner.Scan() { //gdb-opt=(scanner/A) 75: s := scanner.Text() 76: i, err := strconv.ParseInt(s, 10, 64) -77: if err != nil { //gdb-dbg=(i) +77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i) 81: hist = ensure(int(i), hist) 82: hist[int(i)]++ -74: for scanner.Scan() { +74: for scanner.Scan() { //gdb-opt=(scanner/A) 84: t := 0 85: n := 0 86: for i, a := range hist { -87: if a == 0 { +87: if a == 0 { //gdb-opt=(a,n,t) 88: continue 86: for i, a := range hist { -87: if a == 0 { +87: if a == 0 { //gdb-opt=(a,n,t) 90: t += i * a 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) 86: for i, a := range hist { -87: if a == 0 { +87: if a == 0 { //gdb-opt=(a,n,t) 90: t += i * a 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) 86: for i, a := range hist { -87: if a == 0 { +87: if a == 0 { //gdb-opt=(a,n,t) 88: continue 86: for i, a := range hist { -87: if a == 0 { +87: if a == 0 { //gdb-opt=(a,n,t) 90: t += i * a 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) 86: for i, a := range hist { -87: if a == 0 { +87: if a == 0 { //gdb-opt=(a,n,t) 90: t += i * a 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) 86: for i, a := range hist { -87: if a == 0 { +87: if a == 0 { //gdb-opt=(a,n,t) 88: continue 86: for i, a := range hist { 95: } diff --git a/src/cmd/compile/internal/ssa/testdata/hist.dbg-gdb.nexts b/src/cmd/compile/internal/ssa/testdata/hist.dbg-gdb.nexts index 38609a7566..a8dc0d5d54 100644 --- a/src/cmd/compile/internal/ssa/testdata/hist.dbg-gdb.nexts +++ b/src/cmd/compile/internal/ssa/testdata/hist.dbg-gdb.nexts @@ -5,85 +5,85 @@ 59: dx := l.end.x - l.begin.x //gdb-dbg=(l.begin.x,l.end.y) $1 = 1 $2 = 4 -60: dy := l.end.y - l.begin.y +60: dy := l.end.y - l.begin.y //gdb-opt=(dx) 61: sink = dx + dy -63: hist := make([]int, 7) +63: hist := make([]int, 7) //gdb-opt=(sink) 64: var reader io.Reader = strings.NewReader(cannedInput) //gdb-dbg=(hist/A,cannedInput/A) $3 = []int = {0, 0, 0, 0, 0, 0, 0} $4 = "1\n1\n1\n2\n2\n2\n4\n4\n5\n" 65: if len(os.Args) > 1 { 70: return -74: for scanner.Scan() { +74: for scanner.Scan() { //gdb-opt=(scanner/A) 75: s := scanner.Text() 76: i, err := strconv.ParseInt(s, 10, 64) -77: if err != nil { //gdb-dbg=(i) +77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i) $5 = 1 81: hist = ensure(int(i), hist) 82: hist[int(i)]++ -74: for scanner.Scan() { +74: for scanner.Scan() { //gdb-opt=(scanner/A) 75: s := scanner.Text() 76: i, err := strconv.ParseInt(s, 10, 64) -77: if err != nil { //gdb-dbg=(i) +77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i) $6 = 1 81: hist = ensure(int(i), hist) 82: hist[int(i)]++ -74: for scanner.Scan() { +74: for scanner.Scan() { //gdb-opt=(scanner/A) 75: s := scanner.Text() 76: i, err := strconv.ParseInt(s, 10, 64) -77: if err != nil { //gdb-dbg=(i) +77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i) $7 = 1 81: hist = ensure(int(i), hist) 82: hist[int(i)]++ -74: for scanner.Scan() { +74: for scanner.Scan() { //gdb-opt=(scanner/A) 75: s := scanner.Text() 76: i, err := strconv.ParseInt(s, 10, 64) -77: if err != nil { //gdb-dbg=(i) +77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i) $8 = 2 81: hist = ensure(int(i), hist) 82: hist[int(i)]++ -74: for scanner.Scan() { +74: for scanner.Scan() { //gdb-opt=(scanner/A) 75: s := scanner.Text() 76: i, err := strconv.ParseInt(s, 10, 64) -77: if err != nil { //gdb-dbg=(i) +77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i) $9 = 2 81: hist = ensure(int(i), hist) 82: hist[int(i)]++ -74: for scanner.Scan() { +74: for scanner.Scan() { //gdb-opt=(scanner/A) 75: s := scanner.Text() 76: i, err := strconv.ParseInt(s, 10, 64) -77: if err != nil { //gdb-dbg=(i) +77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i) $10 = 2 81: hist = ensure(int(i), hist) 82: hist[int(i)]++ -74: for scanner.Scan() { +74: for scanner.Scan() { //gdb-opt=(scanner/A) 75: s := scanner.Text() 76: i, err := strconv.ParseInt(s, 10, 64) -77: if err != nil { //gdb-dbg=(i) +77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i) $11 = 4 81: hist = ensure(int(i), hist) 82: hist[int(i)]++ -74: for scanner.Scan() { +74: for scanner.Scan() { //gdb-opt=(scanner/A) 75: s := scanner.Text() 76: i, err := strconv.ParseInt(s, 10, 64) -77: if err != nil { //gdb-dbg=(i) +77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i) $12 = 4 81: hist = ensure(int(i), hist) 82: hist[int(i)]++ -74: for scanner.Scan() { +74: for scanner.Scan() { //gdb-opt=(scanner/A) 75: s := scanner.Text() 76: i, err := strconv.ParseInt(s, 10, 64) -77: if err != nil { //gdb-dbg=(i) +77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i) $13 = 5 81: hist = ensure(int(i), hist) 82: hist[int(i)]++ -74: for scanner.Scan() { +74: for scanner.Scan() { //gdb-opt=(scanner/A) 84: t := 0 85: n := 0 86: for i, a := range hist { -87: if a == 0 { +87: if a == 0 { //gdb-opt=(a,n,t) 88: continue 86: for i, a := range hist { -87: if a == 0 { +87: if a == 0 { //gdb-opt=(a,n,t) 90: t += i * a 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) @@ -91,7 +91,7 @@ $14 = 3 $15 = 1 $16 = 3 86: for i, a := range hist { -87: if a == 0 { +87: if a == 0 { //gdb-opt=(a,n,t) 90: t += i * a 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) @@ -99,10 +99,10 @@ $17 = 6 $18 = 2 $19 = 9 86: for i, a := range hist { -87: if a == 0 { +87: if a == 0 { //gdb-opt=(a,n,t) 88: continue 86: for i, a := range hist { -87: if a == 0 { +87: if a == 0 { //gdb-opt=(a,n,t) 90: t += i * a 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) @@ -110,7 +110,7 @@ $20 = 8 $21 = 4 $22 = 17 86: for i, a := range hist { -87: if a == 0 { +87: if a == 0 { //gdb-opt=(a,n,t) 90: t += i * a 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) @@ -118,7 +118,7 @@ $23 = 9 $24 = 5 $25 = 22 86: for i, a := range hist { -87: if a == 0 { +87: if a == 0 { //gdb-opt=(a,n,t) 88: continue 86: for i, a := range hist { 95: } diff --git a/src/cmd/compile/internal/ssa/testdata/hist.go b/src/cmd/compile/internal/ssa/testdata/hist.go index c31e692012..03e6c0e2db 100644 --- a/src/cmd/compile/internal/ssa/testdata/hist.go +++ b/src/cmd/compile/internal/ssa/testdata/hist.go @@ -57,10 +57,10 @@ func main() { l := line{point{1 + zero, 2 + zero}, point{3 + zero, 4 + zero}} tinycall() // this forces l etc to stack dx := l.end.x - l.begin.x //gdb-dbg=(l.begin.x,l.end.y) - dy := l.end.y - l.begin.y + dy := l.end.y - l.begin.y //gdb-opt=(dx) sink = dx + dy // For #21098 - hist := make([]int, 7) + hist := make([]int, 7) //gdb-opt=(sink) var reader io.Reader = strings.NewReader(cannedInput) //gdb-dbg=(hist/A,cannedInput/A) if len(os.Args) > 1 { var err error @@ -71,10 +71,10 @@ func main() { } } scanner := bufio.NewScanner(reader) - for scanner.Scan() { + for scanner.Scan() { //gdb-opt=(scanner/A) s := scanner.Text() i, err := strconv.ParseInt(s, 10, 64) - if err != nil { //gdb-dbg=(i) + if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i) fmt.Fprintf(os.Stderr, "There was an error: %v\n", err) return } @@ -84,7 +84,7 @@ func main() { t := 0 n := 0 for i, a := range hist { - if a == 0 { + if a == 0 { //gdb-opt=(a,n,t) continue } t += i * a diff --git a/src/cmd/compile/internal/ssa/testdata/hist.opt-dlv.nexts b/src/cmd/compile/internal/ssa/testdata/hist.opt-dlv.nexts index c1688e791d..ab58ea5fc5 100644 --- a/src/cmd/compile/internal/ssa/testdata/hist.opt-dlv.nexts +++ b/src/cmd/compile/internal/ssa/testdata/hist.opt-dlv.nexts @@ -4,8 +4,8 @@ 58: tinycall() // this forces l etc to stack 57: l := line{point{1 + zero, 2 + zero}, point{3 + zero, 4 + zero}} 59: dx := l.end.x - l.begin.x //gdb-dbg=(l.begin.x,l.end.y) -60: dy := l.end.y - l.begin.y +60: dy := l.end.y - l.begin.y //gdb-opt=(dx) 61: sink = dx + dy -63: hist := make([]int, 7) +63: hist := make([]int, 7) //gdb-opt=(sink) 64: var reader io.Reader = strings.NewReader(cannedInput) //gdb-dbg=(hist/A,cannedInput/A) 19: "strings" diff --git a/src/cmd/compile/internal/ssa/testdata/hist.opt-gdb.nexts b/src/cmd/compile/internal/ssa/testdata/hist.opt-gdb.nexts index 75de3356f7..1bdbe0d06f 100644 --- a/src/cmd/compile/internal/ssa/testdata/hist.opt-gdb.nexts +++ b/src/cmd/compile/internal/ssa/testdata/hist.opt-gdb.nexts @@ -4,71 +4,116 @@ 58: tinycall() // this forces l etc to stack 57: l := line{point{1 + zero, 2 + zero}, point{3 + zero, 4 + zero}} 59: dx := l.end.x - l.begin.x //gdb-dbg=(l.begin.x,l.end.y) -60: dy := l.end.y - l.begin.y +60: dy := l.end.y - l.begin.y //gdb-opt=(dx) +$1 = 2 61: sink = dx + dy -63: hist := make([]int, 7) +63: hist := make([]int, 7) //gdb-opt=(sink) +$2 = 4 64: var reader io.Reader = strings.NewReader(cannedInput) //gdb-dbg=(hist/A,cannedInput/A) 65: if len(os.Args) > 1 { 73: scanner := bufio.NewScanner(reader) -74: for scanner.Scan() { +74: for scanner.Scan() { //gdb-opt=(scanner/A) +$3 = (struct bufio.Scanner *) <A> 75: s := scanner.Text() 76: i, err := strconv.ParseInt(s, 10, 64) -77: if err != nil { //gdb-dbg=(i) +77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i) +$4 = {tab = 0x0, data = 0x0} +$5 = []int = {0, 0, 0, 0, 0, 0, 0} +$6 = 1 81: hist = ensure(int(i), hist) 82: hist[int(i)]++ -74: for scanner.Scan() { +74: for scanner.Scan() { //gdb-opt=(scanner/A) +$7 = (struct bufio.Scanner *) <A> 75: s := scanner.Text() 76: i, err := strconv.ParseInt(s, 10, 64) -77: if err != nil { //gdb-dbg=(i) +77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i) +$8 = {tab = 0x0, data = 0x0} +$9 = []int = {0, 1, 0, 0, 0, 0, 0} +$10 = 1 81: hist = ensure(int(i), hist) 82: hist[int(i)]++ -74: for scanner.Scan() { +74: for scanner.Scan() { //gdb-opt=(scanner/A) +$11 = (struct bufio.Scanner *) <A> 75: s := scanner.Text() 76: i, err := strconv.ParseInt(s, 10, 64) -77: if err != nil { //gdb-dbg=(i) +77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i) +$12 = {tab = 0x0, data = 0x0} +$13 = []int = {0, 2, 0, 0, 0, 0, 0} +$14 = 1 81: hist = ensure(int(i), hist) 82: hist[int(i)]++ -74: for scanner.Scan() { +74: for scanner.Scan() { //gdb-opt=(scanner/A) +$15 = (struct bufio.Scanner *) <A> 75: s := scanner.Text() 76: i, err := strconv.ParseInt(s, 10, 64) -77: if err != nil { //gdb-dbg=(i) +77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i) +$16 = {tab = 0x0, data = 0x0} +$17 = []int = {0, 3, 0, 0, 0, 0, 0} +$18 = 2 81: hist = ensure(int(i), hist) 82: hist[int(i)]++ -74: for scanner.Scan() { +74: for scanner.Scan() { //gdb-opt=(scanner/A) +$19 = (struct bufio.Scanner *) <A> 75: s := scanner.Text() 76: i, err := strconv.ParseInt(s, 10, 64) -77: if err != nil { //gdb-dbg=(i) +77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i) +$20 = {tab = 0x0, data = 0x0} +$21 = []int = {0, 3, 1, 0, 0, 0, 0} +$22 = 2 81: hist = ensure(int(i), hist) 82: hist[int(i)]++ -74: for scanner.Scan() { +74: for scanner.Scan() { //gdb-opt=(scanner/A) +$23 = (struct bufio.Scanner *) <A> 75: s := scanner.Text() 76: i, err := strconv.ParseInt(s, 10, 64) -77: if err != nil { //gdb-dbg=(i) +77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i) +$24 = {tab = 0x0, data = 0x0} +$25 = []int = {0, 3, 2, 0, 0, 0, 0} +$26 = 2 81: hist = ensure(int(i), hist) 82: hist[int(i)]++ -74: for scanner.Scan() { +74: for scanner.Scan() { //gdb-opt=(scanner/A) +$27 = (struct bufio.Scanner *) <A> 75: s := scanner.Text() 76: i, err := strconv.ParseInt(s, 10, 64) -77: if err != nil { //gdb-dbg=(i) +77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i) +$28 = {tab = 0x0, data = 0x0} +$29 = []int = {0, 3, 3, 0, 0, 0, 0} +$30 = 4 81: hist = ensure(int(i), hist) 82: hist[int(i)]++ -74: for scanner.Scan() { +74: for scanner.Scan() { //gdb-opt=(scanner/A) +$31 = (struct bufio.Scanner *) <A> 75: s := scanner.Text() 76: i, err := strconv.ParseInt(s, 10, 64) -77: if err != nil { //gdb-dbg=(i) +77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i) +$32 = {tab = 0x0, data = 0x0} +$33 = []int = {0, 3, 3, 0, 1, 0, 0} +$34 = 4 81: hist = ensure(int(i), hist) 82: hist[int(i)]++ -74: for scanner.Scan() { +74: for scanner.Scan() { //gdb-opt=(scanner/A) +$35 = (struct bufio.Scanner *) <A> 75: s := scanner.Text() 76: i, err := strconv.ParseInt(s, 10, 64) -77: if err != nil { //gdb-dbg=(i) +77: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i) +$36 = {tab = 0x0, data = 0x0} +$37 = []int = {0, 3, 3, 0, 2, 0, 0} +$38 = 5 81: hist = ensure(int(i), hist) 82: hist[int(i)]++ -74: for scanner.Scan() { +74: for scanner.Scan() { //gdb-opt=(scanner/A) +$39 = (struct bufio.Scanner *) <A> 86: for i, a := range hist { -87: if a == 0 { +87: if a == 0 { //gdb-opt=(a,n,t) +$40 = 0 +$41 = 0 +$42 = 0 88: continue -87: if a == 0 { +87: if a == 0 { //gdb-opt=(a,n,t) +$43 = 3 +$44 = 0 +$45 = 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) @@ -78,7 +123,10 @@ 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 { 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) -87: if a == 0 { +87: if a == 0 { //gdb-opt=(a,n,t) +$46 = 3 +$47 = 3 +$48 = 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) @@ -88,9 +136,15 @@ 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 { 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) -87: if a == 0 { +87: if a == 0 { //gdb-opt=(a,n,t) +$49 = 0 +$50 = 6 +$51 = 9 88: continue -87: if a == 0 { +87: if a == 0 { //gdb-opt=(a,n,t) +$52 = 2 +$53 = 6 +$54 = 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) @@ -100,7 +154,10 @@ 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 { 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) -87: if a == 0 { +87: if a == 0 { //gdb-opt=(a,n,t) +$55 = 1 +$56 = 8 +$57 = 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) @@ -110,6 +167,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) 86: for i, a := range hist { 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) -87: if a == 0 { +87: if a == 0 { //gdb-opt=(a,n,t) +$58 = 0 +$59 = 9 +$60 = 22 88: continue 95: } |