mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-27 12:26:08 +00:00
In debug builds check that the key property holds: all
result and operand types are legal. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47546 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -173,18 +173,36 @@ NodeDone:
|
|||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
for (SelectionDAG::allnodes_iterator I = DAG.allnodes_begin(),
|
for (SelectionDAG::allnodes_iterator I = DAG.allnodes_begin(),
|
||||||
E = DAG.allnodes_end(); I != E; ++I) {
|
E = DAG.allnodes_end(); I != E; ++I) {
|
||||||
if (I->getNodeId() == Processed)
|
bool Failed = false;
|
||||||
continue;
|
|
||||||
cerr << "Unprocessed node: ";
|
|
||||||
I->dump(&DAG); cerr << "\n";
|
|
||||||
|
|
||||||
if (I->getNodeId() == NewNode)
|
// Check that all result types are legal.
|
||||||
cerr << "New node not 'noticed'?\n";
|
for (unsigned i = 0, NumVals = I->getNumValues(); i < NumVals; ++i)
|
||||||
else if (I->getNodeId() > 0)
|
if (!isTypeLegal(I->getValueType(i))) {
|
||||||
cerr << "Operand not processed?\n";
|
cerr << "Result type " << i << " illegal!\n";
|
||||||
else if (I->getNodeId() == ReadyToProcess)
|
Failed = true;
|
||||||
cerr << "Not added to worklist?\n";
|
}
|
||||||
abort();
|
|
||||||
|
// Check that all operand types are legal.
|
||||||
|
for (unsigned i = 0, NumOps = I->getNumOperands(); i < NumOps; ++i)
|
||||||
|
if (!isTypeLegal(I->getOperand(i).getValueType())) {
|
||||||
|
cerr << "Operand type " << i << " illegal!\n";
|
||||||
|
Failed = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (I->getNodeId() != Processed) {
|
||||||
|
if (I->getNodeId() == NewNode)
|
||||||
|
cerr << "New node not 'noticed'?\n";
|
||||||
|
else if (I->getNodeId() > 0)
|
||||||
|
cerr << "Operand not processed?\n";
|
||||||
|
else if (I->getNodeId() == ReadyToProcess)
|
||||||
|
cerr << "Not added to worklist?\n";
|
||||||
|
Failed = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Failed) {
|
||||||
|
I->dump(&DAG); cerr << "\n";
|
||||||
|
abort();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user