ssa

package
v0.1.15 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	K_sys  = 0
	K_zero = 1
	K_temp = 2
	K_arch = 3
	K_norm = 4
)
View Source
const (
	N_size = _M_name + 1
)

Variables

View Source
var (
	MinInt65 = Int65{0, 1}
	MaxInt65 = Int65{math.MaxUint64, 0}
)
View Source
var ArchRegIds = map[x86_64.Register64]uint64{
	x86_64.RAX: 0,
	x86_64.RCX: 1,
	x86_64.RDX: 2,
	x86_64.RBX: 3,
	x86_64.RSP: 4,
	x86_64.RBP: 5,
	x86_64.RSI: 6,
	x86_64.RDI: 7,
	x86_64.R8:  8,
	x86_64.R9:  9,
	x86_64.R10: 10,
	x86_64.R11: 11,
	x86_64.R12: 12,
	x86_64.R13: 13,
	x86_64.R14: 14,
	x86_64.R15: 15,
}
View Source
var ArchRegNames = map[x86_64.Register64]string{
	x86_64.RAX: "rax",
	x86_64.RCX: "rcx",
	x86_64.RDX: "rdx",
	x86_64.RBX: "rbx",
	x86_64.RSP: "rsp",
	x86_64.RBP: "rbp",
	x86_64.RSI: "rsi",
	x86_64.RDI: "rdi",
	x86_64.R8:  "r8",
	x86_64.R9:  "r9",
	x86_64.R10: "r10",
	x86_64.R11: "r11",
	x86_64.R12: "r12",
	x86_64.R13: "r13",
	x86_64.R14: "r14",
	x86_64.R15: "r15",
}
View Source
var ArchRegReserved = map[x86_64.Register64]bool{
	x86_64.RSP: true,
	x86_64.RBP: true,
}
View Source
var Passes = [...]PassDescriptor{
	{Name: "Early Constant Propagation", Pass: new(ConstProp)},
	{Name: "Early Reduction", Pass: new(Reduce)},
	{Name: "Branch Elimination", Pass: new(BranchElim)},
	{Name: "Return Spreading", Pass: new(ReturnSpread)},
	{Name: "Value Reordering", Pass: new(Reorder)},
	{Name: "Late Constant Propagation", Pass: new(ConstProp)},
	{Name: "Late Reduction", Pass: new(Reduce)},
	{Name: "Machine Dependent Lowering", Pass: new(Lowering)},
	{Name: "Zero Register Substitution", Pass: new(ZeroReg)},
	{Name: "Write Barrier Insertion", Pass: new(WriteBarrier)},
	{Name: "ABI-Specific Lowering", Pass: new(ABILowering)},
	{Name: "Instruction Fusion", Pass: new(Fusion)},
	{Name: "Instruction Compaction", Pass: new(Compaction)},
	{Name: "Block Merging", Pass: new(BlockMerge)},
	{Name: "Critical Edge Splitting", Pass: new(SplitCritical)},
	{Name: "Phi Propagation", Pass: new(PhiProp)},
	{Name: "Operand Allocation", Pass: new(OperandAlloc)},
	{Name: "Constant Rematerialize", Pass: new(Rematerialize)},
	{Name: "Pre-allocation TDCE", Pass: new(TDCE)},
	{Name: "Register Allocation", Pass: new(RegAlloc)},
	{Name: "Stack Liveness Analysis", Pass: new(StackLiveness)},
	{Name: "Function Layout", Pass: new(Layout)},
}
View Source
var Reductions = []PassDescriptor{
	{Name: "Common Sub-expression Elimination", Pass: new(CSE)},
	{Name: "Phi Elimination", Pass: new(PhiElim)},
	{Name: "Copy Elimination", Pass: new(CopyElim)},
	{Name: "Trivial Dead Code Elimination", Pass: new(TDCE)},
}

Functions

func IrArchTryIntoCopy added in v0.1.2

func IrArchTryIntoCopy(v IrNode) (Reg, Reg, bool)

func IrTryIntoCopy added in v0.1.4

func IrTryIntoCopy(v IrNode) (Reg, Reg, bool)

Types

type ABILowering added in v0.1.1

type ABILowering struct{}

ABILowering lowers ABI-specific instructions to machine specific instructions.

func (ABILowering) Apply added in v0.1.1

func (self ABILowering) Apply(cfg *CFG)

type BasicBlock

type BasicBlock struct {
	Id   int
	Phi  []*IrPhi
	Ins  []IrNode
	Pred []*BasicBlock
	Term IrTerminator
}

func (*BasicBlock) String added in v0.1.4

func (self *BasicBlock) String() string

type BasicBlockIter added in v0.1.2

type BasicBlockIter struct {
	// contains filtered or unexported fields
}

func (*BasicBlockIter) Block added in v0.1.2

func (self *BasicBlockIter) Block() *BasicBlock

func (*BasicBlockIter) ForEach added in v0.1.2

func (self *BasicBlockIter) ForEach(action func(bb *BasicBlock))

func (*BasicBlockIter) Next added in v0.1.2

func (self *BasicBlockIter) Next() bool

func (*BasicBlockIter) Reversed added in v0.1.2

func (self *BasicBlockIter) Reversed() []*BasicBlock

type BlockMerge

type BlockMerge struct{}

BlockMerge merges redundant intermediate blocks (blocks with a single outgoing edge which goes to another block with a single incoming edge).

func (BlockMerge) Apply

func (BlockMerge) Apply(cfg *CFG)

type BranchElim

type BranchElim struct{}

BranchElim removes branches that can be proved unreachable.

func (BranchElim) Apply

func (self BranchElim) Apply(cfg *CFG)

type CFG

type CFG struct {
	Func              FuncData
	Root              *BasicBlock
	Depth             map[int]int
	Layout            *abi.FunctionLayout
	DominatedBy       map[int]*BasicBlock
	DominatorOf       map[int][]*BasicBlock
	DominanceFrontier map[int][]*BasicBlock
	// contains filtered or unexported fields
}

func Compile

func Compile(p hir.Program, fn interface{}) (cfg *CFG)

func (*CFG) CreateBlock added in v0.1.1

func (self *CFG) CreateBlock() (r *BasicBlock)

func (*CFG) CreateRegister added in v0.1.1

func (self *CFG) CreateRegister(ptr bool) Reg

func (*CFG) CreateUnreachable added in v0.1.1

func (self *CFG) CreateUnreachable(bb *BasicBlock) (ret *BasicBlock)

func (*CFG) MaxBlock

func (self *CFG) MaxBlock() int

func (*CFG) PostOrder

func (self *CFG) PostOrder() *BasicBlockIter

func (*CFG) Rebuild

func (self *CFG) Rebuild()

type CSE

type CSE struct{}

CSE performs the Common Sub-expression Elimintation optimization.

func (CSE) Apply

func (self CSE) Apply(cfg *CFG)

type Compaction added in v0.1.1

type Compaction struct{}

Compaction is like Fusion, but it performs the reverse action to reduce redundant operations.

func (Compaction) Apply added in v0.1.1

func (self Compaction) Apply(cfg *CFG)

type ConstProp

type ConstProp struct{}

ConstProp propagates constant through the expression tree.

func (ConstProp) Apply

func (self ConstProp) Apply(cfg *CFG)

type Constness added in v0.1.1

type Constness uint8
const (
	Const Constness = iota
	Volatile
)

func (Constness) String added in v0.1.1

func (self Constness) String() string

type CopyElim

type CopyElim struct{}

CopyElim removes unnessecery register copies.

func (CopyElim) Apply

func (CopyElim) Apply(cfg *CFG)

type FuncData added in v0.1.4

type FuncData struct {
	Code     []byte
	Layout   *FuncLayout
	Liveness map[Pos]SlotSet
	StackMap map[uintptr]*rt.StackMap
}

type FuncLayout added in v0.1.4

type FuncLayout struct {
	Ins   []IrNode
	Start map[int]int
	Block map[int]*BasicBlock
}

func (*FuncLayout) String added in v0.1.4

func (self *FuncLayout) String() string

type Fusion added in v0.1.1

type Fusion struct{}

Fusion fuses simple instructions into more complex one, to reduce the instruction count.

func (Fusion) Apply added in v0.1.1

func (self Fusion) Apply(cfg *CFG)

type Int65

type Int65 struct {
	// contains filtered or unexported fields
}

func Int65i

func Int65i(v int64) Int65

func (Int65) Compare

func (self Int65) Compare(other Int65) int

func (Int65) CompareZero

func (self Int65) CompareZero() int

func (Int65) OneLess

