[PATCH] D33089: [Polly] Generate more 'canonical' induction variable if we can prove there is no overflow.

Hongbin Zheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 10 20:53:47 PDT 2017


etherzhhb created this revision.

Today Polly generates induction variable in this way:

polly.indvar = phi 0, polly.indvar.next
...
polly.indvar.next = polly.indvar + stide
polly.loop_cond =  predicate polly.indvar, (UB - stride)

Instead of:

polly.indvar = phi 0, polly.indvar.next
...
polly.indvar.next = polly.indvar + stide
polly.loop_cond =  predicate polly.indvar.next, UB

The way Polly generate induction variable cause some problem in the indvar simplify pass. 
This patch make polly generate the later form if possible


Repository:
  rL LLVM

https://reviews.llvm.org/D33089

Files:
  lib/CodeGen/LoopGenerators.cpp
  test/Isl/CodeGen/LoopParallelMD/loop_nest_param_parallel.ll
  test/Isl/CodeGen/MemAccess/generate-all.ll
  test/Isl/CodeGen/non_affine_float_compare.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33089.98577.patch
Type: text/x-patch
Size: 5270 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170511/0627db28/attachment.bin>


More information about the llvm-commits mailing list