mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Mark all uses as <undef> when joining a copy.
This way, shrinkToUses() will ignore the instruction that is about to be deleted, and we avoid leaving invalid live ranges that SplitKit doesn't like. Fix a misunderstanding in MachineVerifier about <def,undef> operands. The <undef> flag is valid on def operands where it has the same meaning as <undef> on a use operand. It only applies to sub-register defines which also read the full register. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128642 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -602,9 +602,7 @@ MachineVerifier::visitMachineOperand(const MachineOperand *MO, unsigned MONum) {
|
||||
// Check Live Variables.
|
||||
if (MI->isDebugValue()) {
|
||||
// Liveness checks are not valid for debug values.
|
||||
} else if (MO->isUndef()) {
|
||||
// An <undef> doesn't refer to any register, so just skip it.
|
||||
} else if (MO->isUse()) {
|
||||
} else if (MO->isUse() && !MO->isUndef()) {
|
||||
regsLiveInButUnused.erase(Reg);
|
||||
|
||||
bool isKill = false;
|
||||
@@ -675,8 +673,7 @@ MachineVerifier::visitMachineOperand(const MachineOperand *MO, unsigned MONum) {
|
||||
MInfo.vregsLiveIn.insert(std::make_pair(Reg, MI));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
assert(MO->isDef());
|
||||
} else if (MO->isDef()) {
|
||||
// Register defined.
|
||||
// TODO: verify that earlyclobber ops are not used.
|
||||
if (MO->isDead())
|
||||
|
||||
Reference in New Issue
Block a user