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

Adding lifted lattice solver #114

Merged
merged 34 commits into from
Dec 8, 2023
Merged

Adding lifted lattice solver #114

merged 34 commits into from
Dec 8, 2023

Conversation

yousifpatti
Copy link
Contributor

Still under dev

@l-kent
Copy link
Contributor

l-kent commented Oct 17, 2023

#86 is already a pull request for this branch.

@l-kent l-kent closed this Oct 17, 2023
@l-kent l-kent reopened this Nov 6, 2023
@l-kent l-kent changed the base branch from analysis-devel to main November 7, 2023 00:56
@yousifpatti yousifpatti force-pushed the yousif-memory-region-analysis branch from 4a5b6c4 to 270eca2 Compare December 5, 2023 00:36
@l-kent
Copy link
Contributor

l-kent commented Dec 5, 2023

Is this ready to look at merging now?

I still don't really understand what the point of the LiftedLattice is for the analyses we have though. I understand that it is intended to show reachability, but why does this matter for the analyses we have, especially the MRA where we don't even need statement-level results?

@yousifpatti
Copy link
Contributor Author

yousifpatti commented Dec 5, 2023

Is this ready to look at merging now?

I still don't really understand what the point of the LiftedLattice is for the analyses we have though. I understand that it is intended to show reachability, but why does this matter for the analyses we have, especially the MRA where we don't even need statement-level results?

MRA will eventually have to be context-sensitive as it will not scale with a function cloning (inlining) approach. As the contexts may be large, we need to infer only regions for contexts that may be feasible (reachable).

I am adding lifted to VSA as well.

@l-kent
Copy link
Contributor

l-kent commented Dec 5, 2023

The MRA as it currently exists is intraprocedural (so reachability is irrelevant), and in effect just gives a set of memory regions per-procedure. It does not need to provide statement-level results at all with how it currently works. An interprocedural version that actually required context-sensitivity would be such a significant overhaul that it doesn't really make sense to add the LiftedLattice to the current version in preparation for that.

@yousifpatti
Copy link
Contributor Author

That's true. We would need an interprocedural version to support contexts. However, VSA currently is interprocedural so it will require the LiftedLattice as it relies on statement-level results (later could have context-sensitivity as well). Adding LiftedLattice to MRA will not cause any issues with the current development process even if it is not directly beneficial until the interprocedural overhaul.

@yousifpatti
Copy link
Contributor Author

It should be ready for merge now

@l-kent
Copy link
Contributor

l-kent commented Dec 6, 2023

But there also isn't any reason to actually add it now? All the MRA does in-effect at present is return a set of all the regions in a procedure. It doesn't even really need to be per-procedure, it could be one set for the whole program and nothing would really change. Even if the VSA and constant propagation are eventually properly made interprocedural, that's not really going to be relevant to the MRA as it currently exists.

@yousifpatti
Copy link
Contributor Author

Do you suggest removing the lifted lattice from MRA and merging the changes to VSA, or close the PR and re-open it when proper interprocedural VSA and constant prop have been established?

@l-kent
Copy link
Contributor

l-kent commented Dec 8, 2023

I will just merge it in for now.

@l-kent l-kent merged commit 4dd8d28 into main Dec 8, 2023
1 check passed
@l-kent l-kent deleted the yousif-memory-region-analysis branch January 22, 2024 04:07
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.

2 participants