Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -875,10 +875,8 @@ unsigned RuleMatcher::getInsnVarID(InstructionMatcher &InsnMatcher) const {
}

void RuleMatcher::defineOperand(StringRef SymbolicName, OperandMatcher &OM) {
if (!DefinedOperands.contains(SymbolicName)) {
DefinedOperands[SymbolicName] = &OM;
if (DefinedOperands.try_emplace(SymbolicName, &OM).second)
return;
}

// If the operand is already defined, then we must ensure both references in
// the matcher have the exact same node.
Expand All @@ -889,8 +887,7 @@ void RuleMatcher::defineOperand(StringRef SymbolicName, OperandMatcher &OM) {
}

void RuleMatcher::definePhysRegOperand(const Record *Reg, OperandMatcher &OM) {
if (!PhysRegOperands.contains(Reg))
PhysRegOperands[Reg] = &OM;
PhysRegOperands.try_emplace(Reg, &OM);
}

InstructionMatcher &
Expand Down
Loading