Skip to content
@SeaOfNodes

Sea of Nodes

A Sea of Nodes IR Tutorial

Simple - A Sea-of-Nodes Compiler IR Tutorial

Each repo is a port of the Simple compiler from its original Java port, to various other languages.

What's a Sea of Nodes IR?

The Sea of Nodes IR is a ... compiler IR (Intermediate Representation) pioneered by Cliff Click starting around 1990, appearing as an appendix in his thesis. It became the core IR in the HotSpot C2 JIT compiler, and very quickly produces high quality code.
C2 and the Sea of Nodes is used today in nearly every JVM on the planet - and runs literally trillions of times daily. The IR inspired Google's V8 team (and thus is/has been in Chrome), the Graal compiler and other high profile compiler efforts.

Despite this Sea of Nodes is not (to my knowledge) taught in compiler classes! This is our effort to teach the compiler community the how's and why's of the Sea of Nodes.

Current ports (Sept 2024):

Reading material:

Cliff Click's Phd Thesis.
The Main part discusses combining optimizations which is used in e.g. C2 at least.
The appendix starting on page 119 has a long discussion on engineering choices in the Sea of Nodes and is probably more relavent here:

A lighter read:

Also:

The core Global Code Motion algorithm to unwind from the Sea of Nodes:

Popular repositories Loading

  1. Simple Simple Public

    A Simple showcase for the Sea-of-Nodes compiler IR

    Java 497 38

  2. Simple-Rust Simple-Rust Public

    Rust 13

  3. Simple-Cpp Simple-Cpp Public

    C++ 6 1

  4. Simple-Go Simple-Go Public

    Go 2 1

  5. .github .github Public

Repositories

Showing 5 of 5 repositories
  • Simple Public

    A Simple showcase for the Sea-of-Nodes compiler IR

    SeaOfNodes/Simple’s past year of commit activity
    Java 497 Apache-2.0 38 3 2 Updated Feb 26, 2025
  • Simple-Rust Public
    SeaOfNodes/Simple-Rust’s past year of commit activity
    Rust 13 Apache-2.0 0 0 0 Updated Feb 22, 2025
  • Simple-Cpp Public
    SeaOfNodes/Simple-Cpp’s past year of commit activity
    C++ 6 1 0 0 Updated Jan 22, 2025
  • Simple-Go Public
    SeaOfNodes/Simple-Go’s past year of commit activity
    Go 2 1 0 0 Updated Oct 13, 2024
  • .github Public
    SeaOfNodes/.github’s past year of commit activity
    0 Apache-2.0 0 0 0 Updated Sep 21, 2024

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Loading…

Most used topics

Loading…