1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 05:01:59 +01:00

[AMDGPU] Use llvm::is_contained (NFC)

This commit is contained in:
Kazu Hirata 2020-12-04 21:42:54 -08:00
parent 68aac7fe9c
commit 4a0942f06d
4 changed files with 7 additions and 7 deletions

View File

@ -823,7 +823,7 @@ struct FillMFMAShadowMutation : ScheduleDAGMutation {
for (unsigned I = 0; I < Succs.size(); ++I) {
for (const SDep &SI : Succs[I]->Succs) {
const SUnit *SU = SI.getSUnit();
if (SU != Succs[I] && llvm::find(Succs, SU) == Succs.end())
if (SU != Succs[I] && !llvm::is_contained(Succs, SU))
Succs.push_back(SU);
}
}
@ -831,7 +831,7 @@ struct FillMFMAShadowMutation : ScheduleDAGMutation {
SmallPtrSet<const SUnit*, 32> Visited;
while (!Preds.empty()) {
const SUnit *SU = Preds.pop_back_val();
if (llvm::find(Succs, SU) != Succs.end())
if (llvm::is_contained(Succs, SU))
return false;
Visited.insert(SU);
for (const SDep &SI : SU->Preds)

View File

@ -279,7 +279,7 @@ bool GCNNSAReassign::runOnMachineFunction(MachineFunction &MF) {
const MachineOperand &Op = MI->getOperand(VAddr0Idx + I);
Register Reg = Op.getReg();
LiveInterval *LI = &LIS->getInterval(Reg);
if (llvm::find(Intervals, LI) != Intervals.end()) {
if (llvm::is_contained(Intervals, LI)) {
// Same register used, unable to make sequential
Intervals.clear();
break;

View File

@ -240,8 +240,8 @@ void SIInsertSkips::skipIfDead(MachineBasicBlock &MBB,
// In this case, we write the "null_export; s_endpgm" skip code in the
// already-existing basic block.
auto NextBBI = std::next(MBB.getIterator());
bool NoSuccessor = I == MBB.end() &&
llvm::find(MBB.successors(), &*NextBBI) == MBB.succ_end();
bool NoSuccessor =
I == MBB.end() && !llvm::is_contained(MBB.successors(), &*NextBBI);
if (NoSuccessor) {
generatePsEndPgm(MBB, I, DL, TII);

View File

@ -213,7 +213,7 @@ public:
ReachableMap[MBB] = true;
if (HaveReachablePred) {
for (MachineBasicBlock *UnreachablePred : Stack) {
if (llvm::find(Predecessors, UnreachablePred) == Predecessors.end())
if (!llvm::is_contained(Predecessors, UnreachablePred))
Predecessors.push_back(UnreachablePred);
}
}
@ -347,7 +347,7 @@ private:
if (DomIt != Visited.end() && DomIt->second <= LoopLevel)
return true;
if (llvm::find(Blocks, &MBB) != Blocks.end())
if (llvm::is_contained(Blocks, &MBB))
return true;
return false;