Author: Sanjay Patel Date: 2021-01-14T18:32:37-05:00 New Revision: b21905dfe3797289791443661540b72cb43dfdf3
URL: https://github.com/llvm/llvm-project/commit/b21905dfe3797289791443661540b72cb43dfdf3 DIFF: https://github.com/llvm/llvm-project/commit/b21905dfe3797289791443661540b72cb43dfdf3.diff LOG: [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. Added: Modified: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp Removed: ################################################################################ diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp index 0f3f74b63860..3f1279b67519 100644 --- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp +++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp @@ -6679,9 +6679,6 @@ class HorizontalReduction { /// The operation data of the reduction operation. OperationData RdxTreeInst; - /// The operation data for the leaf values that we perform a reduction on. - OperationData RdxLeafVal; - /// Checks if the ParentStackElem.first should be marked as a reduction /// operation with an extra argument or as extra argument itself. void markExtraArg(std::pair<Instruction *, unsigned> &ParentStackElem, @@ -6825,9 +6822,11 @@ class HorizontalReduction { if (!isValidElementType(Ty) || Ty->isPointerTy()) return false; - RdxLeafVal.clear(); ReductionRoot = B; + // The operation data for the leaf values that we perform a reduction on. + OperationData RdxLeafVal; + // Post order traverse the reduction tree starting at B. We only handle true // trees containing only binary operators. SmallVector<std::pair<Instruction *, unsigned>, 32> Stack; _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits