30
31 class ciMethod;
32
33 class MethodLivenessResult : public ResourceBitMap {
34 private:
35 bool _is_valid;
36
37 public:
38 MethodLivenessResult()
39 : ResourceBitMap()
40 , _is_valid(false)
41 {}
42
43 MethodLivenessResult(idx_t size_in_bits)
44 : ResourceBitMap(size_in_bits)
45 , _is_valid(false)
46 {}
47
48 void set_is_valid() { _is_valid = true; }
49 bool is_valid() const { return _is_valid; }
50 };
51
52 class MethodLiveness : public ArenaObj {
53 public:
54 // The BasicBlock class is used to represent a basic block in the
55 // liveness analysis.
56 class BasicBlock : public ArenaObj {
57 private:
58 // This class is only used by the MethodLiveness class.
59 friend class MethodLiveness;
60
61 // The analyzer which created this basic block.
62 MethodLiveness* _analyzer;
63
64 // The range of this basic block is [start_bci,limit_bci)
65 int _start_bci;
66 int _limit_bci;
67
68 // The liveness at the start of the block;
69 ArenaBitMap _entry;
|
30
31 class ciMethod;
32
33 class MethodLivenessResult : public ResourceBitMap {
34 private:
35 bool _is_valid;
36
37 public:
38 MethodLivenessResult()
39 : ResourceBitMap()
40 , _is_valid(false)
41 {}
42
43 MethodLivenessResult(idx_t size_in_bits)
44 : ResourceBitMap(size_in_bits)
45 , _is_valid(false)
46 {}
47
48 void set_is_valid() { _is_valid = true; }
49 bool is_valid() const { return _is_valid; }
50
51 #ifdef ASSERT
52 bool at(idx_t index) const {
53 assert(is_valid(), "reading invalid");
54 return ResourceBitMap::at(index);
55 }
56 #endif
57 };
58
59 class MethodLiveness : public ArenaObj {
60 public:
61 // The BasicBlock class is used to represent a basic block in the
62 // liveness analysis.
63 class BasicBlock : public ArenaObj {
64 private:
65 // This class is only used by the MethodLiveness class.
66 friend class MethodLiveness;
67
68 // The analyzer which created this basic block.
69 MethodLiveness* _analyzer;
70
71 // The range of this basic block is [start_bci,limit_bci)
72 int _start_bci;
73 int _limit_bci;
74
75 // The liveness at the start of the block;
76 ArenaBitMap _entry;
|