-
Notifications
You must be signed in to change notification settings - Fork 15
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] Fix RegionAwareMemoryNodeProvider, now based on call graph and handling calls to external #827
Conversation
…ng external calls
|
@haved I am excited to review it, but is there any chance that we could move the iteration wrapper changes into its own PR? |
@phate that is absolutely possible, I can do that |
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first batch of comments. I need to go over it one more time, as I was not able to finish it completely.
@phate I addressed your comments so far |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! The code is very readable and understandable.
There is still the empty TestIteratorWrapper.cpp in the PR that needs to be removed.
I have a question: I do not see that we handle setjmp/longjmp explicitly. Do we handle it correctly?
@phate I created a Regarding |
|
Introduces a call graph creation step to the RegionAwareMemoryProvider, which ensures that all possible call paths are handled, even when going via external function calls.
SCCs are found in this call graph, and they are visited in reverse topological order.
This means that for any function call found during the "annotation" step, it either points to a function in an earlier SCC which is already finished, or in the same SCC. In the latter case a flag is used to remember that the call may be recursive.
RegionSummaries also remember if they may contain recursion. Once all functions have been annotated, a final pass goes through all summaries that may contain recursion, and add the whole SCC's summary of memory locations to it.
These changes made the encoding more precise in some of the tests, so they have been updated to account for that.
Testing the llvm-test-suite with
--AAAndersenRegionAware
passes on all tests, though I managed to get the encoder to fail when combining--AAAndersenRegionAware
with other passes. I felt this PR was large enough already, so fixing encoder issues is not done here.I am adding the [AndersenAgnostic] on this PR, but that is only because [AndersenRegionAware] does not exist yet.