mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-25 17:20:48 +00:00
Ensure all defs referring to a virtual register are marked dead by addRegisterDead().
There can be multiple defs for a single virtual register when they are defining sub-registers. The missing <dead> flag was stopping the inline spiller from eliminating dead code after rematerialization. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128888 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1543,13 +1543,8 @@ bool MachineInstr::addRegisterDead(unsigned IncomingReg,
|
||||
continue;
|
||||
|
||||
if (Reg == IncomingReg) {
|
||||
if (!Found) {
|
||||
if (MO.isDead())
|
||||
// The register is already marked dead.
|
||||
return true;
|
||||
MO.setIsDead();
|
||||
Found = true;
|
||||
}
|
||||
MO.setIsDead();
|
||||
Found = true;
|
||||
} else if (hasAliases && MO.isDead() &&
|
||||
TargetRegisterInfo::isPhysicalRegister(Reg)) {
|
||||
// There exists a super-register that's marked dead.
|
||||
|
Reference in New Issue
Block a user