-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cranelift: Break op cost ties with expression depth in egraphs (#7456)
* Cranelift: Switch egraph `Cost` to a struct with named fields Mechanical change. * 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> * Cranelift: Bitpack the egraph `Cost` structure Co-Authored-By: Chris Fallin <chris@cfallin.org> Co-Authored-By: Trevor Elliott <telliott@fastly.com> * Make it so you can't construct `Cost::inifinity()` by accident * Use fold to code golf --------- Co-authored-by: Trevor Elliott <telliott@fastly.com> Co-authored-by: Chris Fallin <chris@cfallin.org>
- Loading branch information
1 parent
54aed0b
commit b9f2a30
Showing
2 changed files
with
97 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters