[PATCH] D81416: [LV] Interleave to expose ILP for small loops with scalar reductions.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 21 12:38:09 PDT 2020


fhahn added a comment.

In D81416#2231013 <https://reviews.llvm.org/D81416#2231013>, @fhahn wrote:

> In D81416#2230857 <https://reviews.llvm.org/D81416#2230857>, @AaronLiu wrote:
>
>> In D81416#2230628 <https://reviews.llvm.org/D81416#2230628>, @fhahn wrote:
>>
>>> Just to double check, wouldn't it be sufficient if loop-unroll would unroll the loop? Or is this not happening? It seems like `loop-unroll` would unroll the loop in the test-case.
>>
>> It would unroll the loop in the testcase, but it will not break dependence and expose ILP, will not help performance, and actually unroll hurt performance in this case.
>
> I didn't took a very close look, but wouldnt unrolling generate similar code as interleaving, modulo different order of instructions,  but with similar compute instructions trees?

But I think unrolling with runtime trip counts can generate a bit more overhead around the loop than interleaving in this case, so interleaving should be better in that case.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81416/new/

https://reviews.llvm.org/D81416



More information about the llvm-commits mailing list