mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-14 15:38:57 +00:00
Add additional assert() to verify no extraneous use of a scavenged register.
llvm-svn: 83163
This commit is contained in:
parent
24270e88cc
commit
b4fdc9252d
@ -744,8 +744,15 @@ void PEI::scavengeFrameVirtualRegs(MachineFunction &Fn) {
|
|||||||
for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i)
|
for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i)
|
||||||
if (MI->getOperand(i).isReg()) {
|
if (MI->getOperand(i).isReg()) {
|
||||||
unsigned Reg = MI->getOperand(i).getReg();
|
unsigned Reg = MI->getOperand(i).getReg();
|
||||||
if (Reg == 0 || !TargetRegisterInfo::isVirtualRegister(Reg))
|
if (Reg == 0)
|
||||||
continue;
|
continue;
|
||||||
|
if (!TargetRegisterInfo::isVirtualRegister(Reg)) {
|
||||||
|
// If we have an active scavenged register, we shouldn't be
|
||||||
|
// seeing any references to it.
|
||||||
|
assert (Reg != CurrentScratchReg
|
||||||
|
&& "overlapping use of scavenged frame index register!");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// If we already have a scratch for this virtual register, use it
|
// If we already have a scratch for this virtual register, use it
|
||||||
if (Reg != CurrentVirtReg) {
|
if (Reg != CurrentVirtReg) {
|
||||||
@ -770,7 +777,7 @@ void PEI::scavengeFrameVirtualRegs(MachineFunction &Fn) {
|
|||||||
|
|
||||||
// If this is the last use of the register, stop tracking it.
|
// If this is the last use of the register, stop tracking it.
|
||||||
if (MI->getOperand(i).isKill())
|
if (MI->getOperand(i).isKill())
|
||||||
CurrentVirtReg = 0;
|
CurrentScratchReg = CurrentVirtReg = 0;
|
||||||
}
|
}
|
||||||
RS->forward(MI);
|
RS->forward(MI);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user