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/ostreams.h" | 9 #include "src/ostreams.h" |
10 #include "src/register-configuration.h" | 10 #include "src/register-configuration.h" |
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 const InstructionOperand& operand, | 543 const InstructionOperand& operand, |
544 bool might_be_duplicated); | 544 bool might_be_duplicated); |
545 | 545 |
546 // If all the children of this range are spilled in deferred blocks, and if | 546 // If all the children of this range are spilled in deferred blocks, and if |
547 // for any non-spilled child with a use position requiring a slot, that range | 547 // for any non-spilled child with a use position requiring a slot, that range |
548 // is contained in a deferred block, mark the range as | 548 // is contained in a deferred block, mark the range as |
549 // IsSpilledOnlyInDeferredBlocks, so that we avoid spilling at definition, | 549 // IsSpilledOnlyInDeferredBlocks, so that we avoid spilling at definition, |
550 // and instead let the LiveRangeConnector perform the spills within the | 550 // and instead let the LiveRangeConnector perform the spills within the |
551 // deferred blocks. If so, we insert here spills for non-spilled ranges | 551 // deferred blocks. If so, we insert here spills for non-spilled ranges |
552 // with slot use positions. | 552 // with slot use positions. |
| 553 void MarkSpilledInDeferredBlock(const InstructionSequence* code); |
553 bool TryCommitSpillInDeferredBlock(InstructionSequence* code, | 554 bool TryCommitSpillInDeferredBlock(InstructionSequence* code, |
554 const InstructionOperand& spill_operand); | 555 const InstructionOperand& spill_operand); |
555 | 556 |
556 TopLevelLiveRange* splintered_from() const { return splintered_from_; } | 557 TopLevelLiveRange* splintered_from() const { return splintered_from_; } |
557 bool IsSplinter() const { return splintered_from_ != nullptr; } | 558 bool IsSplinter() const { return splintered_from_ != nullptr; } |
558 bool MayRequireSpillRange() const { | 559 bool MayRequireSpillRange() const { |
559 DCHECK(!IsSplinter()); | 560 DCHECK(!IsSplinter()); |
560 return !HasSpillOperand() && spill_range_ == nullptr; | 561 return !HasSpillOperand() && spill_range_ == nullptr; |
561 } | 562 } |
562 void UpdateSpillRangePostMerge(TopLevelLiveRange* merged); | 563 void UpdateSpillRangePostMerge(TopLevelLiveRange* merged); |
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1116 RegisterAllocationData* const data_; | 1117 RegisterAllocationData* const data_; |
1117 | 1118 |
1118 DISALLOW_COPY_AND_ASSIGN(LiveRangeConnector); | 1119 DISALLOW_COPY_AND_ASSIGN(LiveRangeConnector); |
1119 }; | 1120 }; |
1120 | 1121 |
1121 } // namespace compiler | 1122 } // namespace compiler |
1122 } // namespace internal | 1123 } // namespace internal |
1123 } // namespace v8 | 1124 } // namespace v8 |
1124 | 1125 |
1125 #endif // V8_REGISTER_ALLOCATOR_H_ | 1126 #endif // V8_REGISTER_ALLOCATOR_H_ |
OLD | NEW |