mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
IR: Don't allow operands to become unresolved
Operands shouldn't change from being resolved to unresolved during graph construction. Simplify the logic based on that assumption. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225649 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1478aabb18
commit
54b53edbd9
@ -547,12 +547,16 @@ void GenericMDNode::handleChangedOperand(void *Ref, Metadata *New) {
|
||||
if (!isResolved()) {
|
||||
// Check if the last unresolved operand has just been resolved; if so,
|
||||
// resolve this as well.
|
||||
if (isOperandUnresolved(Old))
|
||||
decrementUnresolvedOperands();
|
||||
if (isOperandUnresolved(New))
|
||||
incrementUnresolvedOperands();
|
||||
if (!hasUnresolvedOperands())
|
||||
resolve();
|
||||
if (isOperandUnresolved(Old)) {
|
||||
if (!isOperandUnresolved(New)) {
|
||||
decrementUnresolvedOperands();
|
||||
if (!hasUnresolvedOperands())
|
||||
resolve();
|
||||
}
|
||||
} else {
|
||||
// Operands shouldn't become unresolved.
|
||||
assert(isOperandUnresolved(New) && "Operand just became unresolved");
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user