| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_REGISTER_ALLOCATOR_H_ | 5 #ifndef V8_REGISTER_ALLOCATOR_H_ |
| 6 #define V8_REGISTER_ALLOCATOR_H_ | 6 #define V8_REGISTER_ALLOCATOR_H_ |
| 7 | 7 |
| 8 #include "src/compiler/instruction.h" | 8 #include "src/compiler/instruction.h" |
| 9 #include "src/zone-containers.h" | 9 #include "src/zone-containers.h" |
| 10 | 10 |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 | 350 |
| 351 class RegisterAllocator FINAL : public ZoneObject { | 351 class RegisterAllocator FINAL : public ZoneObject { |
| 352 public: | 352 public: |
| 353 explicit RegisterAllocator(const RegisterConfiguration* config, | 353 explicit RegisterAllocator(const RegisterConfiguration* config, |
| 354 Zone* local_zone, Frame* frame, | 354 Zone* local_zone, Frame* frame, |
| 355 InstructionSequence* code, | 355 InstructionSequence* code, |
| 356 const char* debug_name = nullptr); | 356 const char* debug_name = nullptr); |
| 357 | 357 |
| 358 bool AllocationOk() { return allocation_ok_; } | 358 bool AllocationOk() { return allocation_ok_; } |
| 359 | 359 |
| 360 const ZoneList<LiveRange*>& live_ranges() const { return live_ranges_; } | 360 const ZoneVector<LiveRange*>& live_ranges() const { return live_ranges_; } |
| 361 const ZoneVector<LiveRange*>& fixed_live_ranges() const { | 361 const ZoneVector<LiveRange*>& fixed_live_ranges() const { |
| 362 return fixed_live_ranges_; | 362 return fixed_live_ranges_; |
| 363 } | 363 } |
| 364 const ZoneVector<LiveRange*>& fixed_double_live_ranges() const { | 364 const ZoneVector<LiveRange*>& fixed_double_live_ranges() const { |
| 365 return fixed_double_live_ranges_; | 365 return fixed_double_live_ranges_; |
| 366 } | 366 } |
| 367 InstructionSequence* code() const { return code_; } | 367 InstructionSequence* code() const { return code_; } |
| 368 // This zone is for datastructures only needed during register allocation. | 368 // This zone is for datastructures only needed during register allocation. |
| 369 Zone* local_zone() const { return local_zone_; } | 369 Zone* local_zone() const { return local_zone_; } |
| 370 | 370 |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 | 548 |
| 549 Zone* const local_zone_; | 549 Zone* const local_zone_; |
| 550 Frame* const frame_; | 550 Frame* const frame_; |
| 551 InstructionSequence* const code_; | 551 InstructionSequence* const code_; |
| 552 const char* const debug_name_; | 552 const char* const debug_name_; |
| 553 | 553 |
| 554 const RegisterConfiguration* config_; | 554 const RegisterConfiguration* config_; |
| 555 | 555 |
| 556 // During liveness analysis keep a mapping from block id to live_in sets | 556 // During liveness analysis keep a mapping from block id to live_in sets |
| 557 // for blocks already analyzed. | 557 // for blocks already analyzed. |
| 558 ZoneList<BitVector*> live_in_sets_; | 558 ZoneVector<BitVector*> live_in_sets_; |
| 559 | 559 |
| 560 // Liveness analysis results. | 560 // Liveness analysis results. |
| 561 ZoneList<LiveRange*> live_ranges_; | 561 ZoneVector<LiveRange*> live_ranges_; |
| 562 | 562 |
| 563 // Lists of live ranges | 563 // Lists of live ranges |
| 564 ZoneVector<LiveRange*> fixed_live_ranges_; | 564 ZoneVector<LiveRange*> fixed_live_ranges_; |
| 565 ZoneVector<LiveRange*> fixed_double_live_ranges_; | 565 ZoneVector<LiveRange*> fixed_double_live_ranges_; |
| 566 ZoneList<LiveRange*> unhandled_live_ranges_; | 566 ZoneList<LiveRange*> unhandled_live_ranges_; |
| 567 ZoneList<LiveRange*> active_live_ranges_; | 567 ZoneList<LiveRange*> active_live_ranges_; |
| 568 ZoneList<LiveRange*> inactive_live_ranges_; | 568 ZoneList<LiveRange*> inactive_live_ranges_; |
| 569 ZoneList<LiveRange*> reusable_slots_; | 569 ZoneList<LiveRange*> reusable_slots_; |
| 570 ZoneList<SpillRange*> spill_ranges_; | 570 ZoneList<SpillRange*> spill_ranges_; |
| 571 | 571 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 583 #endif | 583 #endif |
| 584 | 584 |
| 585 DISALLOW_COPY_AND_ASSIGN(RegisterAllocator); | 585 DISALLOW_COPY_AND_ASSIGN(RegisterAllocator); |
| 586 }; | 586 }; |
| 587 | 587 |
| 588 } // namespace compiler | 588 } // namespace compiler |
| 589 } // namespace internal | 589 } // namespace internal |
| 590 } // namespace v8 | 590 } // namespace v8 |
| 591 | 591 |
| 592 #endif // V8_REGISTER_ALLOCATOR_H_ | 592 #endif // V8_REGISTER_ALLOCATOR_H_ |
| OLD | NEW |