[ConstraintElimination] Verify CS and DFSInStack are in sync.(NFC)

After the main loop is done, we should have one constraint per item in
DFSInStack. Otherwise we added a constraint without a proper DFSInStack
item.
This commit is contained in:
Florian Hahn 2021-01-30 17:56:51 +00:00
parent 627b5bda11
commit 39486753d5
No known key found for this signature in database
GPG Key ID: 61D7554B5CECDC0D

View File

@ -352,6 +352,8 @@ static bool eliminateConstraints(Function &F, DominatorTree &DT) {
DFSInStack.emplace_back(CB.NumIn, CB.NumOut, CB.Condition, CB.Not);
}
assert(CS.size() == DFSInStack.size() &&
"updates to CS and DFSInStack are out of sync");
return Changed;
}