Skip to content

Add live span column to the graph.#34

Open
nbp wants to merge 1 commit intomozilla-spidermonkey:mainfrom
nbp:live-span-column
Open

Add live span column to the graph.#34
nbp wants to merge 1 commit intomozilla-spidermonkey:mainfrom
nbp:live-span-column

Conversation

@nbp
Copy link
Contributor

@nbp nbp commented Mar 10, 2026

This change adds a 2px wide column which is used to highlight the life span, between the last uses and the definition of the selected values.

It does so, by using a fix-point over the displayed graph, which will record the set of instructions which are live at the end of each block, and for each block computes the live set of each predecessor by walking the instruction backward, and recording the live ranges of every instructions along the way. The memory representation can probably be optimized later.

image

At the moment, there is only one column, and selecting multiple instructions will overwrite the previous one. Also, a 2 pixels wide view does not offer much opportunities for distinguishing colors such as pink and orange.

I have not yet tried with gigantic graphs, and I suspect there could be some memory / performance issue with this naive implementation.

This change adds a 2px wide column which is used to highlight the life span,
between the last uses and the definition of the selected values.

It does so, by using a fix-point over the displayed graph, which will record the
set of instructions which are live at the end of each block, and for each block
computes the live set of each predecessor by walking the instruction backward,
and recording the live ranges of every instructions along the way. The memory
representation can probably be optimized later.
@nbp
Copy link
Contributor Author

nbp commented Mar 10, 2026

I will look at these warnings later …
However, despite the warnings, isSubsetOf and union do exists and work properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant