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/compiler/instruction-selector.h" | 5 #include "src/compiler/instruction-selector.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "src/base/adapters.h" | 9 #include "src/base/adapters.h" |
10 #include "src/compiler/instruction-selector-impl.h" | 10 #include "src/compiler/instruction-selector-impl.h" |
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
700 | 700 |
701 | 701 |
702 void InstructionSelector::VisitBlock(BasicBlock* block) { | 702 void InstructionSelector::VisitBlock(BasicBlock* block) { |
703 DCHECK(!current_block_); | 703 DCHECK(!current_block_); |
704 current_block_ = block; | 704 current_block_ = block; |
705 int current_block_end = static_cast<int>(instructions_.size()); | 705 int current_block_end = static_cast<int>(instructions_.size()); |
706 | 706 |
707 int effect_level = 0; | 707 int effect_level = 0; |
708 for (Node* const node : *block) { | 708 for (Node* const node : *block) { |
709 if (node->opcode() == IrOpcode::kStore || | 709 if (node->opcode() == IrOpcode::kStore || |
| 710 node->opcode() == IrOpcode::kUnalignedStore || |
710 node->opcode() == IrOpcode::kCheckedStore || | 711 node->opcode() == IrOpcode::kCheckedStore || |
711 node->opcode() == IrOpcode::kCall) { | 712 node->opcode() == IrOpcode::kCall) { |
712 ++effect_level; | 713 ++effect_level; |
713 } | 714 } |
714 SetEffectLevel(node, effect_level); | 715 SetEffectLevel(node, effect_level); |
715 } | 716 } |
716 | 717 |
717 // Generate code for the block control "top down", but schedule the code | 718 // Generate code for the block control "top down", but schedule the code |
718 // "bottom up". | 719 // "bottom up". |
719 VisitControl(block); | 720 VisitControl(block); |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1141 case IrOpcode::kFloat64InsertHighWord32: | 1142 case IrOpcode::kFloat64InsertHighWord32: |
1142 return MarkAsFloat64(node), VisitFloat64InsertHighWord32(node); | 1143 return MarkAsFloat64(node), VisitFloat64InsertHighWord32(node); |
1143 case IrOpcode::kStackSlot: | 1144 case IrOpcode::kStackSlot: |
1144 return VisitStackSlot(node); | 1145 return VisitStackSlot(node); |
1145 case IrOpcode::kLoadStackPointer: | 1146 case IrOpcode::kLoadStackPointer: |
1146 return VisitLoadStackPointer(node); | 1147 return VisitLoadStackPointer(node); |
1147 case IrOpcode::kLoadFramePointer: | 1148 case IrOpcode::kLoadFramePointer: |
1148 return VisitLoadFramePointer(node); | 1149 return VisitLoadFramePointer(node); |
1149 case IrOpcode::kLoadParentFramePointer: | 1150 case IrOpcode::kLoadParentFramePointer: |
1150 return VisitLoadParentFramePointer(node); | 1151 return VisitLoadParentFramePointer(node); |
| 1152 case IrOpcode::kUnalignedLoad: { |
| 1153 UnalignedLoadRepresentation type = |
| 1154 UnalignedLoadRepresentationOf(node->op()); |
| 1155 MarkAsRepresentation(type.representation(), node); |
| 1156 return VisitUnalignedLoad(node); |
| 1157 } |
| 1158 case IrOpcode::kUnalignedStore: |
| 1159 return VisitUnalignedStore(node); |
1151 case IrOpcode::kCheckedLoad: { | 1160 case IrOpcode::kCheckedLoad: { |
1152 MachineRepresentation rep = | 1161 MachineRepresentation rep = |
1153 CheckedLoadRepresentationOf(node->op()).representation(); | 1162 CheckedLoadRepresentationOf(node->op()).representation(); |
1154 MarkAsRepresentation(rep, node); | 1163 MarkAsRepresentation(rep, node); |
1155 return VisitCheckedLoad(node); | 1164 return VisitCheckedLoad(node); |
1156 } | 1165 } |
1157 case IrOpcode::kCheckedStore: | 1166 case IrOpcode::kCheckedStore: |
1158 return VisitCheckedStore(node); | 1167 return VisitCheckedStore(node); |
1159 case IrOpcode::kInt32PairAdd: | 1168 case IrOpcode::kInt32PairAdd: |
1160 MarkAsWord32(NodeProperties::FindProjection(node, 0)); | 1169 MarkAsWord32(NodeProperties::FindProjection(node, 0)); |
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1799 return new (instruction_zone()) FrameStateDescriptor( | 1808 return new (instruction_zone()) FrameStateDescriptor( |
1800 instruction_zone(), state_info.type(), state_info.bailout_id(), | 1809 instruction_zone(), state_info.type(), state_info.bailout_id(), |
1801 state_info.state_combine(), parameters, locals, stack, | 1810 state_info.state_combine(), parameters, locals, stack, |
1802 state_info.shared_info(), outer_state); | 1811 state_info.shared_info(), outer_state); |
1803 } | 1812 } |
1804 | 1813 |
1805 | 1814 |
1806 } // namespace compiler | 1815 } // namespace compiler |
1807 } // namespace internal | 1816 } // namespace internal |
1808 } // namespace v8 | 1817 } // namespace v8 |
OLD | NEW |