OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef V8_LIVE_RANGE_SEPARATOR_H_ |
| 6 #define V8_LIVE_RANGE_SEPARATOR_H_ |
| 7 |
| 8 |
| 9 #include <src/zone.h> |
| 10 namespace v8 { |
| 11 namespace internal { |
| 12 |
| 13 class Zone; |
| 14 |
| 15 namespace compiler { |
| 16 |
| 17 class RegisterAllocationData; |
| 18 |
| 19 |
| 20 // A register allocation pair of transformations: splinter and merge live ranges |
| 21 class LiveRangeSeparator final : public ZoneObject { |
| 22 public: |
| 23 LiveRangeSeparator(RegisterAllocationData* data, Zone* zone) |
| 24 : data_(data), zone_(zone) {} |
| 25 |
| 26 void Splinter(); |
| 27 |
| 28 private: |
| 29 RegisterAllocationData* data() const { return data_; } |
| 30 Zone* zone() const { return zone_; } |
| 31 |
| 32 RegisterAllocationData* const data_; |
| 33 Zone* const zone_; |
| 34 |
| 35 DISALLOW_COPY_AND_ASSIGN(LiveRangeSeparator); |
| 36 }; |
| 37 |
| 38 |
| 39 class LiveRangeMerger final : public ZoneObject { |
| 40 public: |
| 41 LiveRangeMerger(RegisterAllocationData* data, Zone* zone) |
| 42 : data_(data), zone_(zone) {} |
| 43 |
| 44 void Merge(); |
| 45 |
| 46 private: |
| 47 RegisterAllocationData* data() const { return data_; } |
| 48 Zone* zone() const { return zone_; } |
| 49 |
| 50 RegisterAllocationData* const data_; |
| 51 Zone* const zone_; |
| 52 |
| 53 DISALLOW_COPY_AND_ASSIGN(LiveRangeMerger); |
| 54 }; |
| 55 |
| 56 |
| 57 } // namespace compiler |
| 58 } // namespace internal |
| 59 } // namespace v8 |
| 60 #endif // V8_LIVE_RANGE_SEPARATOR_H_ |
OLD | NEW |