This is an archive of the discontinued LLVM Phabricator instance.

[POC][SCEV] Bounds for loop invariant exits
AbandonedPublic

Authored by reames on Aug 14 2019, 12:49 PM.

Details

Summary

I noticed in one of the test updates for 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.

Diff Detail

Event Timeline

reames created this revision.Aug 14 2019, 12:49 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 14 2019, 12:49 PM
reames abandoned this revision.Oct 15 2021, 11:57 AM

Abandoning an old review I'm not going to return to any time soon.