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

Chris Lattner lattner at cs.uiuc.edu
Thu Jul 1 01:16:08 PDT 2004


Changes in directory llvm/include/llvm/CodeGen:

LiveVariables.h updated: 1.14 -> 1.15

---
Log message:

Now that we have happy mappings from MBBs->numbers, use them instead of keeping
a LV private map


---
Diffs of the changes:  (+0 -23)

Index: llvm/include/llvm/CodeGen/LiveVariables.h
diff -u llvm/include/llvm/CodeGen/LiveVariables.h:1.14 llvm/include/llvm/CodeGen/LiveVariables.h:1.15
--- llvm/include/llvm/CodeGen/LiveVariables.h:1.14	Sat May  1 16:23:35 2004
+++ llvm/include/llvm/CodeGen/LiveVariables.h	Thu Jul  1 01:14:57 2004
@@ -99,16 +99,6 @@
   std::vector<bool> AllocatablePhysicalRegisters;
 
 private:   // Intermediate data structures
-
-  /// 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
-  /// when the getIndexMachineBasicBlock() method is called.
-  std::vector<MachineBasicBlock*> BBIdxMap;
-  
   const MRegisterInfo *RegInfo;
 
   MachineInstr **PhysRegInfo;
@@ -121,17 +111,6 @@
 
   virtual bool runOnMachineFunction(MachineFunction &MF);
 
-  /// getMachineBasicBlockIndex - Turn a MachineBasicBlock into an index number
-  /// suitable for use with VarInfo's.
-  ///
-  unsigned getMachineBasicBlockIndex(MachineBasicBlock *MBB) const {
-    return BBMap.find(MBB)->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
   ///
   typedef std::multimap<MachineInstr*, unsigned>::iterator killed_iterator;
@@ -253,8 +232,6 @@
     VirtRegInfo.clear();
     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