[PATCH] Optimize unrolled reductions in LoopStrengthReduce

Olivier Sallenave ohsallen at us.ibm.com
Thu Jan 22 11:36:22 PST 2015


Quentin,

Thanks for the feedback. This makes sense and I agree. When the unrolling factor is N, N additional registers are live in the loop range, so typically we could have some limit (depending on the target and/or register pressure as you suggest) and partially apply the optimization on the loop in some cases.

I'll look into the performance of the test-suite.

Olivier

In http://reviews.llvm.org/D7128#112267, @qcolombet wrote:

> Hi Olivier,
>
> AFAIK, most, if not all, heuristics in LSR are careful not to increase register pressure. You can see that, in particular, when we rate the formulae.
>  On the other hand, your optimization increases the register pressure for the whole loop. This may not be a good idea in general.
>
> Ultimately, I would like we have some kind of register pressure estimation to decide whether or not we should perform the transformation for a given loop.
>  Short term, it should, in my opinion, be at least parameterized on the target, i.e., we should have a target hook to decide whether or not we want to perform this optimization.
>
> Side question, how does this patch impact the performances on the llvm test-suite?
>
> Thanks,
> -Quentin





http://reviews.llvm.org/D7128

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list