if (!TII->mayBeNewStore(MI))
return false;
MachineOperand &MO = MI.getOperand(MI.getNumOperands() - 1);
- return (MO.isReg() && RegDefs.count(MO.getReg()) != 0);
+ return MO.isReg() && RegDefs.contains(MO.getReg());
}
void HexagonHazardRecognizer::EmitInstruction(SUnit *SU) {
// adding an extra input. We ignore this case for now, and so ignore the
// region.
Optional<unsigned> OGVN = Cand.getGVN(Incoming);
- if (!OGVN.hasValue() && (Blocks.find(IncomingBlock) != Blocks.end())) {
+ if (!OGVN.hasValue() && Blocks.contains(IncomingBlock)) {
Region.IgnoreRegion = true;
return None;
}
// If the incoming block isn't in the region, we don't have to worry about
// this incoming value.
- if (Blocks.find(IncomingBlock) == Blocks.end())
+ if (!Blocks.contains(IncomingBlock))
continue;
// Collect the canonical numbers of the values in the PHINode.
for (PHINode &CurrPN : OverallPhiBlock->phis()) {
// If this PHINode has already been matched to another PHINode to be merged,
// we skip it.
- if (UsedPHIs.find(&CurrPN) != UsedPHIs.end())
+ if (UsedPHIs.contains(&CurrPN))
continue;
CurrentCanonNums.clear();