Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: src/compiler/register-allocator.h

Issue 1318893002: [turbofan] LiveRange splinter merging optimizations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/compiler/register-allocator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/ostreams.h" 9 #include "src/ostreams.h"
10 #include "src/zone-containers.h" 10 #include "src/zone-containers.h"
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 int GetNextChildId() { return ++last_child_id_; } 538 int GetNextChildId() { return ++last_child_id_; }
539 bool IsSpilledOnlyInDeferredBlocks() const { 539 bool IsSpilledOnlyInDeferredBlocks() const {
540 return spilled_in_deferred_blocks_; 540 return spilled_in_deferred_blocks_;
541 } 541 }
542 542
543 struct SpillAtDefinitionList; 543 struct SpillAtDefinitionList;
544 544
545 SpillAtDefinitionList* spills_at_definition() const { 545 SpillAtDefinitionList* spills_at_definition() const {
546 return spills_at_definition_; 546 return spills_at_definition_;
547 } 547 }
548 void set_last_child(LiveRange* range) { last_child_ = range; }
549 LiveRange* last_child() const { return last_child_; }
548 550
549 private: 551 private:
550 typedef BitField<bool, 1, 1> HasSlotUseField; 552 typedef BitField<bool, 1, 1> HasSlotUseField;
551 typedef BitField<bool, 2, 1> IsPhiField; 553 typedef BitField<bool, 2, 1> IsPhiField;
552 typedef BitField<bool, 3, 1> IsNonLoopPhiField; 554 typedef BitField<bool, 3, 1> IsNonLoopPhiField;
553 typedef BitField<SpillType, 4, 2> SpillTypeField; 555 typedef BitField<SpillType, 4, 2> SpillTypeField;
554 556
555 LiveRange* GetLastChild();
556
557 int vreg_; 557 int vreg_;
558 int last_child_id_; 558 int last_child_id_;
559 TopLevelLiveRange* splintered_from_; 559 TopLevelLiveRange* splintered_from_;
560 union { 560 union {
561 // Correct value determined by spill_type() 561 // Correct value determined by spill_type()
562 InstructionOperand* spill_operand_; 562 InstructionOperand* spill_operand_;
563 SpillRange* spill_range_; 563 SpillRange* spill_range_;
564 }; 564 };
565 SpillAtDefinitionList* spills_at_definition_; 565 SpillAtDefinitionList* spills_at_definition_;
566 // TODO(mtrofin): generalize spilling after definition, currently specialized 566 // TODO(mtrofin): generalize spilling after definition, currently specialized
567 // just for spill in a single deferred block. 567 // just for spill in a single deferred block.
568 bool spilled_in_deferred_blocks_; 568 bool spilled_in_deferred_blocks_;
569 int spill_start_index_; 569 int spill_start_index_;
570 LiveRange* last_child_;
571 LiveRange* last_insertion_point_;
570 572
571 DISALLOW_COPY_AND_ASSIGN(TopLevelLiveRange); 573 DISALLOW_COPY_AND_ASSIGN(TopLevelLiveRange);
572 }; 574 };
573 575
574 576
575 struct PrintableLiveRange { 577 struct PrintableLiveRange {
576 const RegisterConfiguration* register_configuration_; 578 const RegisterConfiguration* register_configuration_;
577 const LiveRange* range_; 579 const LiveRange* range_;
578 }; 580 };
579 581
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
1043 RegisterAllocationData* const data_; 1045 RegisterAllocationData* const data_;
1044 1046
1045 DISALLOW_COPY_AND_ASSIGN(LiveRangeConnector); 1047 DISALLOW_COPY_AND_ASSIGN(LiveRangeConnector);
1046 }; 1048 };
1047 1049
1048 } // namespace compiler 1050 } // namespace compiler
1049 } // namespace internal 1051 } // namespace internal
1050 } // namespace v8 1052 } // namespace v8
1051 1053
1052 #endif // V8_REGISTER_ALLOCATOR_H_ 1054 #endif // V8_REGISTER_ALLOCATOR_H_
OLDNEW
« no previous file with comments | « no previous file | src/compiler/register-allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698