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 #include "src/base/adapters.h" | 5 #include "src/base/adapters.h" |
6 #include "src/compiler/linkage.h" | 6 #include "src/compiler/linkage.h" |
7 #include "src/compiler/register-allocator.h" | 7 #include "src/compiler/register-allocator.h" |
8 #include "src/string-stream.h" | 8 #include "src/string-stream.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
864 UsePosition* pos = first_pos_; | 864 UsePosition* pos = first_pos_; |
865 for (; pos->next() != nullptr; pos = pos->next()) { | 865 for (; pos->next() != nullptr; pos = pos->next()) { |
866 } | 866 } |
867 pos->set_next(end_part.first_pos_); | 867 pos->set_next(end_part.first_pos_); |
868 } | 868 } |
869 } | 869 } |
870 result->next_ = nullptr; | 870 result->next_ = nullptr; |
871 result->top_level_ = result; | 871 result->top_level_ = result; |
872 | 872 |
873 result->SetSplinteredFrom(this); | 873 result->SetSplinteredFrom(this); |
| 874 // Ensure the result's relative ID is unique within the IDs used for this |
| 875 // virtual register's children and splinters. |
| 876 result->relative_id_ = GetNextChildId(); |
874 } | 877 } |
875 | 878 |
876 | 879 |
877 void TopLevelLiveRange::SetSplinteredFrom(TopLevelLiveRange* splinter_parent) { | 880 void TopLevelLiveRange::SetSplinteredFrom(TopLevelLiveRange* splinter_parent) { |
878 // The splinter parent is always the original "Top". | 881 // The splinter parent is always the original "Top". |
879 DCHECK(splinter_parent->Start() < Start()); | 882 DCHECK(splinter_parent->Start() < Start()); |
880 | 883 |
881 splintered_from_ = splinter_parent; | 884 splintered_from_ = splinter_parent; |
882 if (!HasSpillOperand() && splinter_parent->spill_range_ != nullptr) { | 885 if (!HasSpillOperand() && splinter_parent->spill_range_ != nullptr) { |
883 SetSpillRange(splinter_parent->spill_range_); | 886 SetSpillRange(splinter_parent->spill_range_); |
(...skipping 2432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3316 auto eliminate = moves->PrepareInsertAfter(move); | 3319 auto eliminate = moves->PrepareInsertAfter(move); |
3317 to_insert.push_back(move); | 3320 to_insert.push_back(move); |
3318 if (eliminate != nullptr) to_eliminate.push_back(eliminate); | 3321 if (eliminate != nullptr) to_eliminate.push_back(eliminate); |
3319 } | 3322 } |
3320 } | 3323 } |
3321 | 3324 |
3322 | 3325 |
3323 } // namespace compiler | 3326 } // namespace compiler |
3324 } // namespace internal | 3327 } // namespace internal |
3325 } // namespace v8 | 3328 } // namespace v8 |
OLD | NEW |