[PATCH] D12202: Add Support for Small Size Reductions

James Molloy via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 25 09:48:10 PDT 2015


jmolloy added a comment.

Hi,

I really like the improvements to RecurrenceDescriptor (even if it does extend the truly horrible API - someone needs to get around to making that decent).

I can see how this works. I'm just slightly concerned that it's making reductions a special case, and I can't see how this would be extended to support non-reduction values (like load->arithmetic->store).

The latter is most interesting, because we can't just hand them off to InstCombine to sort out, because InstCombine will only look at chains 6 deep.

I have a patch almost ready that does a similar thing but in a different way. My patch uses the DemandedBits analysis and unions the demanded bits for each def/use chain, then determines if the union of demanded bits allows the entire def/use chain to be truncated (high bits unset).

That said the knowledge you've given RecurrenceDescriptor is really good, because we have a very correlated problem in SLPVectorizer when building horizontal reduction chains.

What are your thoughts about how this approach would scale to non-reductions? Perhaps that might decide which way we go?

Cheers,

James


http://reviews.llvm.org/D12202





More information about the llvm-commits mailing list