been modified, to avoid trouble in the (unlikely) scenario that
D is a reference to an element in one of those arrays.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62173
91177308-0d34-0410-b5e6-
96231b3b80d8
++NumPredsLeft;
if (!isScheduled)
++N->NumSuccsLeft;
- N->Succs.push_back(P);
Preds.push_back(D);
+ N->Succs.push_back(P);
if (P.getLatency() != 0) {
this->setDepthDirty();
N->setHeightDirty();
}
assert(FoundSucc && "Mismatching preds / succs lists!");
Preds.erase(I);
- // Update the bookkeeping;
- if (D.getKind() == SDep::Data) {
+ // Update the bookkeeping.
+ if (P.getKind() == SDep::Data) {
--NumPreds;
--N->NumSuccs;
}