[PATCH] D70097: [SCEV] Add missing cache queries
Ehud Katz via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 25 23:12:17 PST 2020
ekatz marked an inline comment as done.
ekatz added inline comments.
================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:2455
+ if (SCEV *S = std::get<0>(findExistingSCEVInCache(scAddExpr, Ops))) {
+ static_cast<SCEVAddExpr *>(S)->setNoWrapFlags(Flags);
----------------
loladiro wrote:
> I know we do this in a few other places, but why is this legal? Isn't it possible we're still using the old SCEV somewhere, but without the flags?
That's a question I also had.. I am not an expert of this code, but I wanted to be consistent with all other places, where this flag is set on the cached value.
Maybe someone more familiar with the code can elaborate.
I guess you can raise that question in llvm-dev, but if it is a bug, then we should open a separate one - specific for this.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70097/new/
https://reviews.llvm.org/D70097
More information about the llvm-commits
mailing list