[llvm] 8d4b5e0 - [NFC][SLP] Improved description of getShallowScore() and getScoreAtLevelRec()
Vasileios Porpodas via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 19 12:16:21 PDT 2022
Author: Vasileios Porpodas
Date: 2022-04-19T12:15:36-07:00
New Revision: 8d4b5e083392df73c3a4c84228865326086e352d
URL: https://github.com/llvm/llvm-project/commit/8d4b5e083392df73c3a4c84228865326086e352d
DIFF: https://github.com/llvm/llvm-project/commit/8d4b5e083392df73c3a4c84228865326086e352d.diff
LOG: [NFC][SLP] Improved description of getShallowScore() and getScoreAtLevelRec()
Differential Revision: https://reviews.llvm.org/D124027
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 4dc964d1c9d0b..bc976c95dcc9b 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -1165,6 +1165,7 @@ class BoUpSLP {
static const int ScoreAllUserVectorized = 1;
/// \returns the score of placing \p V1 and \p V2 in consecutive lanes.
+ /// \p U1 and \p U2 are the users of \p V1 and \p V2.
/// Also, checks if \p V1 and \p V2 are compatible with instructions in \p
/// MainAltOps.
int getShallowScore(Value *V1, Value *V2, Instruction *U1, Instruction *U2,
@@ -1347,7 +1348,12 @@ class BoUpSLP {
}
/// Go through the operands of \p LHS and \p RHS recursively until \p
- /// MaxLevel, and return the cummulative score. For example:
+ /// MaxLevel, and return the cummulative score. \p U1 and \p U2 are
+ /// the users of \p LHS and \p RHS (that is \p LHS and \p RHS are operands
+ /// of \p U1 and \p U2), except at the beginning of the recursion where
+ /// these are set to nullptr.
+ ///
+ /// For example:
/// \verbatim
/// A[0] B[0] A[1] B[1] C[0] D[0] B[1] A[1]
/// \ / \ / \ / \ /
More information about the llvm-commits
mailing list