Skip to main content

Module ir

Module ir 

Source
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§

EvmIrBlock
A basic block in EVM IR.
EvmIrBlockId
A unique identifier for a basic block in EVM IR.
EvmIrBlockMetadata
Block-level metadata.
EvmIrInstruction
A non-terminating untyped backend instruction.
EvmIrMetadata
Generic metadata carried by instructions and terminators.
EvmIrMetadataItem
A metadata key-value item.
EvmIrModule
An EVM IR module.
EvmIrParseError
An error produced while parsing the EVM IR text format.
EvmIrStackEffect
Stack effect metadata for one EVM IR operation.
EvmIrTerminator
A control-flow terminator.
EvmIrValue
A named untyped stack word.
EvmIrValueId
A unique identifier for an untyped stack word in EVM IR.
EvmIrVerifyError
An error produced while validating EVM IR.

Enums§

EvmIrBlockHotness
Block hotness metadata.
EvmIrInstructionKind
A non-terminating EVM IR instruction kind.
EvmIrOperand
An instruction or terminator operand.
EvmIrPass
A named EVM IR pass exposed to solar evm-opt.
EvmIrStackOp
A materialized physical EVM stack operation.
EvmIrTerminatorKind
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.