package liveness
import "cmd/compile/internal/liveness"
Index ¶
- func ArgLiveness(fn *ir.Func, f *ssa.Func, pp *objw.Progs) (blockIdx, valueIdx map[ssa.ID]int)
- func IsUnsafe(f *ssa.Func) bool
- func WriteFuncMap(fn *ir.Func, abiInfo *abi.ABIParamResultInfo)
- type Map
Functions ¶
func ArgLiveness ¶
ArgLiveness computes the liveness information of register argument spill slots. An argument's spill slot is "live" if we know it contains a meaningful value, that is, we have stored the register value to it. Returns the liveness map indices at each Block entry and at each Value (where it changes).
func IsUnsafe ¶
IsUnsafe indicates that all points in this function are unsafe-points.
func WriteFuncMap ¶
func WriteFuncMap(fn *ir.Func, abiInfo *abi.ABIParamResultInfo)
WriteFuncMap writes the pointer bitmaps for bodyless function fn's inputs and outputs as the value of symbol <fn>.args_stackmap. If fn has outputs, two bitmaps are written, otherwise just one.
Types ¶
type Map ¶
type Map struct { Vals map[ssa.ID]objw.StackMapIndex UnsafeVals map[ssa.ID]bool UnsafeBlocks map[ssa.ID]bool // The set of live, pointer-containing variables at the DeferReturn // call (only set when open-coded defers are used). DeferReturn objw.StackMapIndex }
Map maps from *ssa.Value to StackMapIndex. Also keeps track of unsafe ssa.Values and ssa.Blocks. (unsafe = can't be interrupted during GC.)
func Compute ¶
func Compute(curfn *ir.Func, f *ssa.Func, stkptrsize int64, pp *objw.Progs) (Map, map[*ir.Name]bool)
Entry pointer for Compute analysis. Solves for the Compute of pointer variables in the function and emits a runtime data structure read by the garbage collector. Returns a map from GC safe points to their corresponding stack map index, and a map that contains all input parameters that may be partially live.
func (Map) Get ¶
func (m Map) Get(v *ssa.Value) objw.StackMapIndex
func (Map) GetUnsafe ¶
func (Map) GetUnsafeBlock ¶
Source Files ¶
- Version
- v1.22.0-rc.1
- Published
- Dec 19, 2023
- Platform
- linux/amd64
- Imports
- 17 packages
- Last checked
- 2 minutes ago –
Tools for package owners.