// findlive returns the reachable blocks and live values in f. // The caller should call f.Cache.freeBoolSlice(live) when it is done with it. func findlive(f *Func) (reachable []bool, live []bool) { … } // ReachableBlocks returns the reachable blocks in f. func ReachableBlocks(f *Func) []bool { … } // liveValues returns the live values in f and a list of values that are eligible // to be statements in reversed data flow order. // The second result is used to help conserve statement boundaries for debugging. // reachable is a map from block ID to whether the block is reachable. // The caller should call f.Cache.freeBoolSlice(live) and f.Cache.freeValueSlice(liveOrderStmts). // when they are done with the return values. func liveValues(f *Func, reachable []bool) (live []bool, liveOrderStmts []*Value) { … } // deadcode removes dead code from f. func deadcode(f *Func) { … } // removeEdge removes the i'th outgoing edge from b (and // the corresponding incoming edge from b.Succs[i].b). // Note that this potentially reorders successors of b, so it // must be used very carefully. func (b *Block) removeEdge(i int) { … }