[PATCH] D21720: Unroll for uncountable loops

Evgeny Stupachenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 6 12:26:04 PST 2017


evstupac added a comment.

I'm not sure I can share all the cases, but I've found good public example of "xor" in the loop from jpeg (h2v1_downsample and h2v2_downsample):
https://github.com/cloudflare/jpegtran/blob/master/jcsample.c

For the case above runtime unroll should work fine, but there are cases where loop upper bound is structure field load. If so loop becomes uncountable and we are unable to apply runtime unroll.
Generally there multiple cases when runtime unroll can fail, so why not to force unroll if we can prove profitability?


Repository:
  rL LLVM

https://reviews.llvm.org/D21720





More information about the llvm-commits mailing list