func (self Int65) OneLess() (r Int65)

func (Int65) OneMore

func (self Int65) OneMore() (r Int65)

func (Int65) String

func (self Int65) String() string

type IrAMD64_BSWAP

type IrAMD64_BSWAP struct {
	R Reg
	V Reg
	N uint8
}

func (*IrAMD64_BSWAP) Clone added in v0.1.1

func (self *IrAMD64_BSWAP) Clone() IrNode

func (*IrAMD64_BSWAP) Definitions added in v0.1.1

func (self *IrAMD64_BSWAP) Definitions() []*Reg

func (*IrAMD64_BSWAP) String

func (self *IrAMD64_BSWAP) String() string

func (*IrAMD64_BSWAP) Usages

func (self *IrAMD64_BSWAP) Usages() []*Reg

type IrAMD64_BTSQ_ri added in v0.1.1

type IrAMD64_BTSQ_ri struct {
	T Reg
	S Reg
	X Reg
	Y uint8
}

func (*IrAMD64_BTSQ_ri) Clone added in v0.1.1

func (self *IrAMD64_BTSQ_ri) Clone() IrNode

func (*IrAMD64_BTSQ_ri) Definitions added in v0.1.1

func (self *IrAMD64_BTSQ_ri) Definitions() []*Reg

func (*IrAMD64_BTSQ_ri) String added in v0.1.1

func (self *IrAMD64_BTSQ_ri) String() string

func (*IrAMD64_BTSQ_ri) Usages added in v0.1.1

func (self *IrAMD64_BTSQ_ri) Usages() []*Reg

type IrAMD64_BTSQ_rr added in v0.1.1

type IrAMD64_BTSQ_rr struct {
	T Reg
	S Reg
	X Reg
	Y Reg
}

func (*IrAMD64_BTSQ_rr) Clone added in v0.1.1

func (self *IrAMD64_BTSQ_rr) Clone() IrNode

func (*IrAMD64_BTSQ_rr) Definitions added in v0.1.1

func (self *IrAMD64_BTSQ_rr) Definitions() []*Reg

func (*IrAMD64_BTSQ_rr) String added in v0.1.1

func (self *IrAMD64_BTSQ_rr) String() string

func (*IrAMD64_BTSQ_rr) Usages added in v0.1.1

func (self *IrAMD64_BTSQ_rr) Usages() []*Reg

type IrAMD64_BinOp added in v0.1.1

type IrAMD64_BinOp uint8
const (
	IrAMD64_BinAdd IrAMD64_BinOp = iota
	IrAMD64_BinSub
	IrAMD64_BinMul
	IrAMD64_BinAnd
	IrAMD64_BinOr
	IrAMD64_BinXor
	IrAMD64_BinShr
)

func (IrAMD64_BinOp) IsAdditive added in v0.1.4

func (self IrAMD64_BinOp) IsAdditive() bool

func (IrAMD64_BinOp) ScaleFactor added in v0.1.4

func (self IrAMD64_BinOp) ScaleFactor() int32

func (IrAMD64_BinOp) String added in v0.1.1

func (self IrAMD64_BinOp) String() string

type IrAMD64_BinOp_ri added in v0.1.1

type IrAMD64_BinOp_ri struct {
	R  Reg
	X  Reg
	Y  int32
	Op IrAMD64_BinOp
}

func (*IrAMD64_BinOp_ri) Clone added in v0.1.1

func (self *IrAMD64_BinOp_ri) Clone() IrNode

func (*IrAMD64_BinOp_ri) Definitions added in v0.1.1

func (self *IrAMD64_BinOp_ri) Definitions() []*Reg

func (*IrAMD64_BinOp_ri) String added in v0.1.1

func (self *IrAMD64_BinOp_ri) String() string

func (*IrAMD64_BinOp_ri) Usages added in v0.1.1

func (self *IrAMD64_BinOp_ri) Usages() []*Reg

type IrAMD64_BinOp_rm added in v0.1.2

type IrAMD64_BinOp_rm struct {
	R  Reg
	X  Reg
	Y  Mem
	Op IrAMD64_BinOp
}

func (*IrAMD64_BinOp_rm) Clone added in v0.1.2

func (self *IrAMD64_BinOp_rm) Clone() IrNode

func (*IrAMD64_BinOp_rm) Definitions added in v0.1.2

func (self *IrAMD64_BinOp_rm) Definitions() []*Reg

func (*IrAMD64_BinOp_rm) MemOp added in v0.1.4

func (self *IrAMD64_BinOp_rm) MemOp() *Mem

func (*IrAMD64_BinOp_rm) String added in v0.1.2

func (self *IrAMD64_BinOp_rm) String() string

func (*IrAMD64_BinOp_rm) Usages added in v0.1.2

func (self *IrAMD64_BinOp_rm) Usages() []*Reg

type IrAMD64_BinOp_rr added in v0.1.1

type IrAMD64_BinOp_rr struct {
	R  Reg
	X  Reg
	Y  Reg
	Op IrAMD64_BinOp
}

func (*IrAMD64_BinOp_rr) Clone added in v0.1.1

func (self *IrAMD64_BinOp_rr) Clone() IrNode

func (*IrAMD64_BinOp_rr) Definitions added in v0.1.1

func (self *IrAMD64_BinOp_rr) Definitions() []*Reg

func (*IrAMD64_BinOp_rr) String added in v0.1.1

func (self *IrAMD64_BinOp_rr) String() string

func (*IrAMD64_BinOp_rr) Usages added in v0.1.1

func (self *IrAMD64_BinOp_rr) Usages() []*Reg

type IrAMD64_CALL_gcwb added in v0.1.1

type IrAMD64_CALL_gcwb struct {
	R  Reg
	M  Reg
	Fn unsafe.Pointer
}

func (*IrAMD64_CALL_gcwb) Clone added in v0.1.1

func (self *IrAMD64_CALL_gcwb) Clone() IrNode

func (*IrAMD64_CALL_gcwb) String added in v0.1.1

func (self *IrAMD64_CALL_gcwb) String() string

func (*IrAMD64_CALL_gcwb) Usages added in v0.1.1

func (self *IrAMD64_CALL_gcwb) Usages() []*Reg

type IrAMD64_CALL_mem added in v0.1.1

type IrAMD64_CALL_mem struct {
	Fn   Mem
	In   []Reg
	Out  []Reg
	Clob []Reg
}

func (*IrAMD64_CALL_mem) Clone added in v0.1.1

func (self *IrAMD64_CALL_mem) Clone() IrNode

func (*IrAMD64_CALL_mem) Definitions added in v0.1.1

func (self *IrAMD64_CALL_mem) Definitions() []*Reg

func (*IrAMD64_CALL_mem) MemOp added in v0.1.4

func (self *IrAMD64_CALL_mem) MemOp() *Mem

func (*IrAMD64_CALL_mem) String added in v0.1.1

func (self *IrAMD64_CALL_mem) String() string

func (*IrAMD64_CALL_mem) Usages added in v0.1.1

func (self *IrAMD64_CALL_mem) Usages() []*Reg

type IrAMD64_CALL_reg added in v0.1.1

type IrAMD64_CALL_reg struct {
	Fn   Reg
	In   []Reg
	Out  []Reg
	Clob []Reg
}

func (*IrAMD64_CALL_reg) Clone added in v0.1.1

func (self *IrAMD64_CALL_reg) Clone() IrNode

func (*IrAMD64_CALL_reg) Definitions added in v0.1.1

func (self *IrAMD64_CALL_reg) Definitions() []*Reg

func (*IrAMD64_CALL_reg) String added in v0.1.1

func (self *IrAMD64_CALL_reg) String() string

func (*IrAMD64_CALL_reg) Usages added in v0.1.1

func (self *IrAMD64_CALL_reg) Usages() []*Reg

type IrAMD64_CMPQ_im added in v0.1.1

type IrAMD64_CMPQ_im struct {
	R  Reg
	X  int32
	Y  Mem
	N  uint8
	Op IrAMD64_CmpOp
}

func (*IrAMD64_CMPQ_im) Clone added in v0.1.1

func (self *IrAMD64_CMPQ_im) Clone() IrNode

func (*IrAMD64_CMPQ_im) Definitions added in v0.1.1

func (self *IrAMD64_CMPQ_im) Definitions() []*Reg

func (*IrAMD64_CMPQ_im) MemOp added in v0.1.4

func (self *IrAMD64_CMPQ_im) MemOp() *Mem

func (*IrAMD64_CMPQ_im) String added in v0.1.1

func (self *IrAMD64_CMPQ_im) String() string

