forked from OSchip/llvm-project
[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:
parent
fea4a48c0b
commit
1c18ebb2cc
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue