mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-01 02:33:44 +00:00
Only ignore <undef> use operands, keep the <def,undef> ops.
Def operands may also have an <undef> flag, but that just means that a sub-register redef doesn't actually read the super-register. For physical registers, it has no meaning. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130714 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8ce864e324
commit
2048e4ab7f
@ -154,13 +154,16 @@ void RegScavenger::forward() {
|
||||
BitVector DeadRegs(NumPhysRegs);
|
||||
for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
|
||||
const MachineOperand &MO = MI->getOperand(i);
|
||||
if (!MO.isReg() || MO.isUndef())
|
||||
if (!MO.isReg())
|
||||
continue;
|
||||
unsigned Reg = MO.getReg();
|
||||
if (!Reg || isReserved(Reg))
|
||||
continue;
|
||||
|
||||
if (MO.isUse()) {
|
||||
// Ignore undef uses.
|
||||
if (MO.isUndef())
|
||||
continue;
|
||||
// Two-address operands implicitly kill.
|
||||
if (!isPred && (MO.isKill() || MI->isRegTiedToDefOperand(i)))
|
||||
addRegWithSubRegs(KillRegs, Reg);
|
||||
|
Loading…
x
Reference in New Issue
Block a user