/* Title:   LiveVarMap.h
   Author:  Ruchira Sasanka
   Date:    Jun 30, 01
   Purpose: This file contains the class for a map between the BasicBlock class
            and the BBLiveVar class, which is a wrapper class of BasicBlock
	    used for the live variable analysis. The reverse mapping can
	    be found in the BBLiveVar class (It has a pointer to the 
	    corresponding BasicBlock)
*/


#ifndef LIVE_VAR_MAP_H
#define LIVE_VAR_MAP_H

#include <ext/hash_map>

class BasicBlock;
class BBLiveVar;


struct hashFuncMInst {  // sturcture containing the hash function for MInst
  inline size_t operator () (const MachineInstr *val) const { 
    return (size_t) val;  
  }
};


struct hashFuncBB {          // sturcture containing the hash function for BB
  inline size_t operator () (const BasicBlock *val) const { 
    return (size_t) val; 
  }
};




typedef std::hash_map<const BasicBlock *,  
                      BBLiveVar *, hashFuncBB > BBToBBLiveVarMapType;

typedef std::hash_map<const MachineInstr *,  const LiveVarSet *, 
                      hashFuncMInst> MInstToLiveVarSetMapType;


#endif



/* Title:   LiveVarMap.h   -*- C++ -*-
   Author:  Ruchira Sasanka
   Date:    Jun 30, 01
   Purpose: This file contains the class for a map between the BasicBlock class
            and the BBLiveVar class, which is a wrapper class of BasicBlock
	    used for the live variable analysis. The reverse mapping can
	    be found in the BBLiveVar class (It has a pointer to the 
	    corresponding BasicBlock)
*/

#ifndef LIVE_VAR_MAP_H
#define LIVE_VAR_MAP_H

#include "Support/HashExtras.h"

class MachineInstr;
class BasicBlock;
class BBLiveVar;
class LiveVarSet;

typedef std::hash_map<const BasicBlock *, BBLiveVar *> BBToBBLiveVarMapType;
typedef std::hash_map<const MachineInstr *, const LiveVarSet *> MInstToLiveVarSetMapType;

#endif

Use generic pointer hashes instead of custom ones.
Use generic pointer hashes instead of custom ones.


git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@1684 91177308-0d34-0410-b5e6-96231b3b80d8
