[llvm-mca] Use llvm::erase_if (NFC) (#96029)

This commit is contained in:
Kazu Hirata 2024-06-19 05:59:41 -07:00 committed by GitHub
parent 60984f5be9
commit 0d524bc45d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -104,11 +104,9 @@ public:
dropInstructions(const llvm::SmallPtrSetImpl<const llvm::MCInst *> &Insts) {
if (Insts.empty())
return Instructions;
Instructions.erase(std::remove_if(Instructions.begin(), Instructions.end(),
[&Insts](const llvm::MCInst &Inst) {
return Insts.contains(&Inst);
}),
Instructions.end());
llvm::erase_if(Instructions, [&Insts](const llvm::MCInst &Inst) {
return Insts.contains(&Inst);
});
return Instructions;
}