Skip to main content

Module regalloc

Module regalloc 

Source
Expand description

Register-allocation data types and target-independent allocation helpers.

Structs§

Allocation
Register assignment returned by allocate_linear_scan.
BlockAllocationFacts
Register-allocation facts for one normalized target-MIR basic block.
CopyResolution
Dependency-ordered realization of one parallel assignment.
CopyResolutionError
Malformed copy rows or an inconsistent resolver state.
CopyResolutionWork
Work counters retained for allocator diagnostics and regression tests.
FunctionAllocationFacts
Target-independent input boundary for register-allocation analyses.
InstructionAllocationFacts
Register-allocation facts for one target-owned machine instruction.
InstructionConstraints
Target constraints attached to one instruction after legalization.
LiveInterval
Sparse per-block live interval for one target-owned virtual register.
LiveIntervalError
Failure while constructing strict-SSA live intervals.
LiveIntervals
Exact SSA liveness reconstructed from allocation facts.
LiveRange
One inclusive live range in a linearized machine function.
LiveSegment
One half-open live segment within a normalized basic block.
NextUseAnalysis
NextUseDistanceIter
NextUseDistanceKeys
NextUseDistances
Next-use distances at target-MIR block boundaries.
ParallelCopy
One simultaneous assignment row.
PhiAllocationFacts
Register-allocation facts for one target-MIR phi node.
PhiSource
One source of a target-MIR phi node, identified by normalized predecessor block index rather than a backend-specific block identifier.
RegisterSet
Compact set for targets with at most 64 physical registers per class.
StackSlotColoring
Deterministic stack-slot assignment for target-owned spill homes.

Enums§

AllocationFactsError
Structural error in backend-provided register-allocation facts.
CopyDestination
Writable physical location in a parallel assignment.
CopyOperation
One sequential operation implementing a parallel assignment.
CopySource
Readable physical location or constant in a parallel assignment.
LinearScanError
Failure from target-independent linear-scan allocation.
RegConstraint
Constraint on one machine-instruction operand.
StackColorError
Failure while assigning target-owned spill homes to reusable frame slots.
ValueLocation
Physical location used while lowering SSA edge transfers.

Traits§

MachineRegister
A physical register that can be stored in a compact register set.

Functions§

allocate_linear_scan
Allocate non-spilling live ranges using a deterministic linear scan.
analyze_live_intervals
Build exact block-sparse live intervals for a strict-SSA target program.
analyze_next_uses
Compute liveness and global next-use distances solely from allocator facts.
color_stack_slots
Color a complete target spill batch using conservative linear envelopes.
resolve_parallel_copies
Schedule copies without clobbering any still-needed source.