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 904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
915 } | 915 } |
916 | 916 |
917 // TODO(mtrofin): explain why splitting in gap START is always OK. | 917 // TODO(mtrofin): explain why splitting in gap START is always OK. |
918 LifetimePosition GetSplitPositionForInstruction(const LiveRange* range, | 918 LifetimePosition GetSplitPositionForInstruction(const LiveRange* range, |
919 int instruction_index); | 919 int instruction_index); |
920 | 920 |
921 Zone* allocation_zone() const { return data()->allocation_zone(); } | 921 Zone* allocation_zone() const { return data()->allocation_zone(); } |
922 | 922 |
923 // Find the optimal split for ranges defined by a memory operand, e.g. | 923 // Find the optimal split for ranges defined by a memory operand, e.g. |
924 // constants or function parameters passed on the stack. | 924 // constants or function parameters passed on the stack. |
925 void SplitAndSpillRangesDefinedByMemoryOperand(); | 925 void SplitAndSpillRangesDefinedByMemoryOperand(bool operands_only); |
926 | 926 |
927 // Split the given range at the given position. | 927 // Split the given range at the given position. |
928 // If range starts at or after the given position then the | 928 // If range starts at or after the given position then the |
929 // original range is returned. | 929 // original range is returned. |
930 // Otherwise returns the live range that starts at pos and contains | 930 // Otherwise returns the live range that starts at pos and contains |
931 // all uses from the original range that follow pos. Uses at pos will | 931 // all uses from the original range that follow pos. Uses at pos will |
932 // still be owned by the original range after splitting. | 932 // still be owned by the original range after splitting. |
933 LiveRange* SplitRangeAt(LiveRange* range, LifetimePosition pos); | 933 LiveRange* SplitRangeAt(LiveRange* range, LifetimePosition pos); |
934 | 934 |
935 bool CanProcessRange(LiveRange* range) const { | 935 bool CanProcessRange(LiveRange* range) const { |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1117 RegisterAllocationData* const data_; | 1117 RegisterAllocationData* const data_; |
1118 | 1118 |
1119 DISALLOW_COPY_AND_ASSIGN(LiveRangeConnector); | 1119 DISALLOW_COPY_AND_ASSIGN(LiveRangeConnector); |
1120 }; | 1120 }; |
1121 | 1121 |
1122 } // namespace compiler | 1122 } // namespace compiler |
1123 } // namespace internal | 1123 } // namespace internal |
1124 } // namespace v8 | 1124 } // namespace v8 |
1125 | 1125 |
1126 #endif // V8_REGISTER_ALLOCATOR_H_ | 1126 #endif // V8_REGISTER_ALLOCATOR_H_ |
OLD | NEW |