
6/2/2020
What this post added
This post introduces the concept of sea-of-nodes graphs as an intermediate representation used by the TruffleRuby JIT compiler. It explains the structure of these graphs, differentiating between control flow (red arrows) and data flow (green arrows), and between imperative (red boxes) and pure (green boxes) operations. It demonstrates how these graphs enable optimizations like de-duplication of common expressions (global value numbering) and floating expressions, and how they represent loops. The post also discusses the challenges of programming directly with graphs and highlights Shopify's efforts to build tools for visualizing and decompiling these graphs back to Ruby code to aid developer understanding of compiler optimizations.