This is an archive of the discontinued LLVM Phabricator instance.

[GlobalsModRef] Add invalidate method
ClosedPublic

Authored by asbirlea on Jan 15 2020, 5:20 PM.

Details

Summary

Add invalidate method to GlobalsAA.

Diff Detail

Event Timeline

asbirlea created this revision.Jan 15 2020, 5:20 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 15 2020, 5:20 PM
MaskRay added inline comments.
llvm/lib/Analysis/GlobalsModRef.cpp
813

M can be omitted as well.

Is this a bugfix and should there be a test case?

Not a bug fix, but a prerequisite for a change I'm working on for the new pass manager, requiring all passes to have an invalidate method.
I sent it for review to get another pair of eyes on the invalidate implementation in case I missed something.

Not a bug fix, but a prerequisite for a change I'm working on for the new pass manager, requiring all passes to have an invalidate method.
I sent it for review to get another pair of eyes on the invalidate implementation in case I missed something.

Ok thanks. Can you add a comment to it explaining the rationale, I see that the existing invalidate methods tend to comment on when/why they are invalidated.
I'm unfortunately not very familiar with this aspect of the pass manager, but the change seems reasonable (I assume we were never invalidating before?).

asbirlea updated this revision to Diff 238531.Jan 16 2020, 9:41 AM
asbirlea marked an inline comment as done.

Address comment.

asbirlea updated this revision to Diff 238534.Jan 16 2020, 9:49 AM

Add comment explaining invalidate rational.
GlobalsAA is stateless and is preserved, unless it's explicitly invalidated.

tejohnson accepted this revision.Jan 16 2020, 9:56 AM

LGTM. Thanks for the explanation.

This revision is now accepted and ready to land.Jan 16 2020, 9:56 AM
MaskRay accepted this revision.Jan 16 2020, 6:08 PM
This revision was automatically updated to reflect the committed changes.
thakis added a subscriber: thakis.Jan 17 2020, 10:45 AM

This breaks check-clang everywhere, see e.g. http://45.33.8.238/linux/7798/step_7.txt