The author describes the aegraph, a data structure at the heart of Cranelift's mid-end optimizer, and explains how it was developed to unify code motion, canonicalization, and rewrites in a single framework. The author outlines the process of elaboration, which involves canonicalizing pure operators, putting them into a sea-of-nodes representation, performing rewrites, and then converting ...