[PATCH] Optimize unrolled reductions in LoopStrengthReduce

Olivier Sallenave ohsallen at us.ibm.com
Wed Feb 4 09:14:17 PST 2015


In http://reviews.llvm.org/D7128#118048, @hfinkel wrote:

> I don't understand the problem you're trying to highlight. The loop unroller is run in two places within the standard optimization pipeline. The first place is 'early', within the inliner-driven CGSCC pass manager. When run early, it does *full* unrolling only. It is also run 'late', after the loop vectorizer, when it might also do target-directed partial unrolling. But this is after the loop vectorizer runs, so there should be no conflict.

Thanks for the clarification. What I meant was that it seems harder to change the vectorizer to break dependencies of loops which are already unrolled, rather than not unrolling them in the 'early' pass and let the vectorizer and 'late' unroller do their job. I'll propose a patch that implements the second solution.




More information about the llvm-commits mailing list