func fuseBlocks(f *Function, a *BasicBlock) bool {
	if len(a.Succs) != 1 {
		return false
	}
	b := a.Succs[0]
	if len(b.Preds) != 1 {
		return false
	}
	if b.hasPhi() {
		return false  
	}
	a.Instrs = append(a.Instrs[:len(a.Instrs)-1], b.Instrs...)
	for _, instr := range b.Instrs {
		instr.setBlock(a)
	}
	a.Succs = append(a.succs2[:0], b.Succs...)
	for _, c := range b.Succs {
		c.replacePred(b, a)
	}
	if debugBlockOpt {
		fmt.Fprintln(os.Stderr, "fuseBlocks", a, b)
	}
	f.Blocks[b.Index] = nil  
	return true
}
fuseBlocks attempts to apply the block fusion optimization to block
a, in which a->b becomes ab if len(a.Succs)==len(b.Preds)==1.
The result is true if the optimization was applied.
package ssa
import (
	"fmt"
	"os"
)
const debugBlockOpt = false
func markReachable(b *BasicBlock) {
	b.Index = -1
	for _, succ := range b.Succs {
		if succ.Index == 0 {
			markReachable(succ)
		}
	}
}
func deleteUnreachableBlocks(f *Function) {
	const white, black = 0, -1
	for _, b := range f.Blocks {
		b.Index = white
	}
	markReachable(f.Blocks[0])
	if f.Recover != nil {
		markReachable(f.Recover)
	}
	for i, b := range f.Blocks {
		if b.Index == white {
			for _, c := range b.Succs {
				if c.Index == black {
					c.removePred(b)  
				}
			}
			if debugBlockOpt {
				fmt.Fprintln(os.Stderr, "unreachable", b)
			}
			f.Blocks[i] = nil  
		}
	}
	f.removeNilBlocks()
}
func jumpThreading(f *Function, b *BasicBlock) bool {
	if b.Index == 0 {
		return false  
	}
	if b.Instrs == nil {
		return false
	}
	if _, ok := b.Instrs[0].(*Jump); !ok {
		return false  
	}
	c := b.Succs[0]
	if c == b {
		return false  
	}
	if c.hasPhi() {
		return false  
	}
	for j, a := range b.Preds {
		a.replaceSucc(b, c)
		if len(a.Succs) == 2 && a.Succs[0] == c && a.Succs[1] == c {
			jump := new(Jump)
			jump.setBlock(a)
			a.Instrs[len(a.Instrs)-1] = jump
			a.Succs = a.Succs[:1]
			c.removePred(b)
		} else {
			if j == 0 {
				c.replacePred(b, a)
			} else {
				c.Preds = append(c.Preds, a)
			}
		}
		if debugBlockOpt {
			fmt.Fprintln(os.Stderr, "jumpThreading", a, b, c)
		}
	}
	f.Blocks[b.Index] = nil  
	return true
}