mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-21 18:29:46 +00:00
Delete dead function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161242 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
bc8d827b2b
commit
3cd9f572ed
@ -93,9 +93,6 @@ namespace {
|
||||
bool NoUseAfterLastDef(unsigned Reg, MachineBasicBlock *MBB, unsigned Dist,
|
||||
unsigned &LastDef);
|
||||
|
||||
MachineInstr *FindLastUseInMBB(unsigned Reg, MachineBasicBlock *MBB,
|
||||
unsigned Dist);
|
||||
|
||||
bool isProfitableToCommute(unsigned regA, unsigned regB, unsigned regC,
|
||||
MachineInstr *MI, MachineBasicBlock *MBB,
|
||||
unsigned Dist);
|
||||
@ -314,31 +311,6 @@ bool TwoAddressInstructionPass::NoUseAfterLastDef(unsigned Reg,
|
||||
return !(LastUse > LastDef && LastUse < Dist);
|
||||
}
|
||||
|
||||
MachineInstr *TwoAddressInstructionPass::FindLastUseInMBB(unsigned Reg,
|
||||
MachineBasicBlock *MBB,
|
||||
unsigned Dist) {
|
||||
unsigned LastUseDist = 0;
|
||||
MachineInstr *LastUse = 0;
|
||||
for (MachineRegisterInfo::reg_iterator I = MRI->reg_begin(Reg),
|
||||
E = MRI->reg_end(); I != E; ++I) {
|
||||
MachineOperand &MO = I.getOperand();
|
||||
MachineInstr *MI = MO.getParent();
|
||||
if (MI->getParent() != MBB || MI->isDebugValue())
|
||||
continue;
|
||||
DenseMap<MachineInstr*, unsigned>::iterator DI = DistanceMap.find(MI);
|
||||
if (DI == DistanceMap.end())
|
||||
continue;
|
||||
if (DI->second >= Dist)
|
||||
continue;
|
||||
|
||||
if (MO.isUse() && DI->second > LastUseDist) {
|
||||
LastUse = DI->first;
|
||||
LastUseDist = DI->second;
|
||||
}
|
||||
}
|
||||
return LastUse;
|
||||
}
|
||||
|
||||
/// isCopyToReg - Return true if the specified MI is a copy instruction or
|
||||
/// a extract_subreg instruction. It also returns the source and destination
|
||||
/// registers and whether they are physical registers by reference.
|
||||
|
Loading…
Reference in New Issue
Block a user