Documentation ¶
Index ¶
- func PrevBuildVal() interface{}
- type Block
- func (blk *Block) AddPred(pred *Block)
- func (blk *Block) AddSucc(succ *Block)
- func (blk *Block) Control(i int) *Value
- func (blk *Block) FindPathTo(fn func(*Block) bool) []*Block
- func (blk *Block) Func() *Func
- func (blk *Block) ID() ID
- func (blk *Block) InsertControl(i int, val *Value)
- func (blk *Block) InsertCopy(i int, val *Value, r reg.Reg) *Value
- func (blk *Block) InsertInstr(i int, val *Value)
- func (blk *Block) Instr(i int) *Value
- func (blk *Block) IsAfter(other *Block) bool
- func (blk *Block) LongString() string
- func (blk *Block) NumControls() int
- func (blk *Block) NumInstrs() int
- func (blk *Block) NumPreds() int
- func (blk *Block) NumSuccs() int
- func (blk *Block) OpString() string
- func (blk *Block) Pred(i int) *Block
- func (blk *Block) RemoveControl(i int)
- func (blk *Block) RemoveInstr(val *Value) bool
- func (blk *Block) ReplaceControl(i int, val *Value)
- func (blk *Block) SetControls(ctrls []*Value)
- func (blk *Block) String() string
- func (blk *Block) Succ(i int) *Block
- func (blk *Block) SwapInstr(a *Value, b *Value)
- func (blk *Block) VisitSuccessors(fn func(*Block) bool)
- type Builder
- type Func
- func (fn *Func) BlockForID(id ID) *Block
- func (fn *Func) BlockIDCount() int
- func (fn *Func) Blocks() []*Block
- func (fn *Func) Const(typ types.Type, val constant.Value) *Value
- func (fn *Func) FixedReg(reg reg.Reg) *Value
- func (fn *Func) InsertBlock(i int, blk *Block)
- func (fn *Func) InstrIDCount() int
- func (fn *Func) IntConst(val int64) *Value
- func (fn *Func) LongString() string
- func (fn *Func) NewBlock(blk Block) *Block
- func (fn *Func) NewRegValue(op op.Op, typ types.Type, reg reg.Reg, args ...*Value) *Value
- func (fn *Func) NewValue(op op.Op, typ types.Type, args ...*Value) *Value
- func (fn *Func) NextBlockID() ID
- func (fn *Func) RemoveBlock(i int)
- func (fn *Func) String() string
- func (fn *Func) ValueForID(id ID) *Value
- type ID
- type Package
- type Value
- func (val *Value) Arg(i int) *Value
- func (val *Value) ArgIndex(arg *Value) int
- func (val *Value) ArgUse(i int) *Value
- func (val *Value) Block() *Block
- func (val *Value) BlockID() ID
- func (val *Value) BlockUse(i int) *Block
- func (val *Value) FindPathTo(fn func(*Value) bool) []*Value
- func (val *Value) FindUsageSuccessorPaths() [][]*Block
- func (val *Value) Func() *Func
- func (val *Value) ID() ID
- func (val *Value) IDString() string
- func (val *Value) Index() int
- func (val *Value) InsertArg(i int, arg *Value)
- func (val *Value) IsAfter(other *Value) bool
- func (val *Value) LongString() string
- func (val *Value) NeedsReg() bool
- func (val *Value) NumArgUses() int
- func (val *Value) NumArgs() int
- func (val *Value) NumBlockUses() int
- func (val *Value) NumUses() int
- func (val *Value) Remove()
- func (val *Value) RemoveArg(i int) *Value
- func (val *Value) ReplaceArg(i int, arg *Value)
- func (val *Value) ReplaceOtherUsesWith(other *Value) bool
- func (val *Value) ReplaceWith(other *Value) bool
- func (val *Value) ShortString() string
- func (val *Value) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrevBuildVal ¶
func PrevBuildVal() interface{}
Types ¶
type Block ¶
type Block struct { Op op.BlockOp Comment string Source string Idom *Block Dominees []*Block // contains filtered or unexported fields }
func (*Block) FindPathTo ¶
FindPathTo searches the successor graph for a specific block and returns the path to that block
func (*Block) InsertControl ¶
func (*Block) InsertInstr ¶
func (*Block) LongString ¶
func (*Block) NumControls ¶
func (*Block) RemoveControl ¶
func (*Block) RemoveInstr ¶
func (*Block) ReplaceControl ¶
func (*Block) SetControls ¶
func (*Block) VisitSuccessors ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func BuildAfter ¶
func BuildBefore ¶
func BuildReplacement ¶
type Func ¶
type Func struct { Name string Type *types.Signature Pkg *Package NumCalls int Referenced bool Consts []*Value Params []*Value Globals []*Value SpillSlots int ArgSlots int LocalSlots int // contains filtered or unexported fields }
func (*Func) BlockForID ¶
func (*Func) BlockIDCount ¶
func (*Func) InsertBlock ¶
func (*Func) InstrIDCount ¶
func (*Func) LongString ¶
func (*Func) NewRegValue ¶
func (*Func) NextBlockID ¶
func (*Func) RemoveBlock ¶
func (*Func) ValueForID ¶
type Package ¶
type Package struct { Funcs []*Func Globals []*Value Strings map[string]*Value NextStringNum int // contains filtered or unexported fields }
func (*Package) LongString ¶
func (*Package) LookupFunc ¶
type Value ¶
type Value struct { Reg reg.Reg Op op.Op Type types.Type Value constant.Value // contains filtered or unexported fields }
func (*Value) FindPathTo ¶
FindPathTo traverses the value graph until a certain value is found and returns the path
func (*Value) FindUsageSuccessorPaths ¶
FindUsageSuccessorPaths will search the successor block graph for all unique paths to each use of this value. These will be the paths through the CFG where the value is live.
func (*Value) LongString ¶
func (*Value) NumArgUses ¶
func (*Value) NumBlockUses ¶
func (*Value) ReplaceArg ¶
func (*Value) ReplaceOtherUsesWith ¶
func (*Value) ReplaceWith ¶
func (*Value) ShortString ¶
Click to show internal directories.
Click to hide internal directories.