mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
Fix debug_value handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98224 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1f3e445184
commit
e68ea060c7
@ -122,8 +122,12 @@ bool MachineCSE::isPhysDefTriviallyDead(unsigned Reg,
|
|||||||
// Reached end of block, register is obviously dead.
|
// Reached end of block, register is obviously dead.
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (I->isDebugValue())
|
if (I->isDebugValue()) {
|
||||||
|
// These must not count against the limit.
|
||||||
|
++LookAheadLeft;
|
||||||
|
++I;
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
bool SeenDef = false;
|
bool SeenDef = false;
|
||||||
for (unsigned i = 0, e = I->getNumOperands(); i != e; ++i) {
|
for (unsigned i = 0, e = I->getNumOperands(); i != e; ++i) {
|
||||||
const MachineOperand &MO = I->getOperand(i);
|
const MachineOperand &MO = I->getOperand(i);
|
||||||
@ -188,7 +192,7 @@ static bool isCopy(const MachineInstr *MI, const TargetInstrInfo *TII) {
|
|||||||
|
|
||||||
bool MachineCSE::isCSECandidate(MachineInstr *MI) {
|
bool MachineCSE::isCSECandidate(MachineInstr *MI) {
|
||||||
if (MI->isLabel() || MI->isPHI() || MI->isImplicitDef() ||
|
if (MI->isLabel() || MI->isPHI() || MI->isImplicitDef() ||
|
||||||
MI->isKill() || MI->isInlineAsm())
|
MI->isKill() || MI->isInlineAsm() || MI->isDebugValue())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Ignore copies.
|
// Ignore copies.
|
||||||
|
Loading…
Reference in New Issue
Block a user