equal
deleted
inserted
replaced
53 protected: |
53 protected: |
54 Block **_blocks; |
54 Block **_blocks; |
55 void grow( uint i ); // Grow array node to fit |
55 void grow( uint i ); // Grow array node to fit |
56 |
56 |
57 public: |
57 public: |
58 Block_Array(Arena *a) : _arena(a), _size(OptoBlockListSize) { |
58 Block_Array(Arena *a) : _size(OptoBlockListSize), _arena(a) { |
59 debug_only(_limit=0); |
59 debug_only(_limit=0); |
60 _blocks = NEW_ARENA_ARRAY( a, Block *, OptoBlockListSize ); |
60 _blocks = NEW_ARENA_ARRAY( a, Block *, OptoBlockListSize ); |
61 for( int i = 0; i < OptoBlockListSize; i++ ) { |
61 for( int i = 0; i < OptoBlockListSize; i++ ) { |
62 _blocks[i] = NULL; |
62 _blocks[i] = NULL; |
63 } |
63 } |
750 interior // edge is interior to trace (could be backedge) |
750 interior // edge is interior to trace (could be backedge) |
751 }; |
751 }; |
752 |
752 |
753 CFGEdge(Block *from, Block *to, double freq, int from_pct, int to_pct) : |
753 CFGEdge(Block *from, Block *to, double freq, int from_pct, int to_pct) : |
754 _from(from), _to(to), _freq(freq), |
754 _from(from), _to(to), _freq(freq), |
755 _from_pct(from_pct), _to_pct(to_pct), _state(open) { |
755 _state(open), _from_pct(from_pct), _to_pct(to_pct) { |
756 _infrequent = from_infrequent() || to_infrequent(); |
756 _infrequent = from_infrequent() || to_infrequent(); |
757 } |
757 } |
758 |
758 |
759 double freq() const { return _freq; } |
759 double freq() const { return _freq; } |
760 Block* from() const { return _from; } |
760 Block* from() const { return _from; } |
798 } |
798 } |
799 |
799 |
800 public: |
800 public: |
801 |
801 |
802 Trace(Block *b, Block **next_list, Block **prev_list) : |
802 Trace(Block *b, Block **next_list, Block **prev_list) : |
803 _first(b), |
803 _id(b->_pre_order), |
804 _last(b), |
|
805 _next_list(next_list), |
804 _next_list(next_list), |
806 _prev_list(prev_list), |
805 _prev_list(prev_list), |
807 _id(b->_pre_order) { |
806 _first(b), |
|
807 _last(b) { |
808 set_next(b, NULL); |
808 set_next(b, NULL); |
809 set_prev(b, NULL); |
809 set_prev(b, NULL); |
810 }; |
810 }; |
811 |
811 |
812 // Return the id number |
812 // Return the id number |