[LoopUtils] remove redundant opcode parameter; NFC
authorSanjay Patel <spatel@rotateright.com>
Mon, 4 Jan 2021 21:51:36 +0000 (16:51 -0500)
committerSanjay Patel <spatel@rotateright.com>
Mon, 4 Jan 2021 22:05:28 +0000 (17:05 -0500)
commit36263a7cccc0d98afc36dea55e7a004d08455811
treee908e5f510dee9a02c9f41868549361174ba7a6d
parentefc82c4ad2bcb256a4f4c20238d08cd3afba4d2d
[LoopUtils] remove redundant opcode parameter; NFC

While here, rename the inaccurate getRecurrenceBinOp()
because that was also used to get CmpInst opcodes.

The recurrence/reduction kind should always refer to the
expected opcode for a reduction. SLP appears to be the
only direct caller of createSimpleTargetReduction(), and
that calling code ideally should not be carrying around
both an opcode and a reduction kind.

This should allow us to generalize reduction matching to
use intrinsics instead of only binops.
llvm/include/llvm/Analysis/IVDescriptors.h
llvm/include/llvm/Transforms/Utils/LoopUtils.h
llvm/lib/Analysis/IVDescriptors.cpp
llvm/lib/Transforms/Utils/LoopUtils.cpp
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/lib/Transforms/Vectorize/VPlan.cpp