SIGN IN SIGN UP

debugging: Add flag to prevent compiler from discarding Julia IR (#61741)

The Julia compiler typically discards Julia IR after it is converted to
machine code, unless it has a specific reason to keep it around (such as
for inlining).

When debugging, it is common to want to ask "How was this function
inferred?". `code_typed` / Cthulhu provide an approximate answer to this
question, but this flag allows you to observe the results of inference
as they were computed for the machine code you are actually running.

Accessible only via `ccall(:jl_set_type_infer_preserve_ir, Cvoid,
(UInt8,), 1)` since this is a debugging-only feature.
C
Cody Tapscott committed
6bf6602d9487c39ae72b6b7549f9ce0318e2ca3c
Parent: e34cfa0
Committed by GitHub <noreply@github.com> on 5/7/2026, 6:22:59 PM