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

[AndersenAgnostic] Backport fixes and expanded statistics for Andersen analysis #652

Merged
merged 6 commits into from
Oct 10, 2024

Conversation

haved
Copy link
Collaborator

@haved haved commented Oct 9, 2024

During work on the andersen-no-flags branch, some other changes were made as I discovered issues or wanted more statistics:

  • There was a bug where Hybrid Cycle Detection could invalidate an iterator while using it.
  • The topological Worklist algorithm has been made slightly less terrible by actually tracking work items now, and only visiting nodes that need to be visited during the sweep. The ObserverWorklist is now called the WorkSet instead, as that name describes its new job (an unordered worklist) better. This is likely closer to what has been done by Pearce07, but it still does not make it the best worklist iteration order.
  • Make the JLM_ANDERSEN_TEST_ALL_CONFIGS environment variable take an integer controlling the amount of iterations each config should be used.

The bulk of this PR is related to getting more statistics:

  • Count attempts at growing points-to sets, as well as how many items are removed from points-to sets during solving (e.g due to unification or PIP).
  • Add code to the PointsToGraph class to count the number of edges, as well as the number of pointer-pointee relations, since RegisterNodes can represent multiple registers at once.
  • Add the flag CanPoint() to PointerObjects to formalize the existence of memory objects whose points-to sets we do not track (such as int a). This makes the statistics more useful and comparable, as well as removing potentially tons of edges in the PointsToGraph going out from these memory objects.
  • Add statistics for counting pointer-pointee relations to be able to say something about precision, regardless of unification.

This PR ended up being a bit larger than I wanted, let me know if you want it split up

@haved haved requested a review from phate October 9, 2024 09:28
@haved haved changed the title Backport fixes and expanded statistics for Andersen analysis [AndersenAgnostic] Backport fixes and expanded statistics for Andersen analysis Oct 9, 2024
@haved haved merged commit d6fdf5e into master Oct 10, 2024
11 checks passed
@haved haved deleted the andersen-backport-fixes branch October 10, 2024 06:14
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