graph

package
v0.0.33 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 22, 2022 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UnitGraph

type UnitGraph struct {
	Func        *ssa.Function
	UnitChain   []ssa.Instruction
	UnitToSuccs map[ssa.Instruction][]ssa.Instruction
	UnitToPreds map[ssa.Instruction][]ssa.Instruction
	Heads       []ssa.Instruction
	Tails       []ssa.Instruction
}

UnitGraph represents a graph based on ssa unit

func New

func New(f *ssa.Function) *UnitGraph

New creates a UnitGraph

func (*UnitGraph) GetPreds

func (g *UnitGraph) GetPreds(inst ssa.Instruction) []ssa.Instruction

GetPreds returns Preds of an instruction

func (*UnitGraph) GetSuccs

func (g *UnitGraph) GetSuccs(inst ssa.Instruction) []ssa.Instruction

GetSuccs returns Succs of an instruction

func (*UnitGraph) Size

func (g *UnitGraph) Size() int

Size returns length of the UnitChain

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL