Shopify / seafoam

A tool for working with compiler graphs dumped by the GraalVM compiler
MIT License
126 stars 22 forks source link

Hide BeginNode/EndNode and use a finer-grained coloring scheme for effect nodes #59

Closed eregon closed 2 years ago

eregon commented 2 years ago

Fixes https://github.com/Shopify/seafoam/issues/45.

examples/ruby/example_instance_of.bgv:5: Before: old After: new


examples/ruby/example_while_break.bgv:5: Before: old After: new


examples/graalvm-ce-java11-21.2.0/fib-ruby.bgv.gz:3: Before: old After: new


"Empty if": Before: old After: new

eregon commented 2 years ago

I added svg graphs to compare before/after.

eregon commented 2 years ago

In mid-tier we have BeginNodes with multiple output edges: Screenshot from 2022-08-26 17-01-27

Should we leave those in the graph? To remove them we'd need more logic to choose which edge properties to prefer. And also then those anchor would be on the if and not only on the Begin of the F (false) branch. So I guess better leave them in if multiple inputs or outputs edges.

chrisseaton commented 2 years ago

Leave them in unless they're very simple.

chrisseaton commented 2 years ago

Not convinced about this purple but I'll merge it for now.

eregon commented 2 years ago

Not convinced about this purple but I'll merge it for now.

Feel free to tweak. I think I'll take anything except red for memory accesses, because red is already used for control flow and control flow is completely unrelated to memory accesses.

chrisseaton commented 2 years ago

control flow is completely unrelated to memory accesses

Both are usually fixed, that's why.