func (*IrAMD64_CMPQ_im) Usages added in v0.1.1

func (self *IrAMD64_CMPQ_im) Usages() []*Reg

type IrAMD64_CMPQ_ir added in v0.1.1

type IrAMD64_CMPQ_ir struct {
	R  Reg
	X  int32
	Y  Reg
	Op IrAMD64_CmpOp
}

func (*IrAMD64_CMPQ_ir) Clone added in v0.1.1

func (self *IrAMD64_CMPQ_ir) Clone() IrNode

func (*IrAMD64_CMPQ_ir) Definitions added in v0.1.1

func (self *IrAMD64_CMPQ_ir) Definitions() []*Reg

func (*IrAMD64_CMPQ_ir) String added in v0.1.1

func (self *IrAMD64_CMPQ_ir) String() string

func (*IrAMD64_CMPQ_ir) Usages added in v0.1.1

func (self *IrAMD64_CMPQ_ir) Usages() []*Reg

type IrAMD64_CMPQ_mi added in v0.1.1

type IrAMD64_CMPQ_mi struct {
	R  Reg
	X  Mem
	Y  int32
	N  uint8
	Op IrAMD64_CmpOp
}

func (*IrAMD64_CMPQ_mi) Clone added in v0.1.1

func (self *IrAMD64_CMPQ_mi) Clone() IrNode

func (*IrAMD64_CMPQ_mi) Definitions added in v0.1.1

func (self *IrAMD64_CMPQ_mi) Definitions() []*Reg

func (*IrAMD64_CMPQ_mi) MemOp added in v0.1.4

func (self *IrAMD64_CMPQ_mi) MemOp() *Mem

func (*IrAMD64_CMPQ_mi) String added in v0.1.1

func (self *IrAMD64_CMPQ_mi) String() string

func (*IrAMD64_CMPQ_mi) Usages added in v0.1.1

func (self *IrAMD64_CMPQ_mi) Usages() []*Reg

type IrAMD64_CMPQ_mp added in v0.1.1

type IrAMD64_CMPQ_mp struct {
	R  Reg
	X  Mem
	Y  unsafe.Pointer
	Op IrAMD64_CmpOp
}

func (*IrAMD64_CMPQ_mp) Clone added in v0.1.1

func (self *IrAMD64_CMPQ_mp) Clone() IrNode

func (*IrAMD64_CMPQ_mp) Definitions added in v0.1.1

func (self *IrAMD64_CMPQ_mp) Definitions() []*Reg

func (*IrAMD64_CMPQ_mp) MemOp added in v0.1.4

func (self *IrAMD64_CMPQ_mp) MemOp() *Mem

func (*IrAMD64_CMPQ_mp) String added in v0.1.1

func (self *IrAMD64_CMPQ_mp) String() string

func (*IrAMD64_CMPQ_mp) Usages added in v0.1.1

func (self *IrAMD64_CMPQ_mp) Usages() []*Reg

type IrAMD64_CMPQ_mr added in v0.1.1

type IrAMD64_CMPQ_mr struct {
	R  Reg
	X  Mem
	Y  Reg
	N  uint8
	Op IrAMD64_CmpOp
}

func (*IrAMD64_CMPQ_mr) Clone added in v0.1.1

func (self *IrAMD64_CMPQ_mr) Clone() IrNode

func (*IrAMD64_CMPQ_mr) Definitions added in v0.1.1

func (self *IrAMD64_CMPQ_mr) Definitions() []*Reg

func (*IrAMD64_CMPQ_mr) MemOp added in v0.1.4

func (self *IrAMD64_CMPQ_mr) MemOp() *Mem

func (*IrAMD64_CMPQ_mr) String added in v0.1.1

func (self *IrAMD64_CMPQ_mr) String() string

func (*IrAMD64_CMPQ_mr) Usages added in v0.1.1

func (self *IrAMD64_CMPQ_mr) Usages() []*Reg

type IrAMD64_CMPQ_pm added in v0.1.1

type IrAMD64_CMPQ_pm struct {
	R  Reg
	X  unsafe.Pointer
	Y  Mem
	Op IrAMD64_CmpOp
}

func (*IrAMD64_CMPQ_pm) Clone added in v0.1.1

func (self *IrAMD64_CMPQ_pm) Clone() IrNode

func (*IrAMD64_CMPQ_pm) Definitions added in v0.1.1

func (self *IrAMD64_CMPQ_pm) Definitions() []*Reg

func (*IrAMD64_CMPQ_pm) MemOp added in v0.1.4

func (self *IrAMD64_CMPQ_pm) MemOp() *Mem

func (*IrAMD64_CMPQ_pm) String added in v0.1.1

func (self *IrAMD64_CMPQ_pm) String() string

func (*IrAMD64_CMPQ_pm) Usages added in v0.1.1

func (self *IrAMD64_CMPQ_pm) Usages() []*Reg

type IrAMD64_CMPQ_pr added in v0.1.1

type IrAMD64_CMPQ_pr struct {
	R  Reg
	X  unsafe.Pointer
	Y  Reg
	Op IrAMD64_CmpOp
}

func (*IrAMD64_CMPQ_pr) Clone added in v0.1.1

func (self *IrAMD64_CMPQ_pr) Clone() IrNode

func (*IrAMD64_CMPQ_pr) Definitions added in v0.1.1

func (self *IrAMD64_CMPQ_pr) Definitions() []*Reg

func (*IrAMD64_CMPQ_pr) String added in v0.1.1

func (self *IrAMD64_CMPQ_pr) String() string

func (*IrAMD64_CMPQ_pr) Usages added in v0.1.1

func (self *IrAMD64_CMPQ_pr) Usages() []*Reg

type IrAMD64_CMPQ_ri added in v0.1.1

type IrAMD64_CMPQ_ri struct {
	R  Reg
	X  Reg
	Y  int32
	Op IrAMD64_CmpOp
}

func (*IrAMD64_CMPQ_ri) Clone added in v0.1.1

func (self *IrAMD64_CMPQ_ri) Clone() IrNode

func (*IrAMD64_CMPQ_ri) Definitions added in v0.1.1

func (self *IrAMD64_CMPQ_ri) Definitions() []*Reg

func (*IrAMD64_CMPQ_ri) String added in v0.1.1

func (self *IrAMD64_CMPQ_ri) String() string

func (*IrAMD64_CMPQ_ri) Usages added in v0.1.1

func (self *IrAMD64_CMPQ_ri) Usages() []*Reg

type IrAMD64_CMPQ_rm added in v0.1.1

type IrAMD64_CMPQ_rm struct {
	R  Reg
	X  Reg
	Y  Mem
	N  uint8
	Op IrAMD64_CmpOp
}

func (*IrAMD64_CMPQ_rm) Clone added in v0.1.1

func (self *IrAMD64_CMPQ_rm) Clone() IrNode

func (*IrAMD64_CMPQ_rm) Definitions added in v0.1.1

func (self *IrAMD64_CMPQ_rm) Definitions() []*Reg

func (*IrAMD64_CMPQ_rm) MemOp added in v0.1.4

func (self *IrAMD64_CMPQ_rm) MemOp() *Mem

func (*IrAMD64_CMPQ_rm) String added in v0.1.1

func (self *IrAMD64_CMPQ_rm) String() string

func (*IrAMD64_CMPQ_rm) Usages added in v0.1.1

func (self *IrAMD64_CMPQ_rm) Usages() []*Reg

type IrAMD64_CMPQ_rp added in v0.1.1

type IrAMD64_CMPQ_rp struct {
	R  Reg
	X  Reg
	Y  unsafe.Pointer
	Op IrAMD64_CmpOp
}

func (*IrAMD64_CMPQ_rp) Clone added in v0.1.1

func (self *IrAMD64_CMPQ_rp) Clone() IrNode

func (*IrAMD64_CMPQ_rp) Definitions added in v0.1.1

func (self *IrAMD64_CMPQ_rp) Definitions() []*Reg

func (*IrAMD64_CMPQ_rp) String added in v0.1.1

func (self *IrAMD64_CMPQ_rp) String() string

func (*IrAMD64_CMPQ_rp) Usages added in v0.1.1

func (self *IrAMD64_CMPQ_rp) Usages() []*Reg

type IrAMD64_CMPQ_rr added in v0.1.1

type IrAMD64_CMPQ_rr struct {
	R  Reg
	X  Reg
	Y  Reg
	Op IrAMD64_CmpOp
}

func (*IrAMD64_CMPQ_rr) Clone added in v0.1.1

func (self *IrAMD64_CMPQ_rr) Clone() IrNode

func (*IrAMD64_CMPQ_rr) Definitions added in v0.1.1

