[PATCH] D111602: [SCEV][NFC] Tackle quadratic CT consumption when forgetting memoized results
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 21 09:47:16 PDT 2021
reames added a comment.
Two minor opportunities to exploit set invalidation for efficiency. I'll leave it to you whether these are worth separate review or not.
================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:12839
std::pair<const SCEV *, const Loop *> Entry = I->first;
if (Entry.first == S)
PredicatedSCEVRewrites.erase(I++);
----------------
There's an opportunity to exploit the invalidation of sets at a time here by replacing multiple walks, with one walk and a set membership check.
================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:12849
BackedgeTakenInfo &BEInfo = I->second;
if (BEInfo.hasOperand(S))
Map.erase(I++);
----------------
Same here. Though, I don't believe we have an set optimized contains_any already, so this might not be worth bothering with.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111602/new/
https://reviews.llvm.org/D111602
More information about the llvm-commits
mailing list