[llvm-commits] CVS: llvm/include/llvm/CodeGen/LiveVariables.h

Chris Lattner lattner at cs.uiuc.edu
Sat May 1 16:24:03 PDT 2004


Changes in directory llvm/include/llvm/CodeGen:

LiveVariables.h updated: 1.13 -> 1.14

---
Log message:

Stop LiveVariables from using BasicBlocks as part of the mapping, instead
use MachineBasicBlocks.


---
Diffs of the changes:  (+6 -10)

Index: llvm/include/llvm/CodeGen/LiveVariables.h
diff -u llvm/include/llvm/CodeGen/LiveVariables.h:1.13 llvm/include/llvm/CodeGen/LiveVariables.h:1.14
--- llvm/include/llvm/CodeGen/LiveVariables.h:1.13	Thu Feb 19 12:28:22 2004
+++ llvm/include/llvm/CodeGen/LiveVariables.h	Sat May  1 16:23:35 2004
@@ -100,10 +100,9 @@
 
 private:   // Intermediate data structures
 
-  /// 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;
-
+  /// BBMap - This provides a numbering of the basic blocks in the function.
+  ///
+  std::map<MachineBasicBlock*, unsigned> BBMap;
 
   /// BBIdxMap - This contains the inverse mapping of BBMap, going from block ID
   /// numbers to the corresponding MachineBasicBlock.  This is lazily computed
@@ -125,11 +124,8 @@
   /// getMachineBasicBlockIndex - Turn a MachineBasicBlock into an index number
   /// suitable for use with VarInfo's.
   ///
-  const std::pair<MachineBasicBlock*, unsigned>
-      &getMachineBasicBlockInfo(MachineBasicBlock *MBB) const;
-  const std::pair<MachineBasicBlock*, unsigned>
-      &getBasicBlockInfo(const BasicBlock *BB) const {
-    return BBMap.find(BB)->second;
+  unsigned getMachineBasicBlockIndex(MachineBasicBlock *MBB) const {
+    return BBMap.find(MBB)->second;
   }
 
   /// getIndexMachineBasicBlock() - Given a block index, return the
@@ -269,7 +265,7 @@
     return AllocatablePhysicalRegisters;
   }
 
-  void MarkVirtRegAliveInBlock(VarInfo &VRInfo, const BasicBlock *BB);
+  void MarkVirtRegAliveInBlock(VarInfo &VRInfo, MachineBasicBlock *BB);
   void HandleVirtRegUse(VarInfo &VRInfo, MachineBasicBlock *MBB,
                        	MachineInstr *MI);
 };





More information about the llvm-commits mailing list