func (self *IrAMD64_CMPQ_rr) Definitions() []*Reg

func (*IrAMD64_CMPQ_rr) String added in v0.1.1

func (self *IrAMD64_CMPQ_rr) String() string

func (*IrAMD64_CMPQ_rr) Usages added in v0.1.1

func (self *IrAMD64_CMPQ_rr) Usages() []*Reg

type IrAMD64_CmpOp added in v0.1.1

type IrAMD64_CmpOp uint8
const (
	IrAMD64_CmpEq IrAMD64_CmpOp = iota
	IrAMD64_CmpNe
	IrAMD64_CmpLt
	IrAMD64_CmpGe
	IrAMD64_CmpLtu
	IrAMD64_CmpGeu
)

func (IrAMD64_CmpOp) Negated added in v0.1.1

func (self IrAMD64_CmpOp) Negated() IrAMD64_CmpOp

func (IrAMD64_CmpOp) String added in v0.1.1

func (self IrAMD64_CmpOp) String() string

type IrAMD64_INT

type IrAMD64_INT struct {
	I uint8
}

func (*IrAMD64_INT) Clone added in v0.1.1

func (self *IrAMD64_INT) Clone() IrNode

func (*IrAMD64_INT) String

func (self *IrAMD64_INT) String() string

type IrAMD64_JMP

type IrAMD64_JMP struct {
	To *IrBranch
}

func (*IrAMD64_JMP) Clone added in v0.1.1

func (self *IrAMD64_JMP) Clone() IrNode

func (*IrAMD64_JMP) String

func (self *IrAMD64_JMP) String() string

func (*IrAMD64_JMP) Successors

func (self *IrAMD64_JMP) Successors() IrSuccessors

type IrAMD64_JNC added in v0.1.1

type IrAMD64_JNC struct {
	To *IrBranch
	Ln *IrBranch
}

func (*IrAMD64_JNC) Clone added in v0.1.1

func (self *IrAMD64_JNC) Clone() IrNode

func (*IrAMD64_JNC) String added in v0.1.1

func (self *IrAMD64_JNC) String() string

func (*IrAMD64_JNC) Successors added in v0.1.1

func (self *IrAMD64_JNC) Successors() IrSuccessors

type IrAMD64_Jcc_im added in v0.1.1

type IrAMD64_Jcc_im struct {
	X  int32
	Y  Mem
	N  uint8
	To *IrBranch
	Ln *IrBranch
	Op IrAMD64_CmpOp
}

func (*IrAMD64_Jcc_im) Clone added in v0.1.1

func (self *IrAMD64_Jcc_im) Clone() IrNode

func (*IrAMD64_Jcc_im) MemOp added in v0.1.4

func (self *IrAMD64_Jcc_im) MemOp() *Mem

func (*IrAMD64_Jcc_im) String added in v0.1.1

func (self *IrAMD64_Jcc_im) String() string

func (*IrAMD64_Jcc_im) Successors added in v0.1.1

func (self *IrAMD64_Jcc_im) Successors() IrSuccessors

func (*IrAMD64_Jcc_im) Usages added in v0.1.1

func (self *IrAMD64_Jcc_im) Usages() []*Reg

type IrAMD64_Jcc_ir added in v0.1.1

type IrAMD64_Jcc_ir struct {
	X  int32
	Y  Reg
	To *IrBranch
	Ln *IrBranch
	Op IrAMD64_CmpOp
}

func (*IrAMD64_Jcc_ir) Clone added in v0.1.1

func (self *IrAMD64_Jcc_ir) Clone() IrNode

func (*IrAMD64_Jcc_ir) String added in v0.1.1

func (self *IrAMD64_Jcc_ir) String() string

func (*IrAMD64_Jcc_ir) Successors added in v0.1.1

func (self *IrAMD64_Jcc_ir) Successors() IrSuccessors

func (*IrAMD64_Jcc_ir) Usages added in v0.1.1

func (self *IrAMD64_Jcc_ir) Usages() []*Reg

type IrAMD64_Jcc_mi added in v0.1.1

type IrAMD64_Jcc_mi struct {
	X  Mem
	Y  int32
	N  uint8
	To *IrBranch
	Ln *IrBranch
	Op IrAMD64_CmpOp
}

func (*IrAMD64_Jcc_mi) Clone added in v0.1.1

func (self *IrAMD64_Jcc_mi) Clone() IrNode

func (*IrAMD64_Jcc_mi) MemOp added in v0.1.4

func (self *IrAMD64_Jcc_mi) MemOp() *Mem

func (*IrAMD64_Jcc_mi) String added in v0.1.1

func (self *IrAMD64_Jcc_mi) String() string

func (*IrAMD64_Jcc_mi) Successors added in v0.1.1

func (self *IrAMD64_Jcc_mi) Successors() IrSuccessors

func (*IrAMD64_Jcc_mi) Usages added in v0.1.1

func (self *IrAMD64_Jcc_mi) Usages() []*Reg

type IrAMD64_Jcc_mp added in v0.1.1

type IrAMD64_Jcc_mp struct {
	X  Mem
	Y  unsafe.Pointer
	To *IrBranch
	Ln *IrBranch
	Op IrAMD64_CmpOp
}

func (*IrAMD64_Jcc_mp) Clone added in v0.1.1

func (self *IrAMD64_Jcc_mp) Clone() IrNode

func (*IrAMD64_Jcc_mp) MemOp added in v0.1.4

func (self *IrAMD64_Jcc_mp) MemOp() *Mem

func (*IrAMD64_Jcc_mp) String added in v0.1.1

func (self *IrAMD64_Jcc_mp) String() string

func (*IrAMD64_Jcc_mp) Successors added in v0.1.1

func (self *IrAMD64_Jcc_mp) Successors() IrSuccessors

func (*IrAMD64_Jcc_mp) Usages added in v0.1.1

func (self *IrAMD64_Jcc_mp) Usages() []*Reg

type IrAMD64_Jcc_mr added in v0.1.1

type IrAMD64_Jcc_mr struct {
	X  Mem
	Y  Reg
	N  uint8
	To *IrBranch
	Ln *IrBranch
	Op IrAMD64_CmpOp
}

func (*IrAMD64_Jcc_mr) Clone added in v0.1.1

func (self *IrAMD64_Jcc_mr) Clone() IrNode

func (*IrAMD64_Jcc_mr) MemOp added in v0.1.4

func (self *IrAMD64_Jcc_mr) MemOp() *Mem

func (*IrAMD64_Jcc_mr) String added in v0.1.1

func (self *IrAMD64_Jcc_mr) String() string

func (*IrAMD64_Jcc_mr) Successors added in v0.1.1

func (self *IrAMD64_Jcc_mr) Successors() IrSuccessors

func (*IrAMD64_Jcc_mr) Usages added in v0.1.1

func (self *IrAMD64_Jcc_mr) Usages() []*Reg

type IrAMD64_Jcc_pm added in v0.1.1

type IrAMD64_Jcc_pm struct {
	X  unsafe.Pointer
	Y  Mem
	To *IrBranch
	Ln *IrBranch
	Op IrAMD64_CmpOp
}

func (*IrAMD64_Jcc_pm) Clone added in v0.1.1

func (self *IrAMD64_Jcc_pm) Clone() IrNode

func (*IrAMD64_Jcc_pm) MemOp added in v0.1.4

func (self *IrAMD64_Jcc_pm) MemOp() *Mem

func (*IrAMD64_Jcc_pm) String added in v0.1.1

func (self *IrAMD64_Jcc_pm) String() string

func (*IrAMD64_Jcc_pm) Successors added in v0.1.1

func (self *IrAMD64_Jcc_pm) Successors() IrSuccessors

func (*IrAMD64_Jcc_pm) Usages added in v0.1.1

func (self *IrAMD64_Jcc_pm) Usages() []*Reg

type IrAMD64_Jcc_pr added in v0.1.1

type IrAMD64_Jcc_pr struct {
	X  unsafe.Pointer
	Y  Reg
	To *IrBranch
	Ln *IrBranch
	Op IrAMD64_CmpOp
}

func (*IrAMD64_Jcc_pr) Clone added in v0.1.1

func (self *IrAMD64_Jcc_pr) Clone() IrNode

func (*IrAMD64_Jcc_pr) String added in v0.1.1

func (self *IrAMD64_Jcc_pr) String() string

func (*IrAMD64_Jcc_pr) Successors added in v0.1.1

func (self *IrAMD64_Jcc_pr) Successors() IrSuccessors

func (*IrAMD64_Jcc_pr) Usages added in v0.1.1

