mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-12 18:33:22 +00:00
Handle regmasks in RegisterScavenging.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151210 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8ae3ac7a8c
commit
be2af7ee78
@ -148,6 +148,8 @@ void RegScavenger::forward() {
|
||||
DefRegs.reset();
|
||||
for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
|
||||
const MachineOperand &MO = MI->getOperand(i);
|
||||
if (MO.isRegMask())
|
||||
(isPred ? DefRegs : KillRegs).setBitsNotInMask(MO.getRegMask());
|
||||
if (!MO.isReg())
|
||||
continue;
|
||||
unsigned Reg = MO.getReg();
|
||||
@ -279,6 +281,8 @@ unsigned RegScavenger::findSurvivorReg(MachineBasicBlock::iterator StartMI,
|
||||
// Remove any candidates touched by instruction.
|
||||
for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
|
||||
const MachineOperand &MO = MI->getOperand(i);
|
||||
if (MO.isRegMask())
|
||||
Candidates.clearBitsNotInMask(MO.getRegMask());
|
||||
if (!MO.isReg() || MO.isUndef() || !MO.getReg())
|
||||
continue;
|
||||
if (TargetRegisterInfo::isVirtualRegister(MO.getReg())) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user