2 Author: Ruchira Sasanka
4 Purpose: This file contains the class for a map between the BasicBlock class
5 and the BBLiveVar class, which is a wrapper class of BasicBlock
6 used for the live variable analysis. The reverse mapping can
7 be found in the BBLiveVar class (It has a pointer to the
8 corresponding BasicBlock)
12 #ifndef LIVE_VAR_MAP_H
13 #define LIVE_VAR_MAP_H
15 #include <ext/hash_map>
21 struct hashFuncMInst { // sturcture containing the hash function for MInst
22 inline size_t operator () (const MachineInstr *val) const {
28 struct hashFuncBB { // sturcture containing the hash function for BB
29 inline size_t operator () (const BasicBlock *val) const {
37 typedef std::hash_map<const BasicBlock *,
38 BBLiveVar *, hashFuncBB > BBToBBLiveVarMapType;
40 typedef std::hash_map<const MachineInstr *, const LiveVarSet *,
41 hashFuncMInst> MInstToLiveVarSetMapType;