[PATCH] D66242: [POC][SCEV] Bounds for loop invariant exits
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 14 12:49:43 PDT 2019
reames created this revision.
reames added reviewers: nikic, apilipenko, sanjoy.
Herald added subscribers: bollu, mcrosier.
Herald added a project: LLVM.
I noticed in one of the test updates for rL368898 <https://reviews.llvm.org/rL368898> that we hadn't been able to compute a backedge taken count for a loop with a constant exit. This seems unfortunate, so I took a stab at a solution.
At the moment, this isn't ready to go in, I'm mostly looking for feedback on the idea and approach. Is this a good idea? Should I restrict it to only constants? Should this be done somewhere else?
One point I'm a bit concerned about is whether setting the exact count to an arbitrary unreachable value breaks some assumption. I can't think of any, but...
If this is the direction we want to take, I'll do the following:
- Autogen a couple of tests which need updated
- Submit an NFC which computes the max BE taken count in a pre-loop to the main one which tracks computable exits.
- Rebase this on top of both of the above for actual review.
Repository:
rL LLVM
https://reviews.llvm.org/D66242
Files:
lib/Analysis/ScalarEvolution.cpp
test/Analysis/ScalarEvolution/finite-exit-count.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66242.215204.patch
Type: text/x-patch
Size: 10582 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190814/a6554588/attachment.bin>
More information about the llvm-commits
mailing list