You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 7, 2022. It is now read-only.
Laurence Tratt edited this page Mar 18, 2021
·
2 revisions
Yorick uses two additional intermediate representations (IRs) on top of those already found in rustc:
Serialised IR (SIR)
Tracing IR (TIR)
Serialised IR (SIR)
During compilation the MIR is traversed and serialised into a simpler representation called SIR.
SIR is a flowgraph IR very similar to MIR. It mostly exists so that high-level program information can be reconstructed at runtime without a need for an instance of the compiler (and its tcx struct).
The resulting SIR is serialised using serde and linked into the .yk_sir ELF section of binaries compiled with ykrustc. At runtime, the tracer will collect SIR traces, which can then be mapped back to the serialised SIR information.
The SIR data structures are in an externally maintained crate so they can be shared by the compiler and the JIT runtime.