This is an archive of the discontinued LLVM Phabricator instance.

[BasicAA] Remove support for PhiValues analysis
ClosedPublic

Authored by nikic on Dec 9 2022, 7:58 AM.

Details

Summary

BasicAA currently has an optional dependency on the PhiValues analysis. However, at least with our current pipeline setup, we never actually make use of it. It's possible that this used to work with the legacy pass manager, but I'm not sure of that either.

Given that this analysis has not actually been in use for a long time, and nobody noticed or complained, I think we should drop support for it and focus on one code path. It is worth noting that analysis quality for the non-PhiValues case has significantly improved in the meantime.

If we really wanted to make use of PhiValues, the right way would probably be to pass it in via AAQI in places we want to use it, rather than using an optional pass manager dependency (which are an unpredictable PITA and should really only ever be used for analyses that are only preserved and not used).

Diff Detail

Event Timeline

nikic created this revision.Dec 9 2022, 7:58 AM
nikic requested review of this revision.Dec 9 2022, 7:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 9 2022, 7:58 AM

Seems reasonable to me.

llvm/lib/Analysis/BasicAliasAnalysis.cpp
1359

FWIW, this was added 4years ago via https://reviews.llvm.org/D44564. It's safe to say we didn't move towards enabling it all the time.

reames accepted this revision.Dec 9 2022, 11:29 AM

LGTM, removing dead code is always worthwhile.

This revision is now accepted and ready to land.Dec 9 2022, 11:29 AM
fhahn added a comment.Dec 9 2022, 3:23 PM

LGTM, thanks for the cleanup!

This revision was automatically updated to reflect the committed changes.