forked from OSchip/llvm-project
[Target, Transforms] Use contains (NFC)
This commit is contained in:
parent
1e785e9262
commit
56edfcada9
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue