[NFC][SCEV] Do not track users of SCEVConstants

Follow-up from D112295, suggested by Nikita: we can avoid tracking
users of SCEVConstants because dropping their cached info is unlikely
to give any new prospects for fact inference, and it should not introduce
any correctness problems.
This commit is contained in:
Max Kazantsev 2021-10-25 12:30:46 +07:00
parent fea4a48c0b
commit 1c18ebb2cc
1 changed files with 5 additions and 1 deletions

View File

@ -13304,6 +13304,10 @@ PredicatedScalarEvolution::PredicatedScalarEvolution(ScalarEvolution &SE,
void ScalarEvolution::registerUser(const SCEV *User,
ArrayRef<const SCEV *> Ops) {
for (auto *Op : Ops)
// We do not expect that forgetting cached data for SCEVConstants will ever
// open any prospects for sharpening or introduce any correctness issues,
// so we don't bother storing their dependencies.
if (!isa<SCEVConstant>(Op))
SCEVUsers[Op].insert(User);
}