mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-10 04:33:40 +00:00
Use std::replace instead of std::find and push_back.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53063 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
825cb98d9a
commit
5b9f60bc22
@ -689,8 +689,7 @@ void LiveVariables::instructionChanged(MachineInstr *OldMI,
|
||||
void LiveVariables::replaceKillInstruction(unsigned Reg, MachineInstr *OldMI,
|
||||
MachineInstr *NewMI) {
|
||||
VarInfo &VI = getVarInfo(Reg);
|
||||
if (VI.removeKill(OldMI))
|
||||
VI.Kills.push_back(NewMI); // Yes, there was a kill of it
|
||||
std::replace(VI.Kills.begin(), VI.Kills.end(), OldMI, NewMI);
|
||||
}
|
||||
|
||||
/// removeVirtualRegistersKilled - Remove all killed info for the specified
|
||||
|
Loading…
x
Reference in New Issue
Block a user