1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//! Maglev optimising compiler tier.
//!
//! # Modules
//!
//! - [`ir`] — Typed IR node types: [`ir::ValueNode`], [`ir::ControlNode`],
//! [`ir::BasicBlock`], and [`ir::MaglevGraph`].
//! - [`graph_builder`] — Bytecode-to-IR graph builder: walks a
//! [`crate::bytecode::bytecode_array::BytecodeArray`] together with a
//! [`crate::bytecode::feedback::FeedbackVector`] and emits a
//! [`ir::MaglevGraph`] with speculative type guards.
//! - [`type_specialization`] — Replaces generic arithmetic with typed
//! fast-path equivalents using IC feedback.
//! - [`range_analysis`] — Integer range analysis that eliminates
//! unnecessary overflow-check deoptimisations.
//! - [`licm`] — Loop-invariant code motion: hoists pure invariant nodes
//! out of natural loops.
//! - [`type_guards`] — Inserts type-guard nodes with deoptimisation
//! bailout before unguarded typed arithmetic.
/// Code generator: walk register-allocated [`ir::MaglevGraph`] and emit
/// x86-64 machine code.
/// Deoptimiser: JIT → interpreter fallback on speculation failure.
/// Bytecode-to-IR graph builder.
/// Typed IR node definitions for the Maglev compiler.
/// Loop-invariant code motion (LICM).
/// Optimisation passes: constant folding, DCE, redundant-CheckMaps removal.
/// Integer range analysis for overflow-check elimination.
/// Linear-scan register allocator over [`ir::MaglevGraph`].
/// Type-guard insertion with deoptimisation bailout.
/// Type specialisation from inline-cache (IC) feedback.