github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/cmd/compile/internal/liveness/arg.go (about) 1 // Copyright 2021 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package liveness 6 7 import ( 8 "github.com/shogo82148/std/cmd/compile/internal/ir" 9 "github.com/shogo82148/std/cmd/compile/internal/objw" 10 "github.com/shogo82148/std/cmd/compile/internal/ssa" 11 ) 12 13 // ArgLiveness computes the liveness information of register argument spill slots. 14 // An argument's spill slot is "live" if we know it contains a meaningful value, 15 // that is, we have stored the register value to it. 16 // Returns the liveness map indices at each Block entry and at each Value (where 17 // it changes). 18 func ArgLiveness(fn *ir.Func, f *ssa.Func, pp *objw.Progs) (blockIdx, valueIdx map[ssa.ID]int)