mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 22:24:07 +00:00
Fix a bug in the local allocator's liveness computation where it
was setting kill flags on tied uses in two-address instructions. The kill flags were causing the allocator to think it could allocate the use and its tied def in different registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57039 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -651,9 +651,11 @@ void RALocal::ComputeLocalLiveness(MachineBasicBlock& MBB) {
|
||||
// Physical registers and those that are not live-out of the block
|
||||
// are killed/dead at their last use/def within this block.
|
||||
if (isPhysReg || !usedOutsideBlock) {
|
||||
if (MO.isUse())
|
||||
MO.setIsKill(true);
|
||||
else
|
||||
if (MO.isUse()) {
|
||||
// Don't mark uses that are tied to defs as kills.
|
||||
if (MI->getDesc().getOperandConstraint(idx, TOI::TIED_TO) == -1)
|
||||
MO.setIsKill(true);
|
||||
} else
|
||||
MO.setIsDead(true);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user