View definition

(Instruction).Operands

Defined in github.com/golang/tools/go/ssa/ssa.go

Description

Operands returns the operands of this instruction: the set of Values it references.

Specifically, it appends their addresses to rands, a user-provided slice, and returns the resulting slice, permitting avoidance of memory allocation.

The operands are appended in undefined order, but the order is consistent for a given Instruction; the addresses are always non-nil but may point to a nil Value. Clients may store through the pointers, e.g. to effect a value renaming.

Value.Referrers is a subset of the inverse of this relation. (Referrers are not tracked for all types of Values.)