This is an archive of the discontinued LLVM Phabricator instance.

[PM] Fix proxy invalidation
ClosedPublic

Authored by philip.pfaffe on Aug 2 2017, 5:29 AM.

Details

Summary

I made a mistake in handling transitive invalidation of analysis results. I've updated the list of preserved analyses as well as the correct result dependences.

Diff Detail

Repository
rL LLVM

Event Timeline

philip.pfaffe created this revision.Aug 2 2017, 5:29 AM
grosser edited edge metadata.Aug 2 2017, 5:50 AM

Hi Philip,

could you explain what the mistake was and how it is resolved. The commit messages are an important way to educate people. It would be great if you could add some of your findings.

Best,
Tobias

The Invalidator passed through the invalidate() path can be used to transitively invalidate analyses. It frequently happens that analysis results depend on other analyses, and thus store references to their results. When the dependee now gets invalidated, the depender needs to be invalidated as well. This is the purpose of the Invalidator object, which can be used to check whether some dependee analysis is in the process of being invalidated. I originally was checking the wrong dependee analyses, which is an actual error, you can only check analysis results that are in the cache (which they are if you've captured their reference). The invalidation I'm handling inside the proxy deals with the standard analyses the proxy passes into the Scop pipeline, since I'm capturing their reference.

This checking allows us to actually preserve a couple of results outside of the proxy, since the Scop pipeline shouldn't break those, or otherwise should update them accordingly (though this requires some further discussion).

grosser accepted this revision.Aug 2 2017, 6:11 AM

LGTM. Can you add this to the commit message?

This revision is now accepted and ready to land.Aug 2 2017, 6:11 AM
This revision was automatically updated to reflect the committed changes.