-/// getIndexMachineBasicBlock() - Given a block index, return the
-/// MachineBasicBlock corresponding to it.
-MachineBasicBlock *LiveVariables::getIndexMachineBasicBlock(unsigned Idx) {
- if (BBIdxMap.empty()) {
- BBIdxMap.resize(BBMap.size());
- for (std::map<MachineBasicBlock*, unsigned>::iterator I = BBMap.begin(),
- E = BBMap.end(); I != E; ++I) {
- assert(BBIdxMap.size() > I->second && "Indices are not sequential");
- assert(BBIdxMap[I->second] == 0 && "Multiple idx collision!");
- BBIdxMap[I->second] = I->first;
- }
- }
- assert(Idx < BBIdxMap.size() && "BB Index out of range!");
- return BBIdxMap[Idx];
-}
-