[PATCH] D30086: Add generic IR vector reductions

Renato Golin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 2 11:12:23 PDT 2017


rengolin added a comment.

In https://reviews.llvm.org/D30086#743350, @aemerson wrote:

> Ok, so I've restructured the two functions a bit so that the simple (non minmax) reductions are generated from the `createSimpleTargetReduction()` function and the recurrence descriptor uses that for the simple cases, passing in the opcode.


But they're still two functions doing the same thing, with different arguments...

Maybe I'm not expressing myself right.

What I mean is, keep `createSimpleTargetReduction` as it is, then make `createTargetReduction` just massage the parameters (get opcode, flags) and pass to `createSimpleTargetReduction`, returning whatever value it does. Ie. `createTargetReduction` is just a wrapper to `createSimpleTargetReduction`.

You may need to add some functionality to `createSimpleTargetReduction` so that it does what `createTargetReduction` needs, in addition to what it needs, but that's ok. Right now their implementations are still near identical.

cheers,
--renato


Repository:
  rL LLVM

https://reviews.llvm.org/D30086





More information about the llvm-commits mailing list