[llvm-commits] CVS: llvm/include/llvm/CodeGen/LiveVariables.h
Chris Lattner
lattner at cs.uiuc.edu
Fri Jan 30 16:09:05 PST 2004
Changes in directory llvm/include/llvm/CodeGen:
LiveVariables.h updated: 1.11 -> 1.12
---
Log message:
Add a new lazily constructed mapping from Idx's the MBB they represent
---
Diffs of the changes: (+10 -0)
Index: llvm/include/llvm/CodeGen/LiveVariables.h
diff -u llvm/include/llvm/CodeGen/LiveVariables.h:1.11 llvm/include/llvm/CodeGen/LiveVariables.h:1.12
--- llvm/include/llvm/CodeGen/LiveVariables.h:1.11 Sun Jan 11 03:18:45 2004
+++ llvm/include/llvm/CodeGen/LiveVariables.h Fri Jan 30 16:08:09 2004
@@ -103,6 +103,12 @@
/// BBMap - Maps LLVM basic blocks to their corresponding machine basic block.
/// This also provides a numbering of the basic blocks in the function.
std::map<const BasicBlock*, std::pair<MachineBasicBlock*, unsigned> > BBMap;
+
+
+ /// BBIdxMap - This contains the inverse mapping of BBMap, going from block ID
+ /// numbers to the corresponding MachineBasicBlock. This is lazily computed
+ /// when the getIndexMachineBasicBlock() method is called.
+ std::vector<MachineBasicBlock*> BBIdxMap;
const MRegisterInfo *RegInfo;
@@ -126,6 +132,9 @@
return BBMap.find(BB)->second;
}
+ /// getIndexMachineBasicBlock() - Given a block index, return the
+ /// MachineBasicBlock corresponding to it.
+ MachineBasicBlock *getIndexMachineBasicBlock(unsigned Idx);
/// killed_iterator - Iterate over registers killed by a machine instruction
///
@@ -243,6 +252,7 @@
RegistersKilled.clear();
RegistersDead.clear();
BBMap.clear();
+ BBIdxMap.clear();
}
/// getVarInfo - Return the VarInfo structure for the specified VIRTUAL
More information about the llvm-commits
mailing list