1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00

[Target, Transforms] Use contains (NFC)

This commit is contained in:
Kazu Hirata 2020-12-19 10:43:18 -08:00
parent c9e46c7aad
commit 322ff74c10
3 changed files with 3 additions and 4 deletions

View File

@ -121,7 +121,7 @@ static bool hasPCRelativeForm(MachineInstr &Use) {
for (auto BBI = MBB.instr_begin(); BBI != MBB.instr_end(); ++BBI) {
// Skip load immediate that is marked to be erased later because it
// cannot be used to replace any other instructions.
if (InstrsToErase.find(&*BBI) != InstrsToErase.end())
if (InstrsToErase.contains(&*BBI))
continue;
// Skip non-load immediate.
unsigned Opc = BBI->getOpcode();

View File

@ -162,7 +162,7 @@ void IROutliner::pruneIncompatibleRegions(
unsigned EndIdx = IRSC.getEndIdx();
for (unsigned Idx = StartIdx; Idx <= EndIdx; Idx++)
if (Outlined.find(Idx) != Outlined.end()) {
if (Outlined.contains(Idx)) {
PreviouslyOutlined = true;
break;
}

View File

@ -2370,8 +2370,7 @@ struct DSEState {
<< "Trying to eliminate MemoryDefs at the end of the function\n");
for (int I = MemDefs.size() - 1; I >= 0; I--) {
MemoryDef *Def = MemDefs[I];
if (SkipStores.find(Def) != SkipStores.end() ||
!isRemovable(Def->getMemoryInst()))
if (SkipStores.contains(Def) || !isRemovable(Def->getMemoryInst()))
continue;
Instruction *DefI = Def->getMemoryInst();