Skip to content

Conversation

@eggrobin
Copy link
Contributor

  • On sufficiently complex code, the graph generator would run out of colours, causing dot to produce a black graph, see Figure 1.
  • The LCD backward edges caused dot to reorder the instructions arbitrarily, so that the last instruction in the LCD path ended up in the middle. The last instruction of the LCD path is marked with 👉 in Figures 1–3.
  • The colours were applied in the order in which the paths were found, so that the most critical loop-carried path would not usually be legible in the end: it would have many colours, see Figure 3. Instead, this PR colours vertices and edges based on the latency of the longest LCD cycle going through them, as shown in Figure 4.

The figures are based on code generated by MSVC for an implementation of a cube root. They were generated at various commits in this PR, with the changes from #115 also merged in.

Figure 1 (Current) Figure 2 (Don’t run out of colours)
a b
Figure 3 (Mark backward edges as backward so the graph is ordered like the code) Figure 4 (All changes in this PR)
c d

@JanLJL
Copy link
Collaborator

JanLJL commented Mar 31, 2025

Hi @eggrobin,
this is a really nice feature, thank you for the work and the screenshots for understanding the changes!
The added structures make the graphs much more readable and I couldn't find any problems while testing.

@JanLJL JanLJL merged commit 33fd0a0 into RRZE-HPC:master Mar 31, 2025
4 checks passed
dundarmete pushed a commit that referenced this pull request Jul 4, 2025
Improvements to graph layout and colouring
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants