This is an archive of the discontinued LLVM Phabricator instance.

Do not cache AliasSetTracker even in the old PM
AbandonedPublic

Authored by sanjoy on Mar 7 2017, 4:36 PM.

Details

Summary

Fixes PR32129. Test case contributed by Igor Laevsky.

I can't easily think of other ways to safely cache the ASTs. Given
we're going to move to recomputing them in the new PM anyway (unless
there are future plans to not to?), I think it is uncontroversial to
bring the old PM in sync.

If this change is accepted, I'll also delete the code that keeps track
of the Loop->AST mapping. But first I want to know if this change is
acceptable or not.

Event Timeline

sanjoy created this revision.Mar 7 2017, 4:36 PM
hfinkel added a subscriber: hfinkel.Mar 7 2017, 5:34 PM

We're only caching to save on compile time, right? Is there any noticeable compile-time impact?

sanjoy added a comment.Mar 7 2017, 5:38 PM

We're only caching to save on compile time, right? Is there any noticeable compile-time impact?

I'll measure.

chandlerc edited edge metadata.Mar 8 2017, 6:42 PM

We're only caching to save on compile time, right? Is there any noticeable compile-time impact?

I'll measure.

I think this is the critical thing.

My expectation had been to have to add caching back in the new PM to address compile time issues. I think we need to understand how much this impacts compile time.

Certainly, not caching things seems much easier to get correct. ;]

We definitely have testcases where ASTs (in LICM and elsewhere) take ... forever (hundreds of seconds).

If this makes that worse, it'd be bad, but Alina's working on moving LICM to MemorySSA anyway (and i expect will continue when she gets back).
So if it's a temporary hit, and we need it for correctness, ....

sanjoy abandoned this revision.Mar 14 2017, 4:08 PM

Fix implemented as D30849