Add prototypes for creation/destruction passes
[oota-llvm.git] / include / llvm / CodeGen / RegColorMap.h
1 #ifndef REG_COLOR_MAP
2 #define REG_COLOR_MAP
3
4 #include <hash_map>
5
6
7 #ifndef VALUE_SET_H
8
9 struct hashFuncValue {                  // sturcture containing the hash func
10   inline size_t operator () (const Value *const val) const 
11   { return (size_t) val;  }
12 };
13
14 #endif
15
16
17 typedef int RegColorType;
18
19
20 class RegColorMap : hash_map <const Value *, RegColorType, hashFuncValue> 
21 {
22
23  public:
24
25   inline void setRegColor(const Value *const Val, RegColorType Col) {
26     (*this)[Val] = Col;
27   }
28
29
30   inline RegColorType getRegColor(const Value *const Val) {
31     return (*this)[Val];
32   }
33     
34
35 };
36
37 #endif