Expand description
EVM backend IR.
This module defines the target-specific Machine-IR-like boundary between
MIR lowering and final EVM assembly. EVM IR is intentionally untyped: values
are EVM stack words, not Solidity or MIR values with a crate::mir::MirType.
It models backend basic blocks, opcode-like instructions, explicit physical
stack operations, terminators, and metadata. The parser/printer at the bottom
of the file provide a text format for tests and debugging; the IR itself is
not defined by that serialization.
Structs§
- EvmIr
Block - A basic block in EVM IR.
- EvmIr
Block Id - A unique identifier for a basic block in EVM IR.
- EvmIr
Block Metadata - Block-level metadata.
- EvmIr
Instruction - A non-terminating untyped backend instruction.
- EvmIr
Metadata - Generic metadata carried by instructions and terminators.
- EvmIr
Metadata Item - A metadata key-value item.
- EvmIr
Module - An EVM IR module.
- EvmIr
Parse Error - An error produced while parsing the EVM IR text format.
- EvmIr
Stack Effect - Stack effect metadata for one EVM IR operation.
- EvmIr
Terminator - A control-flow terminator.
- EvmIr
Value - A named untyped stack word.
- EvmIr
Value Id - A unique identifier for an untyped stack word in EVM IR.
- EvmIr
Verify Error - An error produced while validating EVM IR.
Enums§
- EvmIr
Block Hotness - Block hotness metadata.
- EvmIr
Instruction Kind - A non-terminating EVM IR instruction kind.
- EvmIr
Operand - An instruction or terminator operand.
- EvmIr
Pass - A named EVM IR pass exposed to
solar evm-opt. - EvmIr
Stack Op - A materialized physical EVM stack operation.
- EvmIr
Terminator Kind - Control-flow terminators in EVM IR.
Constants§
- EVM_
IR_ PASSES - All EVM IR passes exposed by
solar evm-opt.
Functions§
- parse_
evm_ ir_ module - Parses an EVM IR module from the text format.
- verify_
evm_ ir_ module - Verifies basic EVM IR invariants.