[LLVMdev] Detecting reduction operations
David Greene
dag at cray.com
Tue Oct 13 08:39:13 PDT 2009
On Tuesday 13 October 2009 00:36, Chris Lattner wrote:
> If you want to detect simple reductions like this, just walk the SSA
> graph starting from the PHIs in the loop header. The code should look
> very similar to how LoopInfo identifies the canonical induction
> variable for a loop, it should not be difficult to write.
ScalarEvolution is another place to look for examples. It discovers add
recurrences today and altering the analysis slightly to detect in-register
reductions shouldn't be hard to do.
-Dave
More information about the llvm-dev
mailing list