These dump the entire function representation at major compilation boundaries:
set_option trace.Compiler.init true
Initial LCNF code directly after conversion from Lean kernel expressions (before optimizations).set_option trace.Compiler.saveBase true
LCNF code at the end of the Base phase (after initial simp, instance pulling, specialization, eager lambda lifting).set_option trace.Compiler.saveMono true
LCNF code at the end of the Mono phase (after monomorphization/lambda lifting/simp, right before closed term extraction).set_option trace.Compiler.result true
Final LCNF code right before emission into Low-level IR (after closed term extraction).
set_option trace.compiler.ir.init true
Initial Low-level IR converted directly from final LCNF.set_option trace.compiler.ir.result true
Final Low-level IR after all IR optimizations (RC reference-counting, borrow inference@&, boxed wrappers, etc.).
Inspect specific transformations in the low-level IR backend:
set_option trace.compiler.ir.rc true— Reference counting (inc/dec) insertion & optimization.set_option trace.compiler.ir.borrow true— Borrow inference (@&borrowed parameter markers to avoid RC overhead).set_option trace.compiler.ir.boxing true— Unboxed scalar vs boxed object conversions and._boxedwrapper emission.set_option trace.compiler.ir.reset_reuse true&set_option trace.compiler.ir.expand_reset_reuse true— In-place destructive update / memory reuse optimization.set_option trace.compiler.ir.simp_case true— Simplification ofcasebranches in IR.set_option trace.compiler.ir.elim_dead true— Dead code and variable elimination in IR.set_option trace.compiler.ir.push_proj true— Pushing projection operations into branches.
Detailed diagnostic information for specific LCNF compiler passes:
set_option trace.Compiler.simp true— Details on simplification and inlining (.inline,.step,.jpCases,.stat).set_option trace.Compiler.specialize true— Specialization of polymorphic/higher-order functions (.candidate,.step,.info).set_option trace.Compiler.findJoinPoints true/trace.Compiler.jp true— Detection and creation of join points (jp).set_option trace.Compiler.extendJoinPointContext true— Join point context propagation.set_option trace.Compiler.lambdaLifting true/trace.Compiler.eagerLambdaLifting true— Lambda lifting transformations.set_option trace.Compiler.extractClosed true— Extraction of constant subexpressions into auxiliary._closed_*functions.set_option trace.Compiler.cse true— Common subexpression elimination.set_option trace.Compiler.elimDeadBranches true— Pruning unreachable match branches.set_option trace.Compiler.reduceArity true/trace.Compiler.reduceJpArity true— Unused parameter elimination.set_option trace.Compiler.floatLetIn true— Floatingletbindings outwards.set_option trace.Compiler.toMono true— Monomorphization pass details.
set_option trace.Compiler true— Traces the entry/exit timings and steps of every compiler pass.set_option trace.Compiler.trace true— Prints the entire LCNF code after every individual pass checkpoint.set_option trace.compiler.ir true— Catch-all for all IR-level logs.