phate / jlm

GNU Lesser General Public License v2.1
49 stars 13 forks source link

Confusing naming of arguments and results in RVSDG dot graph #626

Open phate opened 2 days ago

phate commented 2 days ago

The arguments and results of a gamma node in an RVSDG dot graph are named confusing:

image

The corresponding arguments in graph10 and graph11 above represent the same variable (a19 and a21 represent the same variable, as well as a20 and a22), but are named differently. I would have expected the same name in graph10 and graph11.

A similar problem exists for the results. I would have expected that r6 and r7 is named the same.

haved commented 2 days ago

Hmm, you bring up a good point. The arguments and results you refer to belong to different graphs, and as such have different IDs. That being said, there is no requirement that the label is the same as the id. They already have an attribute referring to the structural input/output.

Would you prefer that the arguments get a label corresponding to the input's unique ID, or a per-structural node index? You can always click the node to get more info, so I think maybe using a0, a1, a2 etc for all regions could make sense? Or some kind of debug string telling you if it is a context variable or not?