[PATCH] D31613: [LoopPeeling] Get rid of Phis that become invariant after N steps

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 27 13:26:02 PDT 2017


lebedev.ri added a comment.

@mkazantsev hi.
I have encountered a missing peeling <https://bugs.llvm.org/show_bug.cgi?id=34364> issue, and here is the most simplified version of the code: https://godbolt.org/g/xZgb4T
If i manually use `opt`, and specify `-loop-unroll -unroll-force-peel-count=2`, the peeling happens as i would expect.
Which i suppose means, only the analysis (`calculateIterationsToInvariance()`) does not support that pattern.
If i change the line `117` of this diff of that function with something like:

  -  }
  +  } else ToInvariance = 2u; 

it also peels that case correctly, so i do think it is just an analysis problem.

Do you plan on working on the loop peeling again anytime soon?
If yes, then i guess i should not worry.
If not, any pointers? :)


Repository:
  rL LLVM

https://reviews.llvm.org/D31613





More information about the llvm-commits mailing list