Skip to main content

solar_codegen/backend/evm/
mod.rs

1//! The EVM backend: the reference [`Backend`](crate::backend::Backend)
2//! implementation, lowering MIR to EVM bytecode.
3//!
4//! This module contains:
5//! - `EvmCodegen`: The main EVM code generator
6//! - `ir`: Machine-level EVM instructions and block metadata
7//! - `Assembler`: Two-pass assembler with label resolution and instruction peepholes
8//! - `stack`: Stack scheduling for DUP/SWAP generation
9
10mod codegen;
11pub use codegen::{EvmArtifact, EvmCodegen, EvmCodegenConfig};
12
13pub mod ir;
14mod ir_stack_schedule;
15pub use ir::{
16    EVM_IR_PASSES, EvmIrBlock, EvmIrBlockHotness, EvmIrBlockId, EvmIrBlockMetadata,
17    EvmIrInstruction, EvmIrInstructionKind, EvmIrMetadata, EvmIrMetadataItem, EvmIrModule,
18    EvmIrOperand, EvmIrParseError, EvmIrPass, EvmIrStackEffect, EvmIrStackOp, EvmIrTerminator,
19    EvmIrTerminatorKind, EvmIrValue, EvmIrValueId, EvmIrVerifyError, parse_evm_ir_module,
20    verify_evm_ir_module,
21};
22
23pub mod assembler;
24pub use assembler::{AssembledCode, Assembler, AssemblerConfig, Label};
25
26mod peephole;
27
28pub mod stack;
29pub use stack::{SpillManager, SpillSlot, StackModel, StackScheduler};