Skip to content

Cranelift: Add a PostDominatorTree#13736

Merged
fitzgen merged 2 commits into
bytecodealliance:mainfrom
fitzgen:cranelift-post-dominators
Jun 26, 2026
Merged

Cranelift: Add a PostDominatorTree#13736
fitzgen merged 2 commits into
bytecodealliance:mainfrom
fitzgen:cranelift-post-dominators

Conversation

@fitzgen

@fitzgen fitzgen commented Jun 25, 2026

Copy link
Copy Markdown
Member

This is the dominator tree of the control-flow graph with its edges reversed. If a post-dominates b, then that means that every path from b to a function exit (return or trap) must go through a.

This required making our core dominator tree computation generic over a &impl DomTreeGraph so that we could reverse edges without actually reifying the reversed control-flow graph.

The PostDominatorTree will be used as part of eliminating dead stores in future commits.

This is the dominator tree of the control-flow graph with its edges reversed. If
`a` post-dominates `b`, then that means that every path from `b` to a function
exit (return or trap) must go through `a`.

This required making our core dominator tree computation generic over a `&impl
DomTreeGraph` so that we could reverse edges without actually reifying the
reversed control-flow graph.

The `PostDominatorTree` will be used as part of eliminating dead stores in
future commits.
@fitzgen fitzgen requested review from a team as code owners June 25, 2026 23:08
@fitzgen fitzgen requested review from cfallin and removed request for a team June 25, 2026 23:08

@cfallin cfallin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@github-actions github-actions Bot added the cranelift Issues related to the Cranelift code generator label Jun 26, 2026
@fitzgen fitzgen enabled auto-merge June 26, 2026 14:05
@fitzgen fitzgen added this pull request to the merge queue Jun 26, 2026
Merged via the queue into bytecodealliance:main with commit a79c4b3 Jun 26, 2026
52 checks passed
@fitzgen fitzgen deleted the cranelift-post-dominators branch June 26, 2026 14:38
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants