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

[NewOptimizer] Domsort basic blocks #26306

Merged
merged 1 commit into from
Mar 5, 2018
Merged

[NewOptimizer] Domsort basic blocks #26306

merged 1 commit into from
Mar 5, 2018

Conversation

Keno
Copy link
Member

@Keno Keno commented Mar 3, 2018

This sorts basic blocks into dominance order right after SSA construction.
Doing so has the benefit that linear traversals of the function
automatically become reverse post order traversals, or in other words,
we're guaranteed that during a linear traversal, we see any SSA
definitions before uses of those SSA values. This property is a prerequisite
for the incremental compactor to work correctly without back tracking.
It should also allow for simplifying codegen later, though not until
the new IR is the only thing supported by codegen.

Fixes core/asyncmap tests with the new optimizer enabled. I believe
those were the last tests that caused invalid IR generation (there's
still a few test failures due to the disabled alloc elim pass).

This sorts basic blocks into dominance order right after SSA construction.
Doing so has the benefit that linear traversals of the function
automatically become reverse post order traversals, or in other words,
we're guaranteed that during a linear traversal, we see any SSA
definitions before uses of those SSA values. This property is a prerequisite
for the incremental compactor to work correctly without back tracking.
It should also allow for simplifying codegen later, though not until
the new IR is the only thing supported by codegen.

Fixes core/asyncmap tests with the new optimizer enabled. I believe
those were the last tests that caused invalid IR generation (there's
still a few test failures due to the disabled alloc elim pass).
@ararslan ararslan added the compiler:optimizer Optimization passes (mostly in base/compiler/ssair/) label Mar 3, 2018
@Keno
Copy link
Member Author

Keno commented Mar 5, 2018

I have more work to put in on top of this, so merging this.

@Keno Keno merged commit 3e94518 into master Mar 5, 2018
@StefanKarpinski StefanKarpinski deleted the kf/domsort branch March 5, 2018 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:optimizer Optimization passes (mostly in base/compiler/ssair/)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants