go/pkg/mod/github.com/mmcloughlin/[email protected]/pass/cfg_test.go

func TestLabelTarget(t *testing.T) {}

func TestLabelTargetDuplicate(t *testing.T) {}

func TestLabelTargetEndsWithLabel(t *testing.T) {}

func TestLabelTargetConsecutiveLabels(t *testing.T) {}

func TestCFGSingleBasicBlock(t *testing.T) {}

func TestCFGCondBranch(t *testing.T) {}

func TestCFGUncondBranch(t *testing.T) {}

func TestCFGJumpForward(t *testing.T) {}

func TestCFGMultiReturn(t *testing.T) {}

func TestCFGShortLoop(t *testing.T) {}

func TestCFGUndefinedLabel(t *testing.T) {}

func TestCFGMissingLabel(t *testing.T) {}

// Terminal builds a terminal instruction.
func Terminal(opcode string) *ir.Instruction {}

// CondBranch builds a conditional branch instruction to the given label.
func CondBranch(opcode, lbl string) *ir.Instruction {}

// UncondBranch builds an unconditional branch instruction to the given label.
func UncondBranch(opcode, lbl string) *ir.Instruction {}

func ComputeCFG(t *testing.T, f *ir.Function) error {}

func AssertSuccessors(t *testing.T, f *ir.Function, expect map[string][]string) {}

func AssertPredecessors(t *testing.T, f *ir.Function, expect map[string][]string) {}

func AssertEqual(t *testing.T, what string, got, expect interface{}

// OpcodeSuccessorGraph builds a map from opcode name to successor opcode names.
func OpcodeSuccessorGraph(f *ir.Function) map[string][]string {}

// OpcodePredecessorGraph builds a map from opcode name to predecessor opcode names.
func OpcodePredecessorGraph(f *ir.Function) map[string][]string {}

// OpcodeGraph builds a map from opcode name to neighboring opcode names. Each list of neighbors is sorted.
func OpcodeGraph(f *ir.Function, neighbors func(*ir.Instruction) []*ir.Instruction) map[string][]string {}