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 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
710 | 710 |
711 | 711 |
712 void InstructionSelector::VisitBlock(BasicBlock* block) { | 712 void InstructionSelector::VisitBlock(BasicBlock* block) { |
713 DCHECK(!current_block_); | 713 DCHECK(!current_block_); |
714 current_block_ = block; | 714 current_block_ = block; |
715 int current_block_end = static_cast<int>(instructions_.size()); | 715 int current_block_end = static_cast<int>(instructions_.size()); |
716 | 716 |
717 int effect_level = 0; | 717 int effect_level = 0; |
718 for (Node* const node : *block) { | 718 for (Node* const node : *block) { |
719 if (node->opcode() == IrOpcode::kStore || | 719 if (node->opcode() == IrOpcode::kStore || |
| 720 node->opcode() == IrOpcode::kUnalignedStore || |
720 node->opcode() == IrOpcode::kCheckedStore || | 721 node->opcode() == IrOpcode::kCheckedStore || |
721 node->opcode() == IrOpcode::kCall) { | 722 node->opcode() == IrOpcode::kCall) { |
722 ++effect_level; | 723 ++effect_level; |
723 } | 724 } |
724 SetEffectLevel(node, effect_level); | 725 SetEffectLevel(node, effect_level); |
725 } | 726 } |
726 | 727 |
727 // We visit the control first, then the nodes in the block, so the block's | 728 // We visit the control first, then the nodes in the block, so the block's |
728 // control input should be on the same effect level as the last node. | 729 // control input should be on the same effect level as the last node. |
729 if (block->control_input() != nullptr) { | 730 if (block->control_input() != nullptr) { |
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1220 case IrOpcode::kFloat64InsertHighWord32: | 1221 case IrOpcode::kFloat64InsertHighWord32: |
1221 return MarkAsFloat64(node), VisitFloat64InsertHighWord32(node); | 1222 return MarkAsFloat64(node), VisitFloat64InsertHighWord32(node); |
1222 case IrOpcode::kStackSlot: | 1223 case IrOpcode::kStackSlot: |
1223 return VisitStackSlot(node); | 1224 return VisitStackSlot(node); |
1224 case IrOpcode::kLoadStackPointer: | 1225 case IrOpcode::kLoadStackPointer: |
1225 return VisitLoadStackPointer(node); | 1226 return VisitLoadStackPointer(node); |
1226 case IrOpcode::kLoadFramePointer: | 1227 case IrOpcode::kLoadFramePointer: |
1227 return VisitLoadFramePointer(node); | 1228 return VisitLoadFramePointer(node); |
1228 case IrOpcode::kLoadParentFramePointer: | 1229 case IrOpcode::kLoadParentFramePointer: |
1229 return VisitLoadParentFramePointer(node); | 1230 return VisitLoadParentFramePointer(node); |
| 1231 case IrOpcode::kUnalignedLoad: { |
| 1232 UnalignedLoadRepresentation type = |
| 1233 UnalignedLoadRepresentationOf(node->op()); |
| 1234 MarkAsRepresentation(type.representation(), node); |
| 1235 return VisitUnalignedLoad(node); |
| 1236 } |
| 1237 case IrOpcode::kUnalignedStore: |
| 1238 return VisitUnalignedStore(node); |
1230 case IrOpcode::kCheckedLoad: { | 1239 case IrOpcode::kCheckedLoad: { |
1231 MachineRepresentation rep = | 1240 MachineRepresentation rep = |
1232 CheckedLoadRepresentationOf(node->op()).representation(); | 1241 CheckedLoadRepresentationOf(node->op()).representation(); |
1233 MarkAsRepresentation(rep, node); | 1242 MarkAsRepresentation(rep, node); |
1234 return VisitCheckedLoad(node); | 1243 return VisitCheckedLoad(node); |
1235 } | 1244 } |
1236 case IrOpcode::kCheckedStore: | 1245 case IrOpcode::kCheckedStore: |
1237 return VisitCheckedStore(node); | 1246 return VisitCheckedStore(node); |
1238 case IrOpcode::kInt32PairAdd: | 1247 case IrOpcode::kInt32PairAdd: |
1239 MarkAsWord32(NodeProperties::FindProjection(node, 0)); | 1248 MarkAsWord32(NodeProperties::FindProjection(node, 0)); |
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1986 return new (instruction_zone()) FrameStateDescriptor( | 1995 return new (instruction_zone()) FrameStateDescriptor( |
1987 instruction_zone(), state_info.type(), state_info.bailout_id(), | 1996 instruction_zone(), state_info.type(), state_info.bailout_id(), |
1988 state_info.state_combine(), parameters, locals, stack, | 1997 state_info.state_combine(), parameters, locals, stack, |
1989 state_info.shared_info(), outer_state); | 1998 state_info.shared_info(), outer_state); |
1990 } | 1999 } |
1991 | 2000 |
1992 | 2001 |
1993 } // namespace compiler | 2002 } // namespace compiler |
1994 } // namespace internal | 2003 } // namespace internal |
1995 } // namespace v8 | 2004 } // namespace v8 |
OLD | NEW |