Closed amonakov closed 1 year ago
The add instruction reads RAX and writes the carry flag (this is the forward edge); the adc instruction reads the carry flag and writes RAX (this is the backward edge).
Ah, sorry... Thanks for the explanation. I take it the items in a rectangle correspond just to instruction inputs (and outputs are not explicitly visible)?
Out of curiosity, have you explored other ways to visualize the dependency graph?
I take it the items in a rectangle correspond just to instruction inputs (and outputs are not explicitly visible)?
Yes, they are only implicitly visible as the input to the next instruction (and outputs that are never read are ignored, as they are not really relevant in this context).
Out of curiosity, have you explored other ways to visualize the dependency graph?
I have tried a few ways, and this was the best I could find so far. But there is certainly room for improvement.
For the following testcase (short link: https://bit.ly/3v1QfWV )
There's the expected critical path over RAX updates, plus unexpected two-cycle critical path that goes over the carry flag:
I'm surprised to see the backward edge from CF to the first instruction there.