mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
Immediately erase trivially useless copies.
There is no need for these instructions to stick around since they are known to be not dead. llvm-svn: 157102
This commit is contained in:
parent
1cb1222e6c
commit
ab9a075f26
@ -1070,15 +1070,17 @@ bool RegisterCoalescer::joinCopy(MachineInstr *CopyMI, bool &Again) {
|
||||
|
||||
// If they are already joined we continue.
|
||||
if (CP.getSrcReg() == CP.getDstReg()) {
|
||||
markAsJoined(CopyMI);
|
||||
DEBUG(dbgs() << "\tCopy already coalesced.\n");
|
||||
LIS->RemoveMachineInstrFromMaps(CopyMI);
|
||||
CopyMI->eraseFromParent();
|
||||
return false; // Not coalescable.
|
||||
}
|
||||
|
||||
// Eliminate undefs.
|
||||
if (!CP.isPhys() && eliminateUndefCopy(CopyMI, CP)) {
|
||||
markAsJoined(CopyMI);
|
||||
DEBUG(dbgs() << "\tEliminated copy of <undef> value.\n");
|
||||
LIS->RemoveMachineInstrFromMaps(CopyMI);
|
||||
CopyMI->eraseFromParent();
|
||||
return false; // Not coalescable.
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user