Milky2018/vcode/allocation_types does not have a README file

    AllocationConstraint

    pub(all) enum AllocationConstraint {
    AnyReg
    AnyLocation
    PreservedHome
    FixedReg(PhysicalReg)
    } derive(Eq,
    Debug
    )

    A normalized register-allocation constraint.

    Operand ties are represented separately by a shared nonnegative tie label, so this type contains only location constraints.

    AllocationConstraint::equal

    AllocationConstraint::not_equal

    AllocationLocation

    pub(all) struct AllocationLocation {
    encoded : Int64
    } derive(Eq)

    A packed allocation result location within one allocation session.

    Spill indices are session-local and must be translated at ownership boundaries before they are exposed as product-facing stack-slot handles.

    AllocationLocation::equal

    AllocationLocation::is_register

    fn AllocationLocation::is_register(self : AllocationLocation) -> Bool

    AllocationLocation::is_spill

    fn AllocationLocation::is_spill(self : AllocationLocation) -> Bool

    AllocationLocation::not_equal

    AllocationLocation::reg

    AllocationLocation::register

    AllocationLocation::register_unchecked

    fn AllocationLocation::register_unchecked(self : AllocationLocation) -> PhysicalReg

    Decode a register location after is_register has been established.

    AllocationLocation::spill

    fn AllocationLocation::spill(index : Int) -> AllocationLocation

    AllocationLocation::spill_index

    fn AllocationLocation::spill_index(self : AllocationLocation) -> Int?

    AllocationLocation::spill_index_unchecked

    fn AllocationLocation::spill_index_unchecked(self : AllocationLocation) -> Int

    Decode a spill location after is_spill has been established.

    AllocationLocation::to_repr

    AllocationOperand

    pub(all) struct AllocationOperand {
    vreg : VirtualReg
    role : OperandRole
    constraint : AllocationConstraint
    preference : PhysicalReg?
    tie_id : Int
    timing : OperandTiming
    } derive(Eq,
    Debug
    )

    The canonical allocation facts for one instruction operand.

    AllocationOperand::def

    AllocationOperand::equal

    AllocationOperand::not_equal

    fn AllocationOperand::not_equal(x : AllocationOperand, y : AllocationOperand) -> Bool

    AllocationOperand::use_reg

    AllocationOperand::with_constraint

    fn AllocationOperand::with_constraint(self : AllocationOperand, constraint : AllocationConstraint) -> AllocationOperand

    AllocationOperand::with_preference

    fn AllocationOperand::with_preference(self : AllocationOperand, preference : PhysicalReg) -> AllocationOperand

    Prefer a physical register without making it a correctness constraint.

    AllocationOperand::with_tie

    fn AllocationOperand::with_tie(self : AllocationOperand, tie_id : Int) -> AllocationOperand

    Tie operands in one instruction by a shared nonnegative label.

    AllocationOperand::with_timing

    OperandRole

    pub(all) enum OperandRole {
    Use
    Def
    UseDef
    } derive(Eq,
    Debug
    )

    Whether an allocation operand reads, writes, or both reads and writes its virtual register.

    SSA VCode producers use Use and Def. UseDef remains available to standalone register-allocation clients that model in-place updates.

    OperandRole::equal

    fn OperandRole::equal(OperandRole, OperandRole) -> Bool

    OperandRole::not_equal

    fn OperandRole::not_equal(x : OperandRole, y : OperandRole) -> Bool

    OperandTiming

    pub(all) enum OperandTiming {
    Early
    Late
    } derive(Eq,
    Debug
    )

    The point within an instruction where an allocation operand is read or written.

    OperandTiming::equal

    OperandTiming::not_equal

    fn OperandTiming::not_equal(x : OperandTiming, y : OperandTiming) -> Bool

    PhysicalReg

    pub(all) struct PhysicalReg {
    id : Int
    class : RegClass
    } derive(Eq)

    A target physical register identified within one register class.

    PhysicalReg::equal

    fn PhysicalReg::equal(PhysicalReg, PhysicalReg) -> Bool

    PhysicalReg::new

    fn PhysicalReg::new(id : Int, class : RegClass) -> PhysicalReg

    PhysicalReg::not_equal

    fn PhysicalReg::not_equal(x : PhysicalReg, y : PhysicalReg) -> Bool

    PhysicalReg::to_repr

    RegClass

    pub(all) enum RegClass {
    Int
    Float
    Vector
    FpVector
    } derive(Eq, Hash,
    Debug
    )

    Target-neutral register-class identity shared by VCode and register allocation.

    FpVector preserves targets whose scalar floating-point and vector values occupy one physical register bank. Float and Vector remain available to standalone allocator embeddings that model distinct banks.

    RegClass::equal

    fn RegClass::equal(RegClass, RegClass) -> Bool

    RegClass::hash

    fn RegClass::hash(self : RegClass) -> Int

    RegClass::hash_combine

    fn RegClass::hash_combine(RegClass, Hasher) -> Unit

    RegClass::not_equal

    fn RegClass::not_equal(x : RegClass, y : RegClass) -> Bool

    RegClass::text

    fn RegClass::text(self : RegClass) -> String

    RegClass::to_repr

    VirtualReg

    pub(all) struct VirtualReg {
    id : Int
    class : RegClass
    } derive(Eq,
    Debug
    )

    A dense virtual-register identity within one allocation session.

    VirtualReg::equal

    fn VirtualReg::equal(VirtualReg, VirtualReg) -> Bool

    VirtualReg::not_equal

    fn VirtualReg::not_equal(x : VirtualReg, y : VirtualReg) -> Bool

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io