func (self *IrAMD64_Jcc_pr) Usages() []*Reg

type IrAMD64_Jcc_ri added in v0.1.1

type IrAMD64_Jcc_ri struct {
	X  Reg
	Y  int32
	To *IrBranch
	Ln *IrBranch
	Op IrAMD64_CmpOp
}

func (*IrAMD64_Jcc_ri) Clone added in v0.1.1

func (self *IrAMD64_Jcc_ri) Clone() IrNode

func (*IrAMD64_Jcc_ri) String added in v0.1.1

func (self *IrAMD64_Jcc_ri) String() string

func (*IrAMD64_Jcc_ri) Successors added in v0.1.1

func (self *IrAMD64_Jcc_ri) Successors() IrSuccessors

func (*IrAMD64_Jcc_ri) Usages added in v0.1.1

func (self *IrAMD64_Jcc_ri) Usages() []*Reg

type IrAMD64_Jcc_rm added in v0.1.1

type IrAMD64_Jcc_rm struct {
	X  Reg
	Y  Mem
	N  uint8
	To *IrBranch
	Ln *IrBranch
	Op IrAMD64_CmpOp
}

func (*IrAMD64_Jcc_rm) Clone added in v0.1.1

func (self *IrAMD64_Jcc_rm) Clone() IrNode

func (*IrAMD64_Jcc_rm) MemOp added in v0.1.4

func (self *IrAMD64_Jcc_rm) MemOp() *Mem

func (*IrAMD64_Jcc_rm) String added in v0.1.1

func (self *IrAMD64_Jcc_rm) String() string

func (*IrAMD64_Jcc_rm) Successors added in v0.1.1

func (self *IrAMD64_Jcc_rm) Successors() IrSuccessors

func (*IrAMD64_Jcc_rm) Usages added in v0.1.1

func (self *IrAMD64_Jcc_rm) Usages() []*Reg

type IrAMD64_Jcc_rp added in v0.1.1

type IrAMD64_Jcc_rp struct {
	X  Reg
	Y  unsafe.Pointer
	To *IrBranch
	Ln *IrBranch
	Op IrAMD64_CmpOp
}

func (*IrAMD64_Jcc_rp) Clone added in v0.1.1

func (self *IrAMD64_Jcc_rp) Clone() IrNode

func (*IrAMD64_Jcc_rp) String added in v0.1.1

func (self *IrAMD64_Jcc_rp) String() string

func (*IrAMD64_Jcc_rp) Successors added in v0.1.1

func (self *IrAMD64_Jcc_rp) Successors() IrSuccessors

func (*IrAMD64_Jcc_rp) Usages added in v0.1.1

func (self *IrAMD64_Jcc_rp) Usages() []*Reg

type IrAMD64_Jcc_rr added in v0.1.1

type IrAMD64_Jcc_rr struct {
	X  Reg
	Y  Reg
	To *IrBranch
	Ln *IrBranch
	Op IrAMD64_CmpOp
}

func (*IrAMD64_Jcc_rr) Clone added in v0.1.1

func (self *IrAMD64_Jcc_rr) Clone() IrNode

func (*IrAMD64_Jcc_rr) String added in v0.1.1

func (self *IrAMD64_Jcc_rr) String() string

func (*IrAMD64_Jcc_rr) Successors added in v0.1.1

func (self *IrAMD64_Jcc_rr) Successors() IrSuccessors

func (*IrAMD64_Jcc_rr) Usages added in v0.1.1

func (self *IrAMD64_Jcc_rr) Usages() []*Reg

type IrAMD64_LEA

type IrAMD64_LEA struct {
	R Reg
	M Mem
}

func (*IrAMD64_LEA) Clone added in v0.1.1

func (self *IrAMD64_LEA) Clone() IrNode

func (*IrAMD64_LEA) Definitions added in v0.1.1

func (self *IrAMD64_LEA) Definitions() []*Reg

func (*IrAMD64_LEA) MemOp added in v0.1.4

func (self *IrAMD64_LEA) MemOp() *Mem

func (*IrAMD64_LEA) String

func (self *IrAMD64_LEA) String() string

func (*IrAMD64_LEA) Usages

func (self *IrAMD64_LEA) Usages() (r []*Reg)

type IrAMD64_MOVSLQ

type IrAMD64_MOVSLQ struct {
	R Reg
	V Reg
}

func (*IrAMD64_MOVSLQ) Clone added in v0.1.1

func (self *IrAMD64_MOVSLQ) Clone() IrNode

func (*IrAMD64_MOVSLQ) Definitions added in v0.1.1

func (self *IrAMD64_MOVSLQ) Definitions() []*Reg

func (*IrAMD64_MOVSLQ) String

func (self *IrAMD64_MOVSLQ) String() string

func (*IrAMD64_MOVSLQ) Usages

func (self *IrAMD64_MOVSLQ) Usages() []*Reg

type IrAMD64_MOV_abs

type IrAMD64_MOV_abs struct {
	R Reg
	V int64
}

func (*IrAMD64_MOV_abs) Clone added in v0.1.1

func (self *IrAMD64_MOV_abs) Clone() IrNode

func (*IrAMD64_MOV_abs) Definitions added in v0.1.1

func (self *IrAMD64_MOV_abs) Definitions() []*Reg

func (*IrAMD64_MOV_abs) String

func (self *IrAMD64_MOV_abs) String() string

type IrAMD64_MOV_load

type IrAMD64_MOV_load struct {
	R Reg
	M Mem
	N uint8
}

func (*IrAMD64_MOV_load) Clone added in v0.1.1

func (self *IrAMD64_MOV_load) Clone() IrNode

func (*IrAMD64_MOV_load) Definitions added in v0.1.1

func (self *IrAMD64_MOV_load) Definitions() []*Reg

func (*IrAMD64_MOV_load) MemOp added in v0.1.4

func (self *IrAMD64_MOV_load) MemOp() *Mem

func (*IrAMD64_MOV_load) String

func (self *IrAMD64_MOV_load) String() string

func (*IrAMD64_MOV_load) Usages

func (self *IrAMD64_MOV_load) Usages() (r []*Reg)

type IrAMD64_MOV_load_be added in v0.1.1

type IrAMD64_MOV_load_be struct {
	R Reg
	M Mem
	N uint8
}

func (*IrAMD64_MOV_load_be) Clone added in v0.1.1

func (self *IrAMD64_MOV_load_be) Clone() IrNode

func (*IrAMD64_MOV_load_be) Definitions added in v0.1.1

func (self *IrAMD64_MOV_load_be) Definitions() []*Reg

func (*IrAMD64_MOV_load_be) MemOp added in v0.1.4

func (self *IrAMD64_MOV_load_be) MemOp() *Mem

func (*IrAMD64_MOV_load_be) String added in v0.1.1

func (self *IrAMD64_MOV_load_be) String() string

func (*IrAMD64_MOV_load_be) Usages added in v0.1.1

func (self *IrAMD64_MOV_load_be) Usages() (r []*Reg)

type IrAMD64_MOV_load_stack added in v0.1.1

type IrAMD64_MOV_load_stack struct {
	R Reg
	S uintptr
	K IrSlotKind
}

func (*IrAMD64_MOV_load_stack) Clone added in v0.1.1

func (self *IrAMD64_MOV_load_stack) Clone() IrNode

func (*IrAMD64_MOV_load_stack) Definitions added in v0.1.1

func (self *IrAMD64_MOV_load_stack) Definitions() (r []*Reg)

func (*IrAMD64_MOV_load_stack) String added in v0.1.1

func (self *IrAMD64_MOV_load_stack) String() string

type IrAMD64_MOV_ptr

type IrAMD64_MOV_ptr struct {
	R Reg
	P unsafe.Pointer
}

func (*IrAMD64_MOV_ptr) Clone added in v0.1.1

func (self *IrAMD64_MOV_ptr) Clone() IrNode

func (*IrAMD64_MOV_ptr) Definitions added in v0.1.1

func (self *IrAMD64_MOV_ptr) Definitions() []*Reg

func (*IrAMD64_MOV_ptr) String

func (self *IrAMD64_MOV_ptr) String() string

type IrAMD64_MOV_reg

type IrAMD64_MOV_reg struct {
	R Reg
	V Reg
}

func (*IrAMD64_MOV_reg) Clone added in v0.1.1

func (self *IrAMD64_MOV_reg) Clone() IrNode

func (*IrAMD64_MOV_reg) Definitions added in v0.1.1

func (self *IrAMD64_MOV_reg) Definitions() []*Reg

func (*IrAMD64_MOV_reg) String

