// addEdge adds a control-flow graph edge from from to to. func addEdge(from, to *BasicBlock) { … } // Parent returns the function that contains block b. func (b *BasicBlock) Parent() *Function { … } // String returns a human-readable label of this block. // It is not guaranteed unique within the function. func (b *BasicBlock) String() string { … } // emit appends an instruction to the current basic block. // If the instruction defines a Value, it is returned. func (b *BasicBlock) emit(i Instruction) Value { … } // predIndex returns the i such that b.Preds[i] == c or panics if // there is none. func (b *BasicBlock) predIndex(c *BasicBlock) int { … } // hasPhi returns true if b.Instrs contains φ-nodes. func (b *BasicBlock) hasPhi() bool { … } // phis returns the prefix of b.Instrs containing all the block's φ-nodes. func (b *BasicBlock) phis() []Instruction { … } // replacePred replaces all occurrences of p in b's predecessor list with q. // Ordinarily there should be at most one. func (b *BasicBlock) replacePred(p, q *BasicBlock) { … } // replaceSucc replaces all occurrences of p in b's successor list with q. // Ordinarily there should be at most one. func (b *BasicBlock) replaceSucc(p, q *BasicBlock) { … } // removePred removes all occurrences of p in b's // predecessor list and φ-nodes. // Ordinarily there should be at most one. func (b *BasicBlock) removePred(p *BasicBlock) { … }