Change binary op tree display#20045
Conversation
|
Some other random examples using the new format: |
|
IMHO this arrangement of operands is easier to read. If something could be done with connecting lines (some ascii or utf-8 characters?) it would be great. |
Set environment variable |
|
FWIW I remember that you can set on windows _setmode(_fileno(stdout), _O_U8TEXT);IMHO we should default to utf-8 output and use |
If you do that then you cannot use |
|
@dotnet-bot test Ubuntu arm Cross Checked Innerloop Build and Test |
|
@dotnet-bot test Ubuntu x64 Checked CoreFX Tests |
|
@dotnet/jit-contrib Do we want to make this change? Maybe vote with emojis at the top? |
|
I also find this more readable, and it makes the front-end dumps more consistent with the LIR dumps. |
|
Rebased to fix conflicts in case you decide to merge this. |
|
Given two approving reviews, and no objections, I'm going to merge this. |
|
That change needs to be reflected in https://github.com/dotnet/coreclr/blob/master/Documentation/botr/ryujit-overview.md#reading-expression-trees, before we were used to lean my head to the left and read left node as the left node (and the first in execution order except for ASG) and right as the right. Now it is not clear how to read them.. the first child is the left one, the second child is the right one. |
If you lean your head to the right instead (opposite direction as before), then it matches again (first child would be the left node and second child is the right one). |
|
@sandreenko - good point about updating the documentation. |
But then the parent is "below" the children - that's just a bit too weird ;-) |
Yikes, I didn't realize there is documentation explaining how to read trees 😄
There's no left or right, there's only See #25040 for doc update. |
|
And FWIW I'm tempted to try displaying the tree upside down so it more closely matches the actual execution order. But that will have to wait for |
Commit migrated from dotnet/coreclr@2eeeac5
This might be debatable but I find this
more readable than this
Unary ops display their sole operand below them, n-ary ops display all their operands below them as well, binary ops display op2 above and op1 below. Just to make ordering more messier than it already is.