[PATCH] D80081: [LoopUnroll] Reset PeelCount on exit before computePeelCount.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 19 12:03:10 PDT 2020


fhahn added a comment.

In D80081#2040804 <https://reviews.llvm.org/D80081#2040804>, @efriedma wrote:

> If there are separate values "desired peel count" and "actual number of times we've decided to peel", I'd prefer to store them in separate variables; resetting the peel count like this seems overly complicated.


yeah, it would be cleaner to have 2 variables. I'll update the patch.

>> Note that now it is not possible to combine peeling and unrolling in the same step using LoopUnrollPass I think, hence the test changes.
> 
> Do we want to allow this?  It seems reasonable to both peel and partially unroll a loop, although we probably want compute the unrolll cost on the peeled loop.

Currently we mostly peel if it simplifies a condition in the body, which would make sense to combine with partial unrolling. I think computing the unroll cost on the peeled loop might require some more work given he current code structure, but it would be an interesting follow-up.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80081/new/

https://reviews.llvm.org/D80081





More information about the llvm-commits mailing list