[CodeGen] Use llvm::erase_value (NFC)
authorKazu Hirata <kazu@google.com>
Sat, 11 Jun 2022 05:59:48 +0000 (22:59 -0700)
committerKazu Hirata <kazu@google.com>
Sat, 11 Jun 2022 05:59:48 +0000 (22:59 -0700)
llvm/lib/CodeGen/MachinePipeliner.cpp

index a80cb79..ecb6870 100644 (file)
@@ -2757,7 +2757,7 @@ bool SMSchedule::normalizeNonPipelinedInstructions(
     if (OldCycle != NewCycle) {
       InstrToCycle[&SU] = NewCycle;
       auto &OldS = getInstructions(OldCycle);
-      OldS.erase(std::remove(OldS.begin(), OldS.end(), &SU), OldS.end());
+      llvm::erase_value(OldS, &SU);
       getInstructions(NewCycle).emplace_back(&SU);
       LLVM_DEBUG(dbgs() << "SU(" << SU.NodeNum
                         << ") is not pipelined; moving from cycle " << OldCycle