mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
IR: Separate out decrementUnresolvedOperandCount(), NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225667 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
aea8ab800f
commit
2912990d86
@ -763,6 +763,7 @@ private:
|
||||
|
||||
void resolve();
|
||||
void resolveAfterOperandChange(Metadata *Old, Metadata *New);
|
||||
void decrementUnresolvedOperandCount();
|
||||
};
|
||||
|
||||
/// \brief Forward declaration of metadata.
|
||||
|
@ -228,8 +228,7 @@ void ReplaceableMetadataImpl::resolveAllUses(bool ResolveUsers) {
|
||||
continue;
|
||||
if (OwnerMD->isResolved())
|
||||
continue;
|
||||
if (!--OwnerMD->SubclassData32)
|
||||
OwnerMD->resolve();
|
||||
OwnerMD->decrementUnresolvedOperandCount();
|
||||
}
|
||||
}
|
||||
|
||||
@ -455,16 +454,19 @@ void GenericMDNode::resolveAfterOperandChange(Metadata *Old, Metadata *New) {
|
||||
// Check if the last unresolved operand has just been resolved; if so,
|
||||
// resolve this as well.
|
||||
if (isOperandUnresolved(Old)) {
|
||||
if (!isOperandUnresolved(New)) {
|
||||
if (!--SubclassData32)
|
||||
resolve();
|
||||
}
|
||||
if (!isOperandUnresolved(New))
|
||||
decrementUnresolvedOperandCount();
|
||||
} else {
|
||||
// Operands shouldn't become unresolved.
|
||||
assert(isOperandUnresolved(New) && "Operand just became unresolved");
|
||||
}
|
||||
}
|
||||
|
||||
void GenericMDNode::decrementUnresolvedOperandCount() {
|
||||
if (!--SubclassData32)
|
||||
resolve();
|
||||
}
|
||||
|
||||
void GenericMDNode::resolveCycles() {
|
||||
if (isResolved())
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user