Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(204)

Side by Side Diff: src/compiler/instruction-selector.cc

Issue 2122853002: Implement UnaligedLoad and UnaligedStore turbofan operators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add UnalingedLoad and UnalignedStore tests Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 713
714 714
715 void InstructionSelector::VisitBlock(BasicBlock* block) { 715 void InstructionSelector::VisitBlock(BasicBlock* block) {
716 DCHECK(!current_block_); 716 DCHECK(!current_block_);
717 current_block_ = block; 717 current_block_ = block;
718 int current_block_end = static_cast<int>(instructions_.size()); 718 int current_block_end = static_cast<int>(instructions_.size());
719 719
720 int effect_level = 0; 720 int effect_level = 0;
721 for (Node* const node : *block) { 721 for (Node* const node : *block) {
722 if (node->opcode() == IrOpcode::kStore || 722 if (node->opcode() == IrOpcode::kStore ||
723 node->opcode() == IrOpcode::kUnalignedStore ||
723 node->opcode() == IrOpcode::kCheckedStore || 724 node->opcode() == IrOpcode::kCheckedStore ||
724 node->opcode() == IrOpcode::kCall) { 725 node->opcode() == IrOpcode::kCall) {
725 ++effect_level; 726 ++effect_level;
726 } 727 }
727 SetEffectLevel(node, effect_level); 728 SetEffectLevel(node, effect_level);
728 } 729 }
729 730
730 // We visit the control first, then the nodes in the block, so the block's 731 // We visit the control first, then the nodes in the block, so the block's
731 // control input should be on the same effect level as the last node. 732 // control input should be on the same effect level as the last node.
732 if (block->control_input() != nullptr) { 733 if (block->control_input() != nullptr) {
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
1225 case IrOpcode::kFloat64InsertHighWord32: 1226 case IrOpcode::kFloat64InsertHighWord32:
1226 return MarkAsFloat64(node), VisitFloat64InsertHighWord32(node); 1227 return MarkAsFloat64(node), VisitFloat64InsertHighWord32(node);
1227 case IrOpcode::kStackSlot: 1228 case IrOpcode::kStackSlot:
1228 return VisitStackSlot(node); 1229 return VisitStackSlot(node);
1229 case IrOpcode::kLoadStackPointer: 1230 case IrOpcode::kLoadStackPointer:
1230 return VisitLoadStackPointer(node); 1231 return VisitLoadStackPointer(node);
1231 case IrOpcode::kLoadFramePointer: 1232 case IrOpcode::kLoadFramePointer:
1232 return VisitLoadFramePointer(node); 1233 return VisitLoadFramePointer(node);
1233 case IrOpcode::kLoadParentFramePointer: 1234 case IrOpcode::kLoadParentFramePointer:
1234 return VisitLoadParentFramePointer(node); 1235 return VisitLoadParentFramePointer(node);
1236 case IrOpcode::kUnalignedLoad: {
1237 UnalignedLoadRepresentation type =
1238 UnalignedLoadRepresentationOf(node->op());
1239 MarkAsRepresentation(type.representation(), node);
1240 return VisitUnalignedLoad(node);
1241 }
1242 case IrOpcode::kUnalignedStore:
1243 return VisitUnalignedStore(node);
1235 case IrOpcode::kCheckedLoad: { 1244 case IrOpcode::kCheckedLoad: {
1236 MachineRepresentation rep = 1245 MachineRepresentation rep =
1237 CheckedLoadRepresentationOf(node->op()).representation(); 1246 CheckedLoadRepresentationOf(node->op()).representation();
1238 MarkAsRepresentation(rep, node); 1247 MarkAsRepresentation(rep, node);
1239 return VisitCheckedLoad(node); 1248 return VisitCheckedLoad(node);
1240 } 1249 }
1241 case IrOpcode::kCheckedStore: 1250 case IrOpcode::kCheckedStore:
1242 return VisitCheckedStore(node); 1251 return VisitCheckedStore(node);
1243 case IrOpcode::kInt32PairAdd: 1252 case IrOpcode::kInt32PairAdd:
1244 MarkAsWord32(NodeProperties::FindProjection(node, 0)); 1253 MarkAsWord32(NodeProperties::FindProjection(node, 0));
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after
1995 return new (instruction_zone()) FrameStateDescriptor( 2004 return new (instruction_zone()) FrameStateDescriptor(
1996 instruction_zone(), state_info.type(), state_info.bailout_id(), 2005 instruction_zone(), state_info.type(), state_info.bailout_id(),
1997 state_info.state_combine(), parameters, locals, stack, 2006 state_info.state_combine(), parameters, locals, stack,
1998 state_info.shared_info(), outer_state); 2007 state_info.shared_info(), outer_state);
1999 } 2008 }
2000 2009
2001 2010
2002 } // namespace compiler 2011 } // namespace compiler
2003 } // namespace internal 2012 } // namespace internal
2004 } // namespace v8 2013 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698