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/instruction-selector-impl.h" | 6 #include "src/compiler/instruction-selector-impl.h" |
7 #include "src/compiler/node-matchers.h" | 7 #include "src/compiler/node-matchers.h" |
8 #include "src/compiler/node-properties.h" | 8 #include "src/compiler/node-properties.h" |
9 #include "src/ppc/frames-ppc.h" | 9 #include "src/ppc/frames-ppc.h" |
10 | 10 |
(...skipping 1769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1780 kNotEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); | 1780 kNotEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); |
1781 VisitWord32CompareZero(this, node, node->InputAt(0), &cont); | 1781 VisitWord32CompareZero(this, node, node->InputAt(0), &cont); |
1782 } | 1782 } |
1783 | 1783 |
1784 void InstructionSelector::VisitDeoptimizeUnless(Node* node) { | 1784 void InstructionSelector::VisitDeoptimizeUnless(Node* node) { |
1785 FlagsContinuation cont = FlagsContinuation::ForDeoptimize( | 1785 FlagsContinuation cont = FlagsContinuation::ForDeoptimize( |
1786 kEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); | 1786 kEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); |
1787 VisitWord32CompareZero(this, node, node->InputAt(0), &cont); | 1787 VisitWord32CompareZero(this, node, node->InputAt(0), &cont); |
1788 } | 1788 } |
1789 | 1789 |
| 1790 void InstructionSelector::VisitTrapIf(Node* node) { UNREACHABLE(); } |
| 1791 |
| 1792 void InstructionSelector::VisitTrapUnless(Node* node) { UNREACHABLE(); } |
| 1793 |
1790 void InstructionSelector::VisitSwitch(Node* node, const SwitchInfo& sw) { | 1794 void InstructionSelector::VisitSwitch(Node* node, const SwitchInfo& sw) { |
1791 PPCOperandGenerator g(this); | 1795 PPCOperandGenerator g(this); |
1792 InstructionOperand value_operand = g.UseRegister(node->InputAt(0)); | 1796 InstructionOperand value_operand = g.UseRegister(node->InputAt(0)); |
1793 | 1797 |
1794 // Emit either ArchTableSwitch or ArchLookupSwitch. | 1798 // Emit either ArchTableSwitch or ArchLookupSwitch. |
1795 size_t table_space_cost = 4 + sw.value_range; | 1799 size_t table_space_cost = 4 + sw.value_range; |
1796 size_t table_time_cost = 3; | 1800 size_t table_time_cost = 3; |
1797 size_t lookup_space_cost = 3 + 2 * sw.case_count; | 1801 size_t lookup_space_cost = 3 + 2 * sw.case_count; |
1798 size_t lookup_time_cost = sw.case_count; | 1802 size_t lookup_time_cost = sw.case_count; |
1799 if (sw.case_count > 0 && | 1803 if (sw.case_count > 0 && |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2098 // static | 2102 // static |
2099 MachineOperatorBuilder::AlignmentRequirements | 2103 MachineOperatorBuilder::AlignmentRequirements |
2100 InstructionSelector::AlignmentRequirements() { | 2104 InstructionSelector::AlignmentRequirements() { |
2101 return MachineOperatorBuilder::AlignmentRequirements:: | 2105 return MachineOperatorBuilder::AlignmentRequirements:: |
2102 FullUnalignedAccessSupport(); | 2106 FullUnalignedAccessSupport(); |
2103 } | 2107 } |
2104 | 2108 |
2105 } // namespace compiler | 2109 } // namespace compiler |
2106 } // namespace internal | 2110 } // namespace internal |
2107 } // namespace v8 | 2111 } // namespace v8 |
OLD | NEW |