[PATCH] D114784: [SCEV] Track backedge taken count users (NFCI)
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 30 09:39:02 PST 2021
nikic added inline comments.
================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:7891
"No point in having a non-constant max backedge taken count!");
-
- SCEVRecordOperands RecordOperands(Operands);
----------------
reames wrote:
> Basic idea makes sense, but I really think the user tracking should be here. Much easier to tell for sure we caught everything.
>
> For one thing, you don't appear to be tracking the constantmax information in your patch, and I think we do need to add that.
> Basic idea makes sense, but I really think the user tracking should be here. Much easier to tell for sure we caught everything.
Generally agree -- reason I didn't put it in here is that the user tracking is on ScalarEvolution, so we'd have to pass it in and make BackedgeTakenInfo a friend class. The resulting layering seems a bit odd.
> For one thing, you don't appear to be tracking the constantmax information in your patch, and I think we do need to add that.
I intentionally dropped the ConstantMax part, because it always stores a SCEVConstant, which can never be invalidated (for ExactNotTaken, only non-SCEVConstants are tracked as well). We don't track ENT.MaxNotTaken (both before and after this patch) for the same reason, it's always constant.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114784/new/
https://reviews.llvm.org/D114784
More information about the llvm-commits
mailing list