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 901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
912 private: | 912 private: |
913 RegisterAllocationData* data() const { return data_; } | 913 RegisterAllocationData* data() const { return data_; } |
914 InstructionSequence* code() const { return data()->code(); } | 914 InstructionSequence* code() const { return data()->code(); } |
915 Zone* allocation_zone() const { return data()->allocation_zone(); } | 915 Zone* allocation_zone() const { return data()->allocation_zone(); } |
916 Zone* code_zone() const { return code()->zone(); } | 916 Zone* code_zone() const { return code()->zone(); } |
917 const RegisterConfiguration* config() const { return data()->config(); } | 917 const RegisterConfiguration* config() const { return data()->config(); } |
918 ZoneVector<BitVector*>& live_in_sets() const { | 918 ZoneVector<BitVector*>& live_in_sets() const { |
919 return data()->live_in_sets(); | 919 return data()->live_in_sets(); |
920 } | 920 } |
921 | 921 |
| 922 // Verification. |
922 void Verify() const; | 923 void Verify() const; |
| 924 bool IntervalStartsAtBlockBoundary(const UseInterval* interval) const; |
| 925 bool IntervalPredecessorsCoveredByRange(const UseInterval* interval, |
| 926 const TopLevelLiveRange* range) const; |
| 927 bool NextIntervalStartsInDifferentBlocks(const UseInterval* interval) const; |
923 | 928 |
924 // Liveness analysis support. | 929 // Liveness analysis support. |
925 void AddInitialIntervals(const InstructionBlock* block, BitVector* live_out); | 930 void AddInitialIntervals(const InstructionBlock* block, BitVector* live_out); |
926 void ProcessInstructions(const InstructionBlock* block, BitVector* live); | 931 void ProcessInstructions(const InstructionBlock* block, BitVector* live); |
927 void ProcessPhis(const InstructionBlock* block, BitVector* live); | 932 void ProcessPhis(const InstructionBlock* block, BitVector* live); |
928 void ProcessLoopHeader(const InstructionBlock* block, BitVector* live); | 933 void ProcessLoopHeader(const InstructionBlock* block, BitVector* live); |
929 | 934 |
930 static int FixedLiveRangeID(int index) { return -index - 1; } | 935 static int FixedLiveRangeID(int index) { return -index - 1; } |
931 int FixedDoubleLiveRangeID(int index); | 936 int FixedDoubleLiveRangeID(int index); |
932 TopLevelLiveRange* FixedLiveRangeFor(int index); | 937 TopLevelLiveRange* FixedLiveRangeFor(int index); |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1184 RegisterAllocationData* const data_; | 1189 RegisterAllocationData* const data_; |
1185 | 1190 |
1186 DISALLOW_COPY_AND_ASSIGN(LiveRangeConnector); | 1191 DISALLOW_COPY_AND_ASSIGN(LiveRangeConnector); |
1187 }; | 1192 }; |
1188 | 1193 |
1189 } // namespace compiler | 1194 } // namespace compiler |
1190 } // namespace internal | 1195 } // namespace internal |
1191 } // namespace v8 | 1196 } // namespace v8 |
1192 | 1197 |
1193 #endif // V8_REGISTER_ALLOCATOR_H_ | 1198 #endif // V8_REGISTER_ALLOCATOR_H_ |
OLD | NEW |