Expand description
Stack scheduling for EVM code generation.
This module handles the translation from MIR’s SSA values to EVM’s stack-based model.
The key abstraction is StackModel, which tracks which MIR values are at which stack depths.
§Submodules
model: Core stack model tracking value positionsscheduler: Stack scheduler for generating DUP/SWAP sequencesshuffler: Optimal stack layout transitions (backward analysis)spill: Spill management for values beyond depth 16
Re-exports§
pub use shuffler::BlockStackLayout;pub use shuffler::LayoutAnalysis;pub use shuffler::ShuffleResult;pub use shuffler::StackShuffler;pub use shuffler::TargetSlot;pub use shuffler::combine_stack_layouts;pub use shuffler::estimate_shuffle_cost;pub use shuffler::ideal_binary_op_entry;pub use shuffler::ideal_operand_layout;pub use shuffler::ideal_unary_op_entry;pub use shuffler::is_freely_generable;
Modules§
- shuffler
- Stack shuffler for optimal stack layout transitions.
Structs§
- Spill
Manager - Manages spill slots for values that cannot fit on the stack.
- Spill
Slot - A slot in memory where a spilled value is stored.
- Stack
Model - Represents the current state of the EVM stack.
- Stack
Scheduler - Stack scheduler that generates stack manipulation operations.
Enums§
- Scheduled
Op - A scheduled operation to emit.
- StackOp
- Operations to emit for stack manipulation.