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

ir: Respect GlobalRef lattice elements #48151

Merged
merged 1 commit into from
Jan 6, 2023
Merged

ir: Respect GlobalRef lattice elements #48151

merged 1 commit into from
Jan 6, 2023

Conversation

Keno
Copy link
Member

@Keno Keno commented Jan 6, 2023

Currently IncrementalCompact recomputes the type of globals on every iteration. There is not much reason to do this - the type of a global cannot change. In addition, external abstract interpreters may want to inject custom, more precise lattice elements for globals, which should be respected. Overall, this should be both faster and better for external absint, though of course GlobalRefs now need to be inserted into the IR with the correct type. If there's any callsites that don't do that, those would have to be updated.

Currently IncrementalCompact recomputes the type of globals on every iteration.
There is not much reason to do this - the type of a global cannot change.
In addition, external abstract interpreters may want to inject custom, more
precise lattice elements for globals, which should be respected.
Overall, this should be both faster and better for external absint,
though of course GlobalRefs now need to be inserted into the IR with the
correct type. If there's any callsites that don't do that, those would
have to be updated.
@Keno Keno requested a review from aviatesk January 6, 2023 00:26
@@ -1244,7 +1244,6 @@ function process_node!(compact::IncrementalCompact, result_idx::Int, inst::Instr
ssa_rename[idx] = stmt
else
result[result_idx][:inst] = stmt
result[result_idx][:type] = argextype(stmt, compact)
result[result_idx][:flag] = flag
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

We just took this value from there. Why are we explicitly assigning it back?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't know, doesn't make much sense to me. I guess maybe we used to modify it here?

@Keno Keno merged commit b76fdcc into master Jan 6, 2023
@Keno Keno deleted the kf/greflattice branch January 6, 2023 22:50
Keno added a commit that referenced this pull request Jan 6, 2023
Rolls up individual review comments from #48066, #48144, #48151.
Keno added a commit that referenced this pull request Jan 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants