mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-13 08:26:02 +00:00
Code clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99319 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -117,17 +117,15 @@ bool MachineCSE::isPhysDefTriviallyDead(unsigned Reg,
|
|||||||
MachineBasicBlock::const_iterator I,
|
MachineBasicBlock::const_iterator I,
|
||||||
MachineBasicBlock::const_iterator E) {
|
MachineBasicBlock::const_iterator E) {
|
||||||
unsigned LookAheadLeft = 5;
|
unsigned LookAheadLeft = 5;
|
||||||
while (LookAheadLeft--) {
|
while (LookAheadLeft) {
|
||||||
if (I == E)
|
if (I == E)
|
||||||
// Reached end of block, register is obviously dead.
|
// Reached end of block, register is obviously dead.
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (I->isDebugValue()) {
|
// Skip over dbg_value's.
|
||||||
// These must not count against the limit.
|
while (I->isDebugValue())
|
||||||
++LookAheadLeft;
|
|
||||||
++I;
|
++I;
|
||||||
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);
|
||||||
@@ -143,6 +141,8 @@ bool MachineCSE::isPhysDefTriviallyDead(unsigned Reg,
|
|||||||
// See a def of Reg (or an alias) before encountering any use, it's
|
// See a def of Reg (or an alias) before encountering any use, it's
|
||||||
// trivially dead.
|
// trivially dead.
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
--LookAheadLeft;
|
||||||
++I;
|
++I;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user