mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-28 06:27:16 +00:00
Use std::replace instead of std::find and push_back.
llvm-svn: 53063
This commit is contained in:
parent
f9e8484756
commit
67ab36cb9d
@ -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…
Reference in New Issue
Block a user