Skip to main content

cse

Function cse 

Source
pub fn cse(_pool: &ExprPool, id: ExprId) -> ExprId
Expand description

CSE (spec §10.2 item 3): returns the canonical ExprId for a subexpression. Because the ExprPool hash-conses identical nodes, repeated subexpressions already share one ExprId; this function documents and asserts that invariant (returns id unchanged). It exists as the stable entry point the JIT pipeline calls before codegen.