mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
Avoid referring to edge D after the Succs or Preds arrays have
been modified, to avoid trouble in the (unlikely) scenario that D is a reference to an element in one of those arrays. llvm-svn: 62173
This commit is contained in:
parent
975f2428ba
commit
c7fe713e72
@ -75,8 +75,8 @@ void SUnit::addPred(const SDep &D) {
|
||||
++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();
|
||||
@ -105,8 +105,8 @@ void SUnit::removePred(const SDep &D) {
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user