func (self *IrAMD64_MOV_reg) String() string

func (*IrAMD64_MOV_reg) Usages

func (self *IrAMD64_MOV_reg) Usages() []*Reg

type IrAMD64_MOV_store_be added in v0.1.1

type IrAMD64_MOV_store_be struct {
	R Reg
	M Mem
	N uint8
}

func (*IrAMD64_MOV_store_be) Clone added in v0.1.1

func (self *IrAMD64_MOV_store_be) Clone() IrNode

func (*IrAMD64_MOV_store_be) MemOp added in v0.1.4

func (self *IrAMD64_MOV_store_be) MemOp() *Mem

func (*IrAMD64_MOV_store_be) String added in v0.1.1

func (self *IrAMD64_MOV_store_be) String() string

func (*IrAMD64_MOV_store_be) Usages added in v0.1.1

func (self *IrAMD64_MOV_store_be) Usages() (r []*Reg)

type IrAMD64_MOV_store_i added in v0.1.1

type IrAMD64_MOV_store_i struct {
	V int32
	M Mem
	N uint8
}

func (*IrAMD64_MOV_store_i) Clone added in v0.1.1

func (self *IrAMD64_MOV_store_i) Clone() IrNode

func (*IrAMD64_MOV_store_i) MemOp added in v0.1.4

func (self *IrAMD64_MOV_store_i) MemOp() *Mem

func (*IrAMD64_MOV_store_i) String added in v0.1.1

func (self *IrAMD64_MOV_store_i) String() string

func (*IrAMD64_MOV_store_i) Usages added in v0.1.1

func (self *IrAMD64_MOV_store_i) Usages() (r []*Reg)

type IrAMD64_MOV_store_p added in v0.1.1

type IrAMD64_MOV_store_p struct {
	P unsafe.Pointer
	M Mem
}

func (*IrAMD64_MOV_store_p) Clone added in v0.1.1

func (self *IrAMD64_MOV_store_p) Clone() IrNode

func (*IrAMD64_MOV_store_p) MemOp added in v0.1.4

func (self *IrAMD64_MOV_store_p) MemOp() *Mem

func (*IrAMD64_MOV_store_p) String added in v0.1.1

func (self *IrAMD64_MOV_store_p) String() string

func (*IrAMD64_MOV_store_p) Usages added in v0.1.1

func (self *IrAMD64_MOV_store_p) Usages() (r []*Reg)

type IrAMD64_MOV_store_r added in v0.1.1

type IrAMD64_MOV_store_r struct {
	R Reg
	M Mem
	N uint8
}

func (*IrAMD64_MOV_store_r) Clone added in v0.1.1

func (self *IrAMD64_MOV_store_r) Clone() IrNode

func (*IrAMD64_MOV_store_r) MemOp added in v0.1.4

func (self *IrAMD64_MOV_store_r) MemOp() *Mem

func (*IrAMD64_MOV_store_r) String added in v0.1.1

func (self *IrAMD64_MOV_store_r) String() string

func (*IrAMD64_MOV_store_r) Usages added in v0.1.1

func (self *IrAMD64_MOV_store_r) Usages() (r []*Reg)

type IrAMD64_MOV_store_stack added in v0.1.1

type IrAMD64_MOV_store_stack struct {
	R Reg
	S uintptr
	K IrSlotKind
}

func (*IrAMD64_MOV_store_stack) Clone added in v0.1.1

func (self *IrAMD64_MOV_store_stack) Clone() IrNode

func (*IrAMD64_MOV_store_stack) String added in v0.1.1

func (self *IrAMD64_MOV_store_stack) String() string

func (*IrAMD64_MOV_store_stack) Usages added in v0.1.1

func (self *IrAMD64_MOV_store_stack) Usages() (r []*Reg)

type IrAMD64_MemOp added in v0.1.4

type IrAMD64_MemOp interface {
	MemOp() *Mem
}

type IrAMD64_NEG

type IrAMD64_NEG struct {
	R Reg
	V Reg
}

func (*IrAMD64_NEG) Clone added in v0.1.1

func (self *IrAMD64_NEG) Clone() IrNode

func (*IrAMD64_NEG) Definitions added in v0.1.1

func (self *IrAMD64_NEG) Definitions() []*Reg

func (*IrAMD64_NEG) String

func (self *IrAMD64_NEG) String() string

func (*IrAMD64_NEG) Usages

func (self *IrAMD64_NEG) Usages() []*Reg

type IrAMD64_RET added in v0.1.1

type IrAMD64_RET struct {
	R []Reg
}

func (*IrAMD64_RET) Clone added in v0.1.1

func (self *IrAMD64_RET) Clone() IrNode

func (*IrAMD64_RET) String added in v0.1.1

func (self *IrAMD64_RET) String() string

func (*IrAMD64_RET) Successors added in v0.1.1

func (self *IrAMD64_RET) Successors() IrSuccessors

func (*IrAMD64_RET) Usages added in v0.1.1

func (self *IrAMD64_RET) Usages() []*Reg

type IrAlias added in v0.1.2

type IrAlias struct {
	R Reg
	V Reg
}

func (*IrAlias) Clone added in v0.1.2

func (self *IrAlias) Clone() IrNode

func (*IrAlias) Definitions added in v0.1.2

func (self *IrAlias) Definitions() []*Reg

func (*IrAlias) String added in v0.1.2

func (self *IrAlias) String() string

func (*IrAlias) Usages added in v0.1.2

func (self *IrAlias) Usages() []*Reg

type IrBinaryExpr

type IrBinaryExpr struct {
	R  Reg
	X  Reg
	Y  Reg
	Op IrBinaryOp
}

func (*IrBinaryExpr) Clone added in v0.1.1

func (self *IrBinaryExpr) Clone() IrNode

func (*IrBinaryExpr) Definitions added in v0.1.1

func (self *IrBinaryExpr) Definitions() []*Reg

func (*IrBinaryExpr) String

func (self *IrBinaryExpr) String() string

func (*IrBinaryExpr) Usages

func (self *IrBinaryExpr) Usages() []*Reg

type IrBinaryOp

type IrBinaryOp uint8
const (
	IrOpAdd IrBinaryOp = iota
	IrOpSub
	IrOpMul
	IrOpAnd
	IrOpOr
	IrOpXor
	IrOpShr
	IrCmpEq
	IrCmpNe
	IrCmpLt
	IrCmpLtu
	IrCmpGeu
)

func (IrBinaryOp) String

func (self IrBinaryOp) String() string

type IrBitTestSet

type IrBitTestSet struct {
	T Reg
	S Reg
	X Reg
	Y Reg
}

func (*IrBitTestSet) Clone added in v0.1.1

func (self *IrBitTestSet) Clone() IrNode

func (*IrBitTestSet) Definitions added in v0.1.1

func (self *IrBitTestSet) Definitions() []*Reg

func (*IrBitTestSet) String

func (self *IrBitTestSet) String() string

func (*IrBitTestSet) Usages

func (self *IrBitTestSet) Usages() []*Reg

type IrBranch added in v0.1.1

type IrBranch struct {
	To         *BasicBlock
	Likeliness Likeliness
}

func IrLikely added in v0.1.1

func IrLikely(bb *BasicBlock) *IrBranch

func IrUnlikely added in v0.1.1

func IrUnlikely(bb *BasicBlock) *IrBranch

func (*IrBranch) Clone added in v0.1.4

func (self *IrBranch) Clone() *IrBranch

func (*IrBranch) String added in v0.1.1

func (self *IrBranch) String() string

type IrBreakpoint

type IrBreakpoint struct{}

func (*IrBreakpoint) Clone added in v0.1.1

func (*IrBreakpoint) Clone() IrNode

func (*IrBreakpoint) String

func (*IrBreakpoint) String() string

type IrCallFunc added in v0.1.1

type IrCallFunc struct {
	R    Reg
	In   []Reg
	Out  []Reg
	Func *abi.FunctionLayout
}

func (*IrCallFunc) Clone added in v0.1.1

func (self *IrCallFunc) Clone() IrNode

func (*IrCallFunc) Definitions added in v0.1.1

func (self *IrCallFunc) Definitions() []*Reg

func (*IrCallFunc) String added in v0.1.1

func (self *IrCallFunc) String() string

func (*IrCallFunc) Usages added in v0.1.1

func (self *IrCallFunc) Usages() []*Reg

type IrCallMethod added in v0.1.1

type IrCallMethod struct {
	T    Reg
	V    Reg
	In   []Reg
	Out  []Reg
	Slot int
	Func *abi.FunctionLayout
}

