Skip to content

Commit b21905d

Browse files
committed
[SLP] remove unnecessary state in matching reductions
This is NFC-intended. I'm still trying to figure out how the loop where this is used works. It does not seem like we require this data at all, but it's hard to confirm given the complicated predicates.
1 parent 722ae10 commit b21905d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6679,9 +6679,6 @@ class HorizontalReduction {
66796679
/// The operation data of the reduction operation.
66806680
OperationData RdxTreeInst;
66816681

6682-
/// The operation data for the leaf values that we perform a reduction on.
6683-
OperationData RdxLeafVal;
6684-
66856682
/// Checks if the ParentStackElem.first should be marked as a reduction
66866683
/// operation with an extra argument or as extra argument itself.
66876684
void markExtraArg(std::pair<Instruction *, unsigned> &ParentStackElem,
@@ -6825,9 +6822,11 @@ class HorizontalReduction {
68256822
if (!isValidElementType(Ty) || Ty->isPointerTy())
68266823
return false;
68276824

6828-
RdxLeafVal.clear();
68296825
ReductionRoot = B;
68306826

6827+
// The operation data for the leaf values that we perform a reduction on.
6828+
OperationData RdxLeafVal;
6829+
68316830
// Post order traverse the reduction tree starting at B. We only handle true
68326831
// trees containing only binary operators.
68336832
SmallVector<std::pair<Instruction *, unsigned>, 32> Stack;

0 commit comments

Comments
 (0)