Details
- Reviewers
reames majnemer atrick hfinkel - Commits
- rGb174f9a31658: [SCEV] Reapply 'Teach isLoopBackedgeGuardedByCond to exploit trip counts'
rGd706fa8a0c28: [SCEV] Teach isLoopBackedgeGuardedByCond to exploit trip counts.
rL248638: [SCEV] Reapply 'Teach isLoopBackedgeGuardedByCond to exploit trip counts'
rL248608: [SCEV] Teach isLoopBackedgeGuardedByCond to exploit trip counts.
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Analysis/ScalarEvolution.cpp | ||
---|---|---|
7008 ↗ | (On Diff #35133) | already computed => already-computed |
7010 ↗ | (On Diff #35133) | It seems like we should add a comment in ScalarEvolution.h somewhere that isLoopBackedgeGuardedByCond will potentially-return more-accurate answers if you compute the look trip count first. This seems unfortunate, but I suppose we can't force the trip-count computation here because we might infinitely recurse? |
7019 ↗ | (On Diff #35133) | Don't we know that SCEV::FlagNW | SCEV::FlagNUW here? Otherwise, it would not really be a trip count, would it? |
lib/Analysis/ScalarEvolution.cpp | ||
---|---|---|
7010 ↗ | (On Diff #35133) |
My motivation was to avoid burning excessive compile time computing Btw, I don't think we'll end up with infinite recursion here. If |
7019 ↗ | (On Diff #35133) | Yes, will fix. |
- address hal's review. Making the loop counter <nw> and <nuw> changed the output of an existing test case (zext-wrap.ll) -- an induction variable is now reported as <nw> when it wasn't before. This inference is correct, so I didn't actually bother trying to verify further.