Skip to content

Cranelift: Reassociate long and narrow chains of operations into shallow and wide trees#7466

Merged
fitzgen merged 1 commit into
bytecodealliance:mainfrom
fitzgen:shallow-and-wide
Nov 8, 2023
Merged

Cranelift: Reassociate long and narrow chains of operations into shallow and wide trees#7466
fitzgen merged 1 commit into
bytecodealliance:mainfrom
fitzgen:shallow-and-wide

Conversation

@fitzgen
Copy link
Copy Markdown
Member

@fitzgen fitzgen commented Nov 2, 2023

This increases instruction-level parallelism and shrinks live ranges. It also
canonicalizes into the shallow-and-wide form for reassociating constants
together for cprop.

Depends on #7456

@fitzgen fitzgen requested a review from a team as a code owner November 2, 2023 21:57
@fitzgen fitzgen requested review from elliottt and removed request for a team November 2, 2023 21:57
@github-actions github-actions Bot added cranelift Issues related to the Cranelift code generator isle Related to the ISLE domain-specific language labels Nov 2, 2023
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Nov 2, 2023

Subscribe to Label Action

cc @cfallin, @fitzgen

Details This issue or pull request has been labeled: "cranelift", "isle"

Thus the following users have been cc'd because of the following labels:

  • cfallin: isle
  • fitzgen: isle

To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.

Learn more.

…low and wide trees

This increases instruction-level parallelism and shrinks live ranges. It also
canonicalizes into the shallow-and-wide form for reassociating constants
together for cprop.

Co-Authored-By: Chris Fallin <chris@cfallin.org>
Co-Authored-By: Trevor Elliott <telliott@fastly.com>
@fitzgen fitzgen enabled auto-merge November 8, 2023 00:06
Copy link
Copy Markdown
Member

@elliottt elliottt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@fitzgen fitzgen added this pull request to the merge queue Nov 8, 2023
Merged via the queue into bytecodealliance:main with commit 72534b0 Nov 8, 2023
@fitzgen fitzgen deleted the shallow-and-wide branch November 8, 2023 17:33
fitzgen added a commit to fitzgen/wasmtime that referenced this pull request Dec 3, 2025
…nto shallow and wide trees (bytecodealliance#7466)"

This reverts commit 72534b0.

This mid-end rule was shown to be the root cause of a codegen regression in
bytecodealliance#12106 and we didn't have any
real examples that would improve from this rule, just a theoretical idea of its
benefit. Better to do actual instruction scheduling while lowering and/or during
regalloc than to do hack-y instruction scheduling in the mid-end (where we have
no idea how many registers are available, for example).
github-merge-queue Bot pushed a commit that referenced this pull request Dec 3, 2025
…nto shallow and wide trees (#7466)" (#12116)

* Revert "Cranelift: Reassociate long and narrow chains of operations into shallow and wide trees (#7466)"

This reverts commit 72534b0.

This mid-end rule was shown to be the root cause of a codegen regression in
#12106 and we didn't have any
real examples that would improve from this rule, just a theoretical idea of its
benefit. Better to do actual instruction scheduling while lowering and/or during
regalloc than to do hack-y instruction scheduling in the mid-end (where we have
no idea how many registers are available, for example).

* update disas tests
bongjunj pushed a commit to prosyslab/wasmtime that referenced this pull request Dec 4, 2025
…nto shallow and wide trees (bytecodealliance#7466)" (bytecodealliance#12116)

* Revert "Cranelift: Reassociate long and narrow chains of operations into shallow and wide trees (bytecodealliance#7466)"

This reverts commit 72534b0.

This mid-end rule was shown to be the root cause of a codegen regression in
bytecodealliance#12106 and we didn't have any
real examples that would improve from this rule, just a theoretical idea of its
benefit. Better to do actual instruction scheduling while lowering and/or during
regalloc than to do hack-y instruction scheduling in the mid-end (where we have
no idea how many registers are available, for example).

* update disas tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cranelift Issues related to the Cranelift code generator isle Related to the ISLE domain-specific language

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants