mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Handle regmasks in CriticalAntiDepBreaker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151223 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cf14613455
commit
bbad2f1040
@ -253,6 +253,17 @@ void CriticalAntiDepBreaker::ScanInstruction(MachineInstr *MI,
|
||||
// address updates.
|
||||
for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
|
||||
MachineOperand &MO = MI->getOperand(i);
|
||||
|
||||
if (MO.isRegMask())
|
||||
for (unsigned i = 0, e = TRI->getNumRegs(); i != e; ++i)
|
||||
if (MO.clobbersPhysReg(i)) {
|
||||
DefIndices[i] = Count;
|
||||
KillIndices[i] = ~0u;
|
||||
KeepRegs.erase(i);
|
||||
Classes[i] = 0;
|
||||
RegRefs.erase(i);
|
||||
}
|
||||
|
||||
if (!MO.isReg()) continue;
|
||||
unsigned Reg = MO.getReg();
|
||||
if (Reg == 0) continue;
|
||||
@ -355,6 +366,9 @@ CriticalAntiDepBreaker::isNewRegClobberedByRefs(RegRefIter RegRefBegin,
|
||||
for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
|
||||
const MachineOperand &CheckOper = MI->getOperand(i);
|
||||
|
||||
if (CheckOper.isRegMask() && CheckOper.clobbersPhysReg(NewReg))
|
||||
return true;
|
||||
|
||||
if (!CheckOper.isReg() || !CheckOper.isDef() ||
|
||||
CheckOper.getReg() != NewReg)
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user