[PATCH] D112295: [SCEV][NFC] API for tracking of SCEV users

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 22 10:14:17 PDT 2021


reames accepted this revision.
reames added a comment.
This revision is now accepted and ready to land.

LGTM.



================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:13397
+  for (auto *Op : Ops)
+    SCEVUsers[Op].insert(User);
+}
----------------
nikic wrote:
> Something we might want to consider is to not track users of SCEVConstant. I believe this is where things are moving in IR (dropping use lists for ConstantData) and we might want to avoid repeating that mistake from the start.
> 
> I don't think it's possible for a SCEVConstant to ever become invalid (as they are just integers -- constant expressions are SCEVUnknown), so not having SCEVConstant users should not present an issue for invalidation purposes.
I agree with Nikita here.  I'm fine with this either being added before commit (e.g. treating my LGTM as conditional), or a separate follow on commit.  


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112295/new/

https://reviews.llvm.org/D112295



More information about the llvm-commits mailing list