llvm.org GIT mirror llvm / 2540813
Remove dead methods, add getNumBlockIDs() method git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30322 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 14 years ago
2 changed file(s) with 25 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
3737 const TargetInstrInfo* tii_;
3838 LiveVariables* lv_;
3939
40 /// MBB2IdxMap - The index of the first instruction in the specified basic
41 /// block.
42 std::vector MBB2IdxMap;
43
4044 typedef std::map Mi2IndexMap;
4145 Mi2IndexMap mi2iMap_;
4246
112116 return I->second;
113117 }
114118
119 /// getMBBStartIdx - Return the base index of the first instruction in the
120 /// specified MachineBasicBlock.
121 unsigned getMBBStartIdx(MachineBasicBlock *MBB) const {
122 return getMBBStartIdx(MBB->getNumber());
123 }
124
125 unsigned getMBBStartIdx(unsigned MBBNo) const {
126 assert(MBBNo < MBB2IdxMap.size() && "Invalid MBB number!");
127 return MBB2IdxMap[MBBNo];
128 }
129
115130 /// getInstructionIndex - returns the base index of instr
116131 unsigned getInstructionIndex(MachineInstr* instr) const {
117132 Mi2IndexMap::const_iterator it = mi2iMap_.find(instr);
127142 "index does not correspond to an instruction");
128143 return i2miMap_[index];
129144 }
130
145
131146 std::vector addIntervalsForSpills(const LiveInterval& i,
132147 VirtRegMap& vrm,
133148 int slot);
154169 }
155170 }
156171
157 /// computeIntervals - compute live intervals
158 void computeIntervals();
172 /// computeIntervals - Compute live intervals. This returns a vector of all
173 /// the two-address instructions to the caller.
174 void computeIntervals(std::vector &TwoAddrInsts);
159175
160176 /// joinIntervals - join compatible live intervals
161177 void joinIntervals();
178
179 /// HandleTwoAddressInsts - Arrange for the specified list of 2-addr
180 /// instructions to have their src/dst regs allocated to the same register.
181 void HandleTwoAddressInsts(const std::vector &TwoAddrInsts);
162182
163183 /// CopyCoallesceInMBB - Coallsece copies in the specified MBB, putting
164184 /// copies that cannot yet be coallesced into the "TryAgain" list.
222222 return MBBNumbering[N];
223223 }
224224
225 /// getLastBlock - Returns the MachineBasicBlock with the greatest number
226 MachineBasicBlock *getLastBlock() {
227 return MBBNumbering.back();
228 }
229 const MachineBasicBlock *getLastBlock() const {
230 return MBBNumbering.back();
231 }
225 /// getNumBlockIDs - Return the number of MBB ID's allocated.
226 unsigned getNumBlockIDs() const { return MBBNumbering.size(); }
232227
233228 /// print - Print out the MachineFunction in a format suitable for debugging
234229 /// to the specified stream.