Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cranelift: Break op cost ties with expression depth in egraphs #7456

Merged
merged 5 commits into from
Nov 7, 2023

Commits on Nov 7, 2023

  1. Cranelift: Switch egraph Cost to a struct with named fields

    Mechanical change.
    fitzgen committed Nov 7, 2023
    Configuration menu
    Copy the full SHA
    4948ae5 View commit details
    Browse the repository at this point in the history
  2. Cranelift: Break op cost ties with expression depth in egraphs

    This means that, when the opcode cost is the same, we prefer shallow and wide
    expressions to narrow and deep. For example, `(a + b) + (c + d)` is preferred to
    `((a + b) + c) + d`. This is beneficial because it exposes more
    instruction-level parallelism and shortens live ranges.
    
    Co-Authored-By: Trevor Elliott <telliott@fastly.com>
    fitzgen and elliottt committed Nov 7, 2023
    Configuration menu
    Copy the full SHA
    73abf7a View commit details
    Browse the repository at this point in the history
  3. Cranelift: Bitpack the egraph Cost structure

    Co-Authored-By: Chris Fallin <chris@cfallin.org>
    Co-Authored-By: Trevor Elliott <telliott@fastly.com>
    3 people committed Nov 7, 2023
    Configuration menu
    Copy the full SHA
    86a9864 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e88d7e7 View commit details
    Browse the repository at this point in the history
  5. Use fold to code golf

    fitzgen committed Nov 7, 2023
    Configuration menu
    Copy the full SHA
    bfe8a95 View commit details
    Browse the repository at this point in the history