1 src/cmd/compile/internal/ssa/testdata/hist.go
255: func test() {
357: l := line{point{1 + zero, 2 + zero}, point{3 + zero, 4 + zero}}
458: tinycall() // this forces l etc to stack
559: dx := l.end.x - l.begin.x //gdb-dbg=(l.begin.x,l.end.y)//gdb-opt=(l,dx/O,dy/O)
6l = {begin = {x = 1, y = 2}, end = {x = 3, y = 4}}
7dx = <Optimized out, as expected>
8dy = <Optimized out, as expected>
960: dy := l.end.y - l.begin.y //gdb-opt=(dx,dy/O)
10dx = 2
11dy = <Optimized out, as expected>
1261: sink = dx + dy //gdb-opt=(dx,dy)
13dx = 2
14dy = 2
1563: hist := make([]int, 7) //gdb-opt=(dx/O,dy/O) // TODO sink is missing if this code is in 'test' instead of 'main'
16dx = 2
17dy = <Optimized out, as expected>
1864: 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'
1965: if len(os.Args) > 1 {
2073: scanner := bufio.NewScanner(reader)
2174: for scanner.Scan() { //gdb-opt=(scanner/A)
22scanner = (bufio.Scanner *) <A>
2375: s := scanner.Text()
2476: i, err := strconv.ParseInt(s, 10, 64)
2577: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
26err = {tab = 0x0, data = 0x0}
27hist = {array = 0xc00005ae50, len = 7, cap = 7}
28i = 1
2981: hist = ensure(int(i), hist)
3082: hist[int(i)]++
3175: s := scanner.Text()
3276: i, err := strconv.ParseInt(s, 10, 64)
3377: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
34err = {tab = 0x0, data = 0x0}
35hist = {array = 0xc00005ae50, len = 7, cap = 7}
36i = 1
3781: hist = ensure(int(i), hist)
3882: hist[int(i)]++
3975: s := scanner.Text()
4076: i, err := strconv.ParseInt(s, 10, 64)
4177: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
42err = {tab = 0x0, data = 0x0}
43hist = {array = 0xc00005ae50, len = 7, cap = 7}
44i = 1
4581: hist = ensure(int(i), hist)
4682: hist[int(i)]++
4775: s := scanner.Text()
4876: i, err := strconv.ParseInt(s, 10, 64)
4977: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
50err = {tab = 0x0, data = 0x0}
51hist = {array = 0xc00005ae50, len = 7, cap = 7}
52i = 2
5381: hist = ensure(int(i), hist)
5482: hist[int(i)]++
5575: s := scanner.Text()
5676: i, err := strconv.ParseInt(s, 10, 64)
5777: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
58err = {tab = 0x0, data = 0x0}
59hist = {array = 0xc00005ae50, len = 7, cap = 7}
60i = 2
6181: hist = ensure(int(i), hist)
6282: hist[int(i)]++
6375: s := scanner.Text()
6476: i, err := strconv.ParseInt(s, 10, 64)
6577: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
66err = {tab = 0x0, data = 0x0}
67hist = {array = 0xc00005ae50, len = 7, cap = 7}
68i = 2
6981: hist = ensure(int(i), hist)
7082: hist[int(i)]++
7175: s := scanner.Text()
7276: i, err := strconv.ParseInt(s, 10, 64)
7377: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
74err = {tab = 0x0, data = 0x0}
75hist = {array = 0xc00005ae50, len = 7, cap = 7}
76i = 4
7781: hist = ensure(int(i), hist)
7882: hist[int(i)]++
7975: s := scanner.Text()
8076: i, err := strconv.ParseInt(s, 10, 64)
8177: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
82err = {tab = 0x0, data = 0x0}
83hist = {array = 0xc00005ae50, len = 7, cap = 7}
84i = 4
8581: hist = ensure(int(i), hist)
8682: hist[int(i)]++
8775: s := scanner.Text()
8876: i, err := strconv.ParseInt(s, 10, 64)
8977: if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
90err = {tab = 0x0, data = 0x0}
91hist = {array = 0xc00005ae50, len = 7, cap = 7}
92i = 5
9381: hist = ensure(int(i), hist)
9482: hist[int(i)]++
9586: for i, a := range hist {
9687: if a == 0 { //gdb-opt=(a,n,t)
97a = 0
98n = 0
99t = 0
10086: for i, a := range hist {
10187: if a == 0 { //gdb-opt=(a,n,t)
102a = 3
103n = 0
104t = 0
10592: 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)
10691: n += a
10790: t += i * a
10886: for i, a := range hist {
10987: if a == 0 { //gdb-opt=(a,n,t)
110a = 3
111n = 3
112t = 3
11392: 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)
11491: n += a
11590: t += i * a
11686: for i, a := range hist {
11787: if a == 0 { //gdb-opt=(a,n,t)
118a = 0
119n = 6
120t = 9
12186: for i, a := range hist {
12287: if a == 0 { //gdb-opt=(a,n,t)
123a = 2
124n = 6
125t = 9
12692: 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)
12791: n += a
12890: t += i * a
12986: for i, a := range hist {
13087: if a == 0 { //gdb-opt=(a,n,t)
131a = 1
132n = 8
133t = 17
13492: 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)
13591: n += a
13690: t += i * a
13786: for i, a := range hist {
13887: if a == 0 { //gdb-opt=(a,n,t)
139a = 0
140n = 9
141t = 22
14286: for i, a := range hist {
14399: }
View as plain text