[PATCH] D137505: [SCEV] Cache ZExt SCEV expressions.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 8 08:08:57 PST 2022
fhahn added a comment.
The latest update also moves the `FoldID` definition inside ScalarEvolution and the template specialization to the bottom of the file.
================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:1625
+ auto R = FoldCacheUser.insert({S, {}});
+ R.first->second.push_back(ID);
+ }
----------------
nikic wrote:
> I'm a bit uncertain about the invalidation story here. We will invalidate the cache if the folding result is invalidated. We will not invalidate if the original zext operand is invalidated. Could this result in problems?
I think in that case, invalidation of the `ZExt` operand will trigger invalidation of the SCEV for the `ZExt` via the IR use-list based invalidation.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137505/new/
https://reviews.llvm.org/D137505
More information about the llvm-commits
mailing list