|
18 | 18 | #ifndef LIVERANGE_H
|
19 | 19 | #define LIVERANGE_H
|
20 | 20 |
|
21 |
| -#include "llvm/CodeGen/ValueSet.h" |
22 | 21 | #include "llvm/Value.h"
|
| 22 | +#include "llvm/CodeGen/ValueSet.h" |
23 | 23 |
|
24 | 24 | class RegClass;
|
25 | 25 | class IGNode;
|
26 | 26 |
|
27 | 27 | class LiveRange : public ValueSet {
|
28 |
| - RegClass *MyRegClass; // register classs (e.g., int, FP) for this LR |
| 28 | + RegClass *MyRegClass; // register class (e.g., int, FP) for this LR |
29 | 29 |
|
30 |
| - // doesSpanAcrossCalls - Does this live range span across calls? |
31 |
| - // This information is used by graph |
32 |
| - // coloring algo to avoid allocating volatile colors to live ranges |
33 |
| - // that span across calls (since they have to be saved/restored) |
34 |
| - // |
| 30 | + /// doesSpanAcrossCalls - Does this live range span across calls? |
| 31 | + /// This information is used by graph coloring algo to avoid allocating |
| 32 | + /// volatile colors to live ranges that span across calls (since they have to |
| 33 | + /// be saved/restored) |
| 34 | + /// |
35 | 35 | bool doesSpanAcrossCalls;
|
36 | 36 |
|
37 | 37 | IGNode *UserIGNode; // IGNode which uses this LR
|
38 | 38 | int Color; // color assigned to this live range
|
39 | 39 | bool mustSpill; // whether this LR must be spilt
|
40 | 40 |
|
41 |
| - // mustSaveAcrossCalls - whether this LR must be saved accross calls |
42 |
| - // ***TODO REMOVE this |
43 |
| - // |
| 41 | + /// mustSaveAcrossCalls - whether this LR must be saved accross calls |
| 42 | + /// ***TODO REMOVE this |
| 43 | + /// |
44 | 44 | bool mustSaveAcrossCalls;
|
45 | 45 |
|
46 |
| - // SuggestedColor - if this LR has a suggested color, can it be |
47 |
| - // really alloated? A suggested color cannot be allocated when the |
48 |
| - // suggested color is volatile and when there are call |
49 |
| - // interferences. |
50 |
| - // |
| 46 | + /// SuggestedColor - if this LR has a suggested color, can it be |
| 47 | + /// really alloated? A suggested color cannot be allocated when the |
| 48 | + /// suggested color is volatile and when there are call |
| 49 | + /// interferences. |
| 50 | + /// |
51 | 51 | int SuggestedColor; // The suggested color for this LR
|
52 | 52 |
|
53 |
| - // CanUseSuggestedCol - It is possible that a suggested color for |
54 |
| - // this live range is not available before graph coloring (e.g., it |
55 |
| - // can be allocated to another live range which interferes with |
56 |
| - // this) |
57 |
| - // |
| 53 | + /// CanUseSuggestedCol - It is possible that a suggested color for |
| 54 | + /// this live range is not available before graph coloring (e.g., it |
| 55 | + /// can be allocated to another live range which interferes with |
| 56 | + /// this) |
| 57 | + /// |
58 | 58 | bool CanUseSuggestedCol;
|
59 | 59 |
|
60 |
| - // SpilledStackOffsetFromFP - If this LR is spilled, its stack |
61 |
| - // offset from *FP*. The spilled offsets must always be relative to |
62 |
| - // the FP. |
63 |
| - // |
| 60 | + /// SpilledStackOffsetFromFP - If this LR is spilled, its stack |
| 61 | + /// offset from *FP*. The spilled offsets must always be relative to |
| 62 | + /// the FP. |
| 63 | + /// |
64 | 64 | int SpilledStackOffsetFromFP;
|
65 | 65 |
|
66 |
| - // HasSpillOffset 0 Whether this live range has a spill offset |
67 |
| - // |
| 66 | + /// HasSpillOffset 0 Whether this live range has a spill offset |
| 67 | + /// |
68 | 68 | bool HasSpillOffset;
|
69 | 69 |
|
70 |
| - // The spill cost of this live range. Calculated using loop depth of |
71 |
| - // each reference to each Value in the live range |
72 |
| - // |
| 70 | + /// The spill cost of this live range. Calculated using loop depth of |
| 71 | + /// each reference to each Value in the live range |
| 72 | + /// |
73 | 73 | unsigned SpillCost;
|
74 | 74 |
|
75 | 75 | public:
|
|
0 commit comments