func (*IrCallMethod) Clone added in v0.1.1

func (self *IrCallMethod) Clone() IrNode

func (*IrCallMethod) Definitions added in v0.1.1

func (self *IrCallMethod) Definitions() []*Reg

func (*IrCallMethod) String added in v0.1.1

func (self *IrCallMethod) String() string

func (*IrCallMethod) Usages added in v0.1.1

func (self *IrCallMethod) Usages() []*Reg

type IrCallNative added in v0.1.1

type IrCallNative struct {
	R   Reg
	In  []Reg
	Out Reg
}

func (*IrCallNative) Clone added in v0.1.1

func (self *IrCallNative) Clone() IrNode

func (*IrCallNative) Definitions added in v0.1.1

func (self *IrCallNative) Definitions() []*Reg

func (*IrCallNative) String added in v0.1.1

func (self *IrCallNative) String() string

func (*IrCallNative) Usages added in v0.1.1

func (self *IrCallNative) Usages() []*Reg

type IrClobberList added in v0.1.4

type IrClobberList struct {
	R []Reg
}

func IrMarkClobber added in v0.1.4

func IrMarkClobber(r ...Reg) *IrClobberList

func (*IrClobberList) Clone added in v0.1.4

func (self *IrClobberList) Clone() IrNode

func (*IrClobberList) String added in v0.1.4

func (self *IrClobberList) String() string

func (*IrClobberList) Usages added in v0.1.4

func (self *IrClobberList) Usages() []*Reg

type IrConstInt

type IrConstInt struct {
	R Reg
	V int64
}

func (*IrConstInt) Clone added in v0.1.1

func (self *IrConstInt) Clone() IrNode

func (*IrConstInt) Definitions added in v0.1.1

func (self *IrConstInt) Definitions() []*Reg

func (*IrConstInt) String

func (self *IrConstInt) String() string

type IrConstPtr

type IrConstPtr struct {
	R Reg
	P unsafe.Pointer
	M Constness
}

func (*IrConstPtr) Clone added in v0.1.1

func (self *IrConstPtr) Clone() IrNode

func (*IrConstPtr) Definitions added in v0.1.1

func (self *IrConstPtr) Definitions() []*Reg

func (*IrConstPtr) String

func (self *IrConstPtr) String() string

type IrDefinitions added in v0.1.1

type IrDefinitions interface {
	IrNode
	Definitions() []*Reg
}

type IrEntry added in v0.1.1

type IrEntry struct {
	R []Reg
}

func (*IrEntry) Clone added in v0.1.1

func (self *IrEntry) Clone() IrNode

func (*IrEntry) Definitions added in v0.1.1

func (self *IrEntry) Definitions() []*Reg

func (*IrEntry) String added in v0.1.1

func (self *IrEntry) String() string

type IrImmovable added in v0.1.1

type IrImmovable interface {
	IrNode
	// contains filtered or unexported methods
}

type IrImpure added in v0.1.1

type IrImpure interface {
	IrNode
	// contains filtered or unexported methods
}

type IrLEA

type IrLEA struct {
	R   Reg
	Mem Reg
	Off Reg
}

func (*IrLEA) Clone added in v0.1.1

func (self *IrLEA) Clone() IrNode

func (*IrLEA) Definitions added in v0.1.1

func (self *IrLEA) Definitions() []*Reg

func (*IrLEA) String

func (self *IrLEA) String() string

func (*IrLEA) Usages

func (self *IrLEA) Usages() []*Reg

type IrLoad

type IrLoad struct {
	R    Reg
	Mem  Reg
	Size uint8
}

func (*IrLoad) Clone added in v0.1.1

func (self *IrLoad) Clone() IrNode

func (*IrLoad) Definitions added in v0.1.1

func (self *IrLoad) Definitions() []*Reg

func (*IrLoad) String

func (self *IrLoad) String() string

func (*IrLoad) Usages

func (self *IrLoad) Usages() []*Reg

type IrLoadArg

type IrLoadArg struct {
	R Reg
	I int
}

func (*IrLoadArg) Clone added in v0.1.1

func (self *IrLoadArg) Clone() IrNode

func (*IrLoadArg) Definitions added in v0.1.1

func (self *IrLoadArg) Definitions() []*Reg

func (*IrLoadArg) String

func (self *IrLoadArg) String() string

type IrNode

type IrNode interface {
	fmt.Stringer
	Clone() IrNode
	// contains filtered or unexported methods
}

func IrArchConstInt added in v0.1.4

func IrArchConstInt(r Reg, v int64) IrNode

func IrArchConstPtr added in v0.1.4

func IrArchConstPtr(r Reg, p unsafe.Pointer) IrNode

func IrArchCopy added in v0.1.1

func IrArchCopy(r Reg, v Reg) IrNode

func IrArchLoadStack added in v0.1.1

func IrArchLoadStack(reg Reg, offs uintptr, kind IrSlotKind) IrNode

func IrArchStoreStack added in v0.1.1

func IrArchStoreStack(reg Reg, offs uintptr, kind IrSlotKind) IrNode

func IrArchZero added in v0.1.1

func IrArchZero(r Reg) IrNode

func IrCopy

func IrCopy(r Reg, v Reg) IrNode

func IrCreateSpill added in v0.1.4

func IrCreateSpill(reg Reg, id int, op IrSpillOp) IrNode

func IrCreateSpillEx added in v0.1.4

func IrCreateSpillEx(reg Reg, ptr bool, id int, op IrSpillOp) IrNode

func IrSlotGen added in v0.1.4

func IrSlotGen(s IrSpillSlot) IrNode

type IrNop added in v0.1.1

type IrNop struct{}

func (*IrNop) Clone added in v0.1.1

func (*IrNop) Clone() IrNode

func (*IrNop) String added in v0.1.1

func (*IrNop) String() string

type IrPhi

type IrPhi struct {
	R Reg
	V map[*BasicBlock]*Reg
}

func (*IrPhi) Clone added in v0.1.1

func (self *IrPhi) Clone() IrNode

func (*IrPhi) Definitions added in v0.1.1

func (self *IrPhi) Definitions() []*Reg

func (*IrPhi) String

func (self *IrPhi) String() string

func (*IrPhi) Usages

func (self *IrPhi) Usages() []*Reg

type IrReturn

type IrReturn struct {
	R []Reg
}

func (*IrReturn) Clone added in v0.1.1

func (self *IrReturn) Clone() IrNode

func (*IrReturn) String

func (self *IrReturn) String() string

func (*IrReturn) Successors

func (self *IrReturn) Successors() IrSuccessors

func (*IrReturn) Usages

func (self *IrReturn) Usages() []*Reg

type IrSlotAlive added in v0.1.4

type IrSlotAlive struct {
	S []IrSpillSlot
}

func (*IrSlotAlive) Clone added in v0.1.4

func (self *IrSlotAlive) Clone() IrNode

func (*IrSlotAlive) String added in v0.1.4

func (self *IrSlotAlive) String() string

type IrSlotKind added in v0.1.1

type IrSlotKind uint8
const (
	IrSlotArgs IrSlotKind = iota
	IrSlotCall
	IrSlotLocal
)

func (IrSlotKind) String added in v0.1.1

func (self IrSlotKind) String() string

type IrSpill added in v0.1.4

type IrSpill struct {
	R  Reg
	S  IrSpillSlot
	Op IrSpillOp
}

func (*IrSpill) Clone added in v0.1.4

func (self *IrSpill) Clone() IrNode

func (*IrSpill) Definitions added in v0.1.4

func (self *IrSpill) Definitions() []*Reg

func (*IrSpill) String added in v0.1.4

func (self *IrSpill) String() string

func (*IrSpill) Usages added in v0.1.4

func (self *IrSpill) Usages() []*Reg

type IrSpillOp added in v0.1.4

type IrSpillOp uint8
const (
	IrSpillStore IrSpillOp = iota
	IrSpillReload
)

func (IrSpillOp) String added in v0.1.4

func (self IrSpillOp) String() string

type IrSpillSlot added in v0.1.4

type IrSpillSlot uint64

func (IrSpillSlot) ID added in v0.1.4

func (self IrSpillSlot) ID() int

func (IrSpillSlot) IsPtr added in v0.1.4

func (self IrSpillSlot) IsPtr() bool

func (IrSpillSlot) String added in v0.1.4

func (self IrSpillSlot) String() string

type IrStore

type IrStore struct {
	R    Reg
	Mem  Reg
	Size uint8
}

func (*IrStore) Clone added in v0.1.1

func (self *IrStore) Clone() IrNode

func (*IrStore) String

func (self *IrStore) String() string

