| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 | 77 |
| 78 bool IsOutputFPRegisterOf(Instruction* instr, MachineRepresentation rep, | 78 bool IsOutputFPRegisterOf(Instruction* instr, MachineRepresentation rep, |
| 79 int code) { | 79 int code) { |
| 80 for (size_t i = 0; i < instr->OutputCount(); i++) { | 80 for (size_t i = 0; i < instr->OutputCount(); i++) { |
| 81 InstructionOperand* output = instr->OutputAt(i); | 81 InstructionOperand* output = instr->OutputAt(i); |
| 82 if (output->IsFPRegister()) { | 82 if (output->IsFPRegister()) { |
| 83 const LocationOperand* op = LocationOperand::cast(output); | 83 const LocationOperand* op = LocationOperand::cast(output); |
| 84 if (kSimpleFPAliasing) { | 84 if (kSimpleFPAliasing) { |
| 85 if (op->register_code() == code) return true; | 85 if (op->register_code() == code) return true; |
| 86 } else { | 86 } else { |
| 87 if (RegisterConfiguration::ArchDefault(RegisterConfiguration::TURBOFAN) | 87 if (RegisterConfiguration::Turbofan()->AreAliases( |
| 88 ->AreAliases(op->representation(), op->register_code(), rep, | 88 op->representation(), op->register_code(), rep, code)) { |
| 89 code)) { | |
| 90 return true; | 89 return true; |
| 91 } | 90 } |
| 92 } | 91 } |
| 93 } | 92 } |
| 94 } | 93 } |
| 95 return false; | 94 return false; |
| 96 } | 95 } |
| 97 | 96 |
| 98 | 97 |
| 99 // TODO(dcarney): fix frame to allow frame accesses to half size location. | 98 // TODO(dcarney): fix frame to allow frame accesses to half size location. |
| (...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 816 wrapper.register_configuration_ = config; | 815 wrapper.register_configuration_ = config; |
| 817 for (const LiveRange* i = this; i != nullptr; i = i->next()) { | 816 for (const LiveRange* i = this; i != nullptr; i = i->next()) { |
| 818 wrapper.range_ = i; | 817 wrapper.range_ = i; |
| 819 os << wrapper << std::endl; | 818 os << wrapper << std::endl; |
| 820 if (!with_children) break; | 819 if (!with_children) break; |
| 821 } | 820 } |
| 822 } | 821 } |
| 823 | 822 |
| 824 | 823 |
| 825 void LiveRange::Print(bool with_children) const { | 824 void LiveRange::Print(bool with_children) const { |
| 826 const RegisterConfiguration* config = | 825 Print(RegisterConfiguration::Turbofan(), with_children); |
| 827 RegisterConfiguration::ArchDefault(RegisterConfiguration::TURBOFAN); | |
| 828 Print(config, with_children); | |
| 829 } | 826 } |
| 830 | 827 |
| 831 | 828 |
| 832 struct TopLevelLiveRange::SpillMoveInsertionList : ZoneObject { | 829 struct TopLevelLiveRange::SpillMoveInsertionList : ZoneObject { |
| 833 SpillMoveInsertionList(int gap_index, InstructionOperand* operand, | 830 SpillMoveInsertionList(int gap_index, InstructionOperand* operand, |
| 834 SpillMoveInsertionList* next) | 831 SpillMoveInsertionList* next) |
| 835 : gap_index(gap_index), operand(operand), next(next) {} | 832 : gap_index(gap_index), operand(operand), next(next) {} |
| 836 const int gap_index; | 833 const int gap_index; |
| 837 InstructionOperand* const operand; | 834 InstructionOperand* const operand; |
| 838 SpillMoveInsertionList* const next; | 835 SpillMoveInsertionList* const next; |
| (...skipping 2930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3769 } | 3766 } |
| 3770 } | 3767 } |
| 3771 } | 3768 } |
| 3772 } | 3769 } |
| 3773 } | 3770 } |
| 3774 | 3771 |
| 3775 | 3772 |
| 3776 } // namespace compiler | 3773 } // namespace compiler |
| 3777 } // namespace internal | 3774 } // namespace internal |
| 3778 } // namespace v8 | 3775 } // namespace v8 |
| OLD | NEW |