TC-8, Liveness Analysis
2026-TC-8 is a part of the TC Back End option.
2026-TC-8 submission is Saturday, June 15th 2024 at 21:42.
At the end of this stage, the compiler computes the input of TC-9: the interference graph (or conflict graph).
The options -N
and --interference-dump
allow the user
to see these graphs, one per function. To compute the interference
graph, the compiler first computes the liveness of each temporary,
a graph whose nodes are the instructions, and labeled with
live temporaries.
The options -V
, --liveness-dump
dumps these graphs.
Finally, the structure of the liveness graph is the flow graph:
its nodes are the instructions, and edges correspond to control flow.
Use options -F
, --flowgraph-dump
to dump them.
All dumped graphs use the DOT format. You can display them using
dotty
or convert them to other formats (such as PDF or PNG)
using dot
, both part of the GraphViz package.
Relevant lecture notes include 49-liveness-analysis.pdf.