RFR: 8348645: IGV: visualize live ranges
Roberto Castañeda Lozano
rcastanedalo at openjdk.org
Thu Feb 20 13:44:53 UTC 2025
On Wed, 19 Feb 2025 15:25:41 GMT, Roberto Castañeda Lozano <rcastanedalo at openjdk.org> wrote:
> > I thought that variables that are joined by the Phi node are still live at the Phi node. Is this not the case?
>
> No, the usual "multiplex-like" liveness semantics for Phi instructions is to consider the joined variables live-out of their corresponding predecessor blocks and the resulting variable live-in in its block (and defined in parallel with other Phi definitions in the block), see e.g. Definition 4 in Ch. 21.2 in [the SSA book draft](https://pfalcon.github.io/ssabook/latest/book-full.pdf). This is also in line with [C2's handling of Phi nodes in liveness analysis](https://github.com/openjdk/jdk/blob/efbad00c4d7931177ccc5e9bce3b30dfbac94010/src/hotspot/share/opto/live.cpp#L128-L147).
>
> > Irrespective of that, would it be feasible to add a "termination dash" at the bottom of the line (e.g. at the bottom of `L8`)?
>
> Yes, that is a good idea, will do, thanks!
Done (commit 31e4510e). This turned out to be a bit more involved than I thought, please check that the changes meet your expectations. Here is an example of how the initial live ranges related to a phi instruction (`106 Phi`) are now visualized:

And here is how the live range `L7` resulting from coalescing `L18`, `L34`, and `L36` is visualized after aggressive coalescing (where SSA is deconstructed):

-------------
PR Comment: https://git.openjdk.org/jdk/pull/23558#issuecomment-2671533097
More information about the hotspot-compiler-dev
mailing list