1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02: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.

llvm-svn: 170465
This commit is contained in:
Jakob Stoklund Olesen 2012-12-18 23:00:28 +00:00
parent 837a7e5c18
commit 26def8a76e

View File

@ -878,6 +878,7 @@ void MachineInstr::bundleWithPred() {
setFlag(BundledPred);
MachineBasicBlock::instr_iterator Pred = this;
--Pred;
assert(!Pred->isBundledWithSucc() && "Inconsistent bundle flags");
Pred->setFlag(BundledSucc);
}
@ -886,6 +887,7 @@ void MachineInstr::bundleWithSucc() {
setFlag(BundledSucc);
MachineBasicBlock::instr_iterator Succ = this;
++Succ;
assert(!Succ->isBundledWithPred() && "Inconsistent bundle flags");
Succ->setFlag(BundledPred);
}
@ -894,6 +896,7 @@ void MachineInstr::unbundleFromPred() {
clearFlag(BundledPred);
MachineBasicBlock::instr_iterator Pred = this;
--Pred;
assert(Pred->isBundledWithSucc() && "Inconsistent bundle flags");
Pred->clearFlag(BundledSucc);
}
@ -902,6 +905,7 @@ void MachineInstr::unbundleFromSucc() {
clearFlag(BundledSucc);
MachineBasicBlock::instr_iterator Succ = this;
--Succ;
assert(Succ->isBundledWithPred() && "Inconsistent bundle flags");
Succ->clearFlag(BundledPred);
}