[llvm] a98965d - [CodeGen] Use llvm::erase_value (NFC)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 10 22:59:54 PDT 2022


Author: Kazu Hirata
Date: 2022-06-10T22:59:48-07:00
New Revision: a98965d92fcaf0598aaee631bc15ae4a064b2fb3

URL: https://github.com/llvm/llvm-project/commit/a98965d92fcaf0598aaee631bc15ae4a064b2fb3
DIFF: https://github.com/llvm/llvm-project/commit/a98965d92fcaf0598aaee631bc15ae4a064b2fb3.diff

LOG: [CodeGen] Use llvm::erase_value (NFC)

Added: 
    

Modified: 
    llvm/lib/CodeGen/MachinePipeliner.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/MachinePipeliner.cpp b/llvm/lib/CodeGen/MachinePipeliner.cpp
index a80cb79cae19..ecb687058a8e 100644
--- a/llvm/lib/CodeGen/MachinePipeliner.cpp
+++ b/llvm/lib/CodeGen/MachinePipeliner.cpp
@@ -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


        


More information about the llvm-commits mailing list