mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-03 11:08:32 +00:00
IR: Invert logic to simplify control flow, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225670 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2912990d86
commit
6fc29015ff
@ -451,19 +451,16 @@ void GenericMDNode::resolve() {
|
||||
void GenericMDNode::resolveAfterOperandChange(Metadata *Old, Metadata *New) {
|
||||
assert(SubclassData32 != 0 && "Expected unresolved operands");
|
||||
|
||||
// Check if the last unresolved operand has just been resolved; if so,
|
||||
// resolve this as well.
|
||||
if (isOperandUnresolved(Old)) {
|
||||
if (!isOperandUnresolved(New))
|
||||
decrementUnresolvedOperandCount();
|
||||
} else {
|
||||
// Operands shouldn't become unresolved.
|
||||
// Check if an operand was resolved.
|
||||
if (!isOperandUnresolved(Old))
|
||||
assert(isOperandUnresolved(New) && "Operand just became unresolved");
|
||||
}
|
||||
else if (!isOperandUnresolved(New))
|
||||
decrementUnresolvedOperandCount();
|
||||
}
|
||||
|
||||
void GenericMDNode::decrementUnresolvedOperandCount() {
|
||||
if (!--SubclassData32)
|
||||
// Last unresolved operand has just been resolved.
|
||||
resolve();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user