The model of Seafoam is that it is a directed graph, with nodes annotated with a bag of key-value properties. When graphs are read they'll have some initial properties. Seafoam may add more properties. The output routines then draw the graph using the graph structure itself and also the properties.
Passes are routines that may modify graphs, or add extra properties to graphs, to help the user understand them. They usually have knowledge of how the graph is structured, and use this to make the graph easier to read or to make important information in them stand out.
Passes are similar to filters in IGV, but are more powerful.
Appropriate passes are automatically selected and applied to graphs.
The rendering commands recognize these properties, so passes will probably want to add them:
:labelon nodes and edges:out_annotationon nodes:hiddenon nodes and edges, to not show them (remove frame state for example in IGV terminology):inlinedon nodes only, to indicate the node should be shown immediately above each node using it (reduce edges in IGV terminology):kindon nodes only, which can beinfo,input,control,memory,call,sync,alloc,virtual,calc,guard, orother:kindon edges only, which can beinfo,control,loop, ordata:reverseon edges only:spotlightfor nodes as part of spotlighting (litare shown,shadedare shown but greyed out, and edges fromshadedto:hiddennodes are also shown greyed out):syntheticon nodes edges which were added by passes and not in the original graph
Seafoam ships with a pass for generic GraalVM graphs. If you work with a different compiler you'll probably want to write your own pass.
A fallback pass, run after all others, just labels the node with the
'label' property if there is one.
Options for passes can be set on the command line with
--option key value. Some options are built into Seafoam commands,
like --show-frame-state, but they're doing the same thing as
--option hide_frame_state false.