mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-12 13:38:21 +00:00
Move two methods out of line, make them work when the record for a machine
instruction includes physregs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30061 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -415,3 +415,39 @@ void LiveVariables::instructionChanged(MachineInstr *OldMI,
|
||||
RegistersDead.erase(OldMI);
|
||||
}
|
||||
}
|
||||
|
||||
/// removeVirtualRegistersKilled - Remove all killed info for the specified
|
||||
/// instruction.
|
||||
void LiveVariables::removeVirtualRegistersKilled(MachineInstr *MI) {
|
||||
std::map<MachineInstr*, std::vector<unsigned> >::iterator I =
|
||||
RegistersKilled.find(MI);
|
||||
if (I == RegistersKilled.end()) return;
|
||||
|
||||
std::vector<unsigned> &Regs = I->second;
|
||||
for (unsigned i = 0, e = Regs.size(); i != e; ++i) {
|
||||
if (MRegisterInfo::isVirtualRegister(Regs[i])) {
|
||||
bool removed = getVarInfo(Regs[i]).removeKill(MI);
|
||||
assert(removed && "kill not in register's VarInfo?");
|
||||
}
|
||||
}
|
||||
RegistersKilled.erase(I);
|
||||
}
|
||||
|
||||
/// removeVirtualRegistersDead - Remove all of the dead registers for the
|
||||
/// specified instruction from the live variable information.
|
||||
void LiveVariables::removeVirtualRegistersDead(MachineInstr *MI) {
|
||||
std::map<MachineInstr*, std::vector<unsigned> >::iterator I =
|
||||
RegistersDead.find(MI);
|
||||
if (I == RegistersDead.end()) return;
|
||||
|
||||
std::vector<unsigned> &Regs = I->second;
|
||||
for (unsigned i = 0, e = Regs.size(); i != e; ++i) {
|
||||
if (MRegisterInfo::isVirtualRegister(Regs[i])) {
|
||||
bool removed = getVarInfo(Regs[i]).removeKill(MI);
|
||||
assert(removed && "kill not in register's VarInfo?");
|
||||
}
|
||||
}
|
||||
RegistersDead.erase(I);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user