func (*IrStore) Usages

func (self *IrStore) Usages() []*Reg

type IrSuccessors

type IrSuccessors interface {
	Next() bool
	Block() *BasicBlock
	Value() (int32, bool)
	Likeliness() Likeliness
	UpdateBlock(bb *BasicBlock)
}

type IrSwitch

type IrSwitch struct {
	V  Reg
	Ln *IrBranch
	Br map[int32]*IrBranch
}

func (*IrSwitch) Clone added in v0.1.1

func (self *IrSwitch) Clone() IrNode

func (*IrSwitch) String

func (self *IrSwitch) String() string

func (*IrSwitch) Successors

func (self *IrSwitch) Successors() IrSuccessors

func (*IrSwitch) Usages

func (self *IrSwitch) Usages() []*Reg

type IrTerminator

type IrTerminator interface {
	IrNode
	Successors() IrSuccessors
	// contains filtered or unexported methods
}

func IrArchJump added in v0.1.4

func IrArchJump(to *BasicBlock) IrTerminator

func IrArchReturn added in v0.1.1

func IrArchReturn(rr []Reg) IrTerminator

type IrUnaryExpr

type IrUnaryExpr struct {
	R  Reg
	V  Reg
	Op IrUnaryOp
}

func (*IrUnaryExpr) Clone added in v0.1.1

func (self *IrUnaryExpr) Clone() IrNode

func (*IrUnaryExpr) Definitions added in v0.1.1

func (self *IrUnaryExpr) Definitions() []*Reg

func (*IrUnaryExpr) String

func (self *IrUnaryExpr) String() string

func (*IrUnaryExpr) Usages

func (self *IrUnaryExpr) Usages() []*Reg

type IrUnaryOp

type IrUnaryOp uint8
const (
	IrOpNegate IrUnaryOp = iota
	IrOpSwap16
	IrOpSwap32
	IrOpSwap64
	IrOpSx32to64
)

func (IrUnaryOp) String

func (self IrUnaryOp) String() string

type IrUsages

type IrUsages interface {
	IrNode
	Usages() []*Reg
}

type IrWriteBarrier

type IrWriteBarrier struct {
	R   Reg
	M   Reg
	Fn  Reg
	Var Reg
}

func (*IrWriteBarrier) Clone added in v0.1.1

func (self *IrWriteBarrier) Clone() IrNode

func (*IrWriteBarrier) String

func (self *IrWriteBarrier) String() string

func (*IrWriteBarrier) Usages

func (self *IrWriteBarrier) Usages() []*Reg

type Layout added in v0.1.4

type Layout struct{}

Layout flattens the CFG into a linear FuncLayout

func (Layout) Apply added in v0.1.4

func (self Layout) Apply(cfg *CFG)

type Likeliness added in v0.1.1

type Likeliness uint8
const (
	Likely Likeliness = iota
	Unlikely
)

func (Likeliness) String added in v0.1.1

func (self Likeliness) String() string

type Lowering

type Lowering struct{}

Lowering lowers generic SSA IR to arch-dependent SSA IR.

func (Lowering) Apply

func (Lowering) Apply(cfg *CFG)

type Mem

type Mem struct {
	M Reg
	I Reg
	S uint8
	D int32
}

func Ptr added in v0.1.1

func Ptr(r Reg, d int32) Mem

func (Mem) String

func (self Mem) String() string

type OperandAlloc added in v0.1.1

type OperandAlloc struct{}

OperandAlloc for AMD64 converts 3-operand or 2-operand pseudo-instructions to 2-operand or one-operand real instructions.

func (OperandAlloc) Apply added in v0.1.1

func (OperandAlloc) Apply(cfg *CFG)

type Pass

type Pass interface {
	Apply(*CFG)
}

type PassDescriptor

type PassDescriptor struct {
	Pass Pass
	Name string
}

type PhiElim

type PhiElim struct{}

PhiElim transforms Phi nodes into copies if possible.

func (PhiElim) Apply

func (self PhiElim) Apply(cfg *CFG)

type PhiProp added in v0.1.2

type PhiProp struct{}

PhiProp propagates Phi nodes into it's source blocks, essentially get rid of them. The CFG is no longer in SSA form after this pass.

func (PhiProp) Apply added in v0.1.2

func (self PhiProp) Apply(cfg *CFG)

type Pos added in v0.1.4

type Pos struct {
	B *BasicBlock
	I int
}

func (Pos) String added in v0.1.4

func (self Pos) String() string

type Reduce added in v0.1.1

type Reduce struct{}

Reduce combines CSE, PhiElim, CopyElim and TDCE.

func (Reduce) Apply added in v0.1.1

func (Reduce) Apply(cfg *CFG)

type Reg

type Reg uint64
const (
	Rz Reg = (0 << _B_ptr) | (K_zero << _B_kind)
	Pn Reg = (1 << _B_ptr) | (K_zero << _B_kind)
)

func IrArchTryIntoConstInt added in v0.1.4

func IrArchTryIntoConstInt(v IrNode) (Reg, int64, bool)

func IrArchTryIntoConstPtr added in v0.1.4

func IrArchTryIntoConstPtr(v IrNode) (Reg, unsafe.Pointer, bool)

func IrSetArch added in v0.1.1

func IrSetArch(rr Reg, reg x86_64.Register64) Reg

func IrTryIntoArchReturn added in v0.1.1

func IrTryIntoArchReturn(p IrNode) ([]Reg, bool)

func Pr

func Pr(i int) Reg

func Rv

func Rv(reg hir.Register) Reg

func Tr

func Tr(i int) Reg

func (Reg) Derive added in v0.1.1

func (self Reg) Derive(i int) Reg

func (Reg) Index

func (self Reg) Index() int

func (Reg) Kind added in v0.1.1

func (self Reg) Kind() int

func (Reg) Name added in v0.1.1

func (self Reg) Name() int

func (Reg) Normalize added in v0.1.1

func (self Reg) Normalize(i int) Reg

func (Reg) Ptr

func (self Reg) Ptr() bool

func (Reg) String

func (self Reg) String() string

func (Reg) Zero added in v0.1.1

func (self Reg) Zero() Reg

type RegAlloc added in v0.1.1

type RegAlloc struct{}

RegAlloc performs register allocation on CFG.

func (RegAlloc) Apply added in v0.1.1

func (self RegAlloc) Apply(cfg *CFG)

type Rematerialize added in v0.1.1

type Rematerialize struct{}

Rematerialize recalculates simple values to reduce register pressure.

func (Rematerialize) Apply added in v0.1.1

func (Rematerialize) Apply(cfg *CFG)

type Reorder added in v0.1.1

type Reorder struct{}

Reorder moves value closer to it's usage, which reduces register pressure.

func (Reorder) Apply added in v0.1.1

func (self Reorder) Apply(cfg *CFG)

type ReturnSpread added in v0.1.1

type ReturnSpread struct{}

ReturnSpread spreads the return block to all it's successors, in order to shorten register live ranges.

func (ReturnSpread) Apply added in v0.1.1

func (ReturnSpread) Apply(cfg *CFG)

type SlotSet added in v0.1.4

type SlotSet map[IrSpillSlot]struct{}

func (SlotSet) String added in v0.1.4

func (self SlotSet) String() string

type SplitCritical added in v0.1.4

type SplitCritical struct{}

SplitCritical splits critical edges (those that go from a block with more than one outedge to a block with more than one inedge) by inserting an empty block.

PhiProp wants a critical-edge-free CFG so it can safely remove Phi nodes for RegAlloc.

func (SplitCritical) Apply added in v0.1.4

func (SplitCritical) Apply(cfg *CFG)

type StackLiveness added in v0.1.4

type StackLiveness struct{}

StackLiveness calculates the liveness of each stack slot.

func (StackLiveness) Apply added in v0.1.4

func (self StackLiveness) Apply(cfg *CFG)

type TDCE

type TDCE struct{}

TDCE removes trivial dead-code such as unused register definations from CFG.

func (TDCE) Apply

func (TDCE) Apply(cfg *CFG)

type WriteBarrier

type WriteBarrier struct{}

WriteBarrier inserts write barriers for pointer stores.

func (WriteBarrier) Apply

func (WriteBarrier) Apply(cfg *CFG)

type ZeroReg added in v0.1.1

type ZeroReg struct{}

ZeroReg replaces read to %z or %nil to a register that was initialized to zero for architectures that does not have constant zero registers, such as `x86_64`.

func (ZeroReg) Apply added in v0.1.1

func (self ZeroReg) Apply(cfg *CFG)

Jump to

Keyboard shortcuts

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