[llvm] 0cc6165 - [SLP] Strengthen internal asserts about scheduled node state [NFC]
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 4 12:23:03 PST 2022
Author: Philip Reames
Date: 2022-02-04T12:22:52-08:00
New Revision: 0cc6165d0558afbd7d2a9b51435ffc9afdfbaa34
URL: https://github.com/llvm/llvm-project/commit/0cc6165d0558afbd7d2a9b51435ffc9afdfbaa34
DIFF: https://github.com/llvm/llvm-project/commit/0cc6165d0558afbd7d2a9b51435ffc9afdfbaa34.diff
LOG: [SLP] Strengthen internal asserts about scheduled node state [NFC]
All members of a scheduled bundle must have valid dependencies, with no unscheduled ones, and only the lead element gets marked scheduled.
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 ef8b770aeb2fe..7370144a582a5 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -2471,9 +2471,16 @@ class BoUpSLP {
}
if (IsScheduled) {
- assert(isSchedulingEntity() && hasValidDependencies() &&
- UnscheduledDeps == 0 &&
- "unexpected scheduled state");
+ assert(isSchedulingEntity() &&
+ "unexpected scheduled state");
+ for (const ScheduleData *BundleMember = this; BundleMember;
+ BundleMember = BundleMember->NextInBundle) {
+ assert(BundleMember->hasValidDependencies() &&
+ BundleMember->UnscheduledDeps == 0 &&
+ "unexpected scheduled state");
+ assert((BundleMember == this || !BundleMember->IsScheduled) &&
+ "only bundle is marked scheduled");
+ }
}
}
More information about the llvm-commits
mailing list