| 1 |
package backend |
| 2 |
|
| 3 |
import ( |
| 4 |
"github.com/tetratelabs/wazero/internal/engine/wazevo/ssa" |
| 5 |
) |
| 6 |
|
| 7 |
// SSAValueDefinition represents a definition of an SSA value. |
| 8 |
type SSAValueDefinition struct { |
| 9 |
V ssa.Value |
| 10 |
// Instr is not nil if this is a definition from an instruction. |
| 11 |
Instr *ssa.Instruction |
| 12 |
// RefCount is the number of references to the result. |
| 13 |
RefCount uint32 |
| 14 |
} |
| 15 |
|
| 16 |
// IsFromInstr returns true if this definition is from an instruction. |
| 17 |
func (d *SSAValueDefinition) IsFromInstr() bool { |
| 18 |
return d.Instr != nil |
| 19 |
} |