diff options
author | Bill Wendling <isanbard@gmail.com> | 2008-01-02 20:47:37 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2008-01-02 20:47:37 +0000 |
commit | a4b662272d2aa1a39025523fd9d1fdce9dfcbdb2 (patch) | |
tree | 5041c5ebd4ddb47a072ae670d08e26ea9759f8a2 /lib/CodeGen | |
parent | e2620add35f0118a436a2caf521db1c634145305 (diff) |
Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45496 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/MachineLICM.cpp | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/lib/CodeGen/MachineLICM.cpp b/lib/CodeGen/MachineLICM.cpp index 9a0fbc29da..f7373bea86 100644 --- a/lib/CodeGen/MachineLICM.cpp +++ b/lib/CodeGen/MachineLICM.cpp @@ -56,9 +56,6 @@ namespace { // State that is updated as we process loops bool Changed; // True if a loop is changed. MachineLoop *CurLoop; // The current loop we are working on. - - // Map the def of a virtual register to the machine instruction. - IndexedMap<const MachineInstr*, VirtReg2IndexFunctor> VRegDefs; public: static char ID; // Pass identification, replacement for typeid MachineLICM() : MachineFunctionPass((intptr_t)&ID) {} @@ -92,11 +89,6 @@ namespace { HoistRegion(DT->getNode(L->getHeader())); } - /// MapVirtualRegisterDefs - Create a map of which machine instruction - /// defines a virtual register. - /// - void MapVirtualRegisterDefs(); - /// IsInSubLoop - A little predicate that returns true if the specified /// basic block is in a subloop of the current one, not the current one /// itself. @@ -192,8 +184,6 @@ bool MachineLICM::runOnMachineFunction(MachineFunction &MF) { LI = &getAnalysis<MachineLoopInfo>(); DT = &getAnalysis<MachineDominatorTree>(); - MapVirtualRegisterDefs(); - for (MachineLoopInfo::iterator I = LI->begin(), E = LI->end(); I != E; ++I) { CurLoop = *I; @@ -208,31 +198,6 @@ bool MachineLICM::runOnMachineFunction(MachineFunction &MF) { return Changed; } -/// MapVirtualRegisterDefs - Create a map of which machine instruction defines a -/// virtual register. -/// -void MachineLICM::MapVirtualRegisterDefs() { - for (MachineFunction::const_iterator - I = CurMF->begin(), E = CurMF->end(); I != E; ++I) { - const MachineBasicBlock &MBB = *I; - - for (MachineBasicBlock::const_iterator - II = MBB.begin(), IE = MBB.end(); II != IE; ++II) { - const MachineInstr &MI = *II; - - for (unsigned i = 0, e = MI.getNumOperands(); i != e; ++i) { - const MachineOperand &MO = MI.getOperand(i); - - if (MO.isRegister() && MO.isDef() && - MRegisterInfo::isVirtualRegister(MO.getReg())) { - VRegDefs.grow(MO.getReg()); - VRegDefs[MO.getReg()] = &MI; - } - } - } - } -} - /// HoistRegion - Walk the specified region of the CFG (defined by all blocks /// dominated by the specified block, and that are in the current loop) in depth /// first order w.r.t the DominatorTree. This allows us to visit definitions |