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

Extend ifelse lifting to regular SROA #50403

Merged
merged 2 commits into from
Jul 4, 2023
Merged

Extend ifelse lifting to regular SROA #50403

merged 2 commits into from
Jul 4, 2023

Conversation

Keno
Copy link
Member

@Keno Keno commented Jul 3, 2023

It was only active for comparison lifting, but it is sensible for regular SROA also. While I was doing this I also found another oracle undercount bug (fixed here) as well as an overcount bug (#50312 (comment)).

Keno added 2 commits July 3, 2023 21:29
This is a pre-existing bug, but was exposed by my improvements to
SROA.
@Keno Keno requested review from aviatesk and topolarity July 3, 2023 21:32
@oscardssmith oscardssmith added bugfix This change fixes an existing bug compiler:optimizer Optimization passes (mostly in base/compiler/ssair/) labels Jul 3, 2023
field = try_compute_fieldidx_stmt(compact, stmt, struct_typ)
field === nothing && continue

leaves, visited_philikes = collect_leaves(compact, val, struct_typ, 𝕃ₒ)
leaves, visited_philikes = collect_leaves(compact, val, struct_typ, 𝕃ₒ, phi_or_ifelse_predecessors)
Copy link
Member

Choose a reason for hiding this comment

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

Now all callsites of collect_leaves use phi_or_ifelse_predecessors, so I think we can remove this argument entirely.

@Keno Keno merged commit 7fc8646 into master Jul 4, 2023
@Keno Keno deleted the kf/sroaifelseexpand branch July 4, 2023 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This change fixes an existing bug compiler:optimizer Optimization passes (mostly in base/compiler/ssair/)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants