[PATCH] D114176: [SCEV] Look through invertible functions when infering no-self-wrap from mustprogres
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 18 10:31:30 PST 2021
reames created this revision.
reames added reviewers: fhahn, nikic, lebedev.ri, efriedma.
Herald added subscribers: javed.absar, bollu, hiraditya, mcrosier.
reames requested review of this revision.
Herald added a project: LLVM.
This is an extension to the logic introduced with D103991 <https://reviews.llvm.org/D103991>. The basic idea is that any invertible function of a repeating sequence is itself a repeating sequence, and that since invertible functions are 1-to-1, we can conclude that a wrapped IV can't cycle.
Note that this only shows benefit for predicated SCEV results. The missing piece to directly influence trip counts is rebuilding the invertible chain using the newly inferred flags. That'll be a separate change. :)
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D114176
Files:
llvm/lib/Analysis/ScalarEvolution.cpp
llvm/test/Analysis/ScalarEvolution/ne-overflow.ll
llvm/test/Analysis/ScalarEvolution/trip-count-implied-addrec.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114176.388255.patch
Type: text/x-patch
Size: 4996 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211118/20983b25/attachment.bin>
More information about the llvm-commits
mailing list