Something went wrong. Try again.
🌱 A minimal programming language and compiler. git.urbach.dev/cli/q
high-performance programming-language compiler
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536package codegen
import ( "git.urbach.dev/cli/q/src/cpu" "git.urbach.dev/cli/q/src/set" "git.urbach.dev/cli/q/src/ssa")
// Step is created for every single SSA value and holds additional metadata.type Step struct { Value ssa.Value Block *ssa.Block Phis set.Ordered[*Step] Live []*Step Hints []cpu.Register Index Index Register cpu.Register}
// hint adds a register hint to the step.func (s *Step) hint(reg cpu.Register) { if reg == -1 { panic("invalid register hint") }
if len(s.Hints) == 0 { s.Register = reg }
s.Hints = append(s.Hints, reg)}
// String returns the underlying SSA value in human-readable form.func (s *Step) String() string { return s.Value.String()}