mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-19 04:32:19 +00:00
Verify bundle flag consistency when setting them.
Now that the bundle flag aware APIs are all in place, it is possible to continuously verify the flag consistency. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170465 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
270bfbd3d1
commit
582abddeee
@ -878,6 +878,7 @@ void MachineInstr::bundleWithPred() {
|
|||||||
setFlag(BundledPred);
|
setFlag(BundledPred);
|
||||||
MachineBasicBlock::instr_iterator Pred = this;
|
MachineBasicBlock::instr_iterator Pred = this;
|
||||||
--Pred;
|
--Pred;
|
||||||
|
assert(!Pred->isBundledWithSucc() && "Inconsistent bundle flags");
|
||||||
Pred->setFlag(BundledSucc);
|
Pred->setFlag(BundledSucc);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -886,6 +887,7 @@ void MachineInstr::bundleWithSucc() {
|
|||||||
setFlag(BundledSucc);
|
setFlag(BundledSucc);
|
||||||
MachineBasicBlock::instr_iterator Succ = this;
|
MachineBasicBlock::instr_iterator Succ = this;
|
||||||
++Succ;
|
++Succ;
|
||||||
|
assert(!Succ->isBundledWithPred() && "Inconsistent bundle flags");
|
||||||
Succ->setFlag(BundledPred);
|
Succ->setFlag(BundledPred);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -894,6 +896,7 @@ void MachineInstr::unbundleFromPred() {
|
|||||||
clearFlag(BundledPred);
|
clearFlag(BundledPred);
|
||||||
MachineBasicBlock::instr_iterator Pred = this;
|
MachineBasicBlock::instr_iterator Pred = this;
|
||||||
--Pred;
|
--Pred;
|
||||||
|
assert(Pred->isBundledWithSucc() && "Inconsistent bundle flags");
|
||||||
Pred->clearFlag(BundledSucc);
|
Pred->clearFlag(BundledSucc);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -902,6 +905,7 @@ void MachineInstr::unbundleFromSucc() {
|
|||||||
clearFlag(BundledSucc);
|
clearFlag(BundledSucc);
|
||||||
MachineBasicBlock::instr_iterator Succ = this;
|
MachineBasicBlock::instr_iterator Succ = this;
|
||||||
--Succ;
|
--Succ;
|
||||||
|
assert(Succ->isBundledWithPred() && "Inconsistent bundle flags");
|
||||||
Succ->clearFlag(BundledPred);
|
Succ->clearFlag(BundledPred);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user