mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-29 16:23:44 +00:00
Don't hang on to pointers or references after vector::push_back.
The MO reference to a MachineOperand can be invalidated by MachineInstr::addOperand. Don't even use it for debugging. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90381 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fd82af0f95
commit
15d75d9f11
@ -510,12 +510,9 @@ void SchedulePostRATDList::FixupKills(MachineBasicBlock *MBB) {
|
||||
}
|
||||
|
||||
if (MO.isKill() != kill) {
|
||||
bool removed = ToggleKillFlag(MI, MO);
|
||||
if (removed) {
|
||||
DEBUG(errs() << "Fixed <removed> in ");
|
||||
} else {
|
||||
DEBUG(errs() << "Fixed " << MO << " in ");
|
||||
}
|
||||
DEBUG(errs() << "Fixing " << MO << " in ");
|
||||
// Warning: ToggleKillFlag may invalidate MO.
|
||||
ToggleKillFlag(MI, MO);
|
||||
DEBUG(MI->dump());
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user