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

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

Issue 1779713009: Implement optional turbofan UnalignedLoad and UnalignedStore operators (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix failures in cctest/test-run-wasm-64/Run_Wasm_LoadStoreI64_sx due to missing implementation of U… Created 4 years, 9 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 687 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 698
699 699
700 void InstructionSelector::VisitBlock(BasicBlock* block) { 700 void InstructionSelector::VisitBlock(BasicBlock* block) {
701 DCHECK(!current_block_); 701 DCHECK(!current_block_);
702 current_block_ = block; 702 current_block_ = block;
703 int current_block_end = static_cast<int>(instructions_.size()); 703 int current_block_end = static_cast<int>(instructions_.size());
704 704
705 int effect_level = 0; 705 int effect_level = 0;
706 for (Node* const node : *block) { 706 for (Node* const node : *block) {
707 if (node->opcode() == IrOpcode::kStore || 707 if (node->opcode() == IrOpcode::kStore ||
708 node->opcode() == IrOpcode::kUnalignedStore ||
708 node->opcode() == IrOpcode::kCheckedStore || 709 node->opcode() == IrOpcode::kCheckedStore ||
709 node->opcode() == IrOpcode::kCall) { 710 node->opcode() == IrOpcode::kCall) {
710 ++effect_level; 711 ++effect_level;
711 } 712 }
712 SetEffectLevel(node, effect_level); 713 SetEffectLevel(node, effect_level);
713 } 714 }
714 715
715 // Generate code for the block control "top down", but schedule the code 716 // Generate code for the block control "top down", but schedule the code
716 // "bottom up". 717 // "bottom up".
717 VisitControl(block); 718 VisitControl(block);
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
1135 case IrOpcode::kFloat64InsertHighWord32: 1136 case IrOpcode::kFloat64InsertHighWord32:
1136 return MarkAsFloat64(node), VisitFloat64InsertHighWord32(node); 1137 return MarkAsFloat64(node), VisitFloat64InsertHighWord32(node);
1137 case IrOpcode::kStackSlot: 1138 case IrOpcode::kStackSlot:
1138 return VisitStackSlot(node); 1139 return VisitStackSlot(node);
1139 case IrOpcode::kLoadStackPointer: 1140 case IrOpcode::kLoadStackPointer:
1140 return VisitLoadStackPointer(node); 1141 return VisitLoadStackPointer(node);
1141 case IrOpcode::kLoadFramePointer: 1142 case IrOpcode::kLoadFramePointer:
1142 return VisitLoadFramePointer(node); 1143 return VisitLoadFramePointer(node);
1143 case IrOpcode::kLoadParentFramePointer: 1144 case IrOpcode::kLoadParentFramePointer:
1144 return VisitLoadParentFramePointer(node); 1145 return VisitLoadParentFramePointer(node);
1146 case IrOpcode::kUnalignedLoad: {
1147 UnalignedLoadRepresentation type =
1148 UnalignedLoadRepresentationOf(node->op());
1149 MarkAsRepresentation(type.representation(), node);
1150 return VisitUnalignedLoad(node);
1151 }
1152 case IrOpcode::kUnalignedStore:
1153 return VisitUnalignedStore(node);
1145 case IrOpcode::kCheckedLoad: { 1154 case IrOpcode::kCheckedLoad: {
1146 MachineRepresentation rep = 1155 MachineRepresentation rep =
1147 CheckedLoadRepresentationOf(node->op()).representation(); 1156 CheckedLoadRepresentationOf(node->op()).representation();
1148 MarkAsRepresentation(rep, node); 1157 MarkAsRepresentation(rep, node);
1149 return VisitCheckedLoad(node); 1158 return VisitCheckedLoad(node);
1150 } 1159 }
1151 case IrOpcode::kCheckedStore: 1160 case IrOpcode::kCheckedStore:
1152 return VisitCheckedStore(node); 1161 return VisitCheckedStore(node);
1153 case IrOpcode::kInt32PairAdd: 1162 case IrOpcode::kInt32PairAdd:
1154 MarkAsWord32(NodeProperties::FindProjection(node, 0)); 1163 MarkAsWord32(NodeProperties::FindProjection(node, 0));
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
1785 return new (instruction_zone()) FrameStateDescriptor( 1794 return new (instruction_zone()) FrameStateDescriptor(
1786 instruction_zone(), state_info.type(), state_info.bailout_id(), 1795 instruction_zone(), state_info.type(), state_info.bailout_id(),
1787 state_info.state_combine(), parameters, locals, stack, 1796 state_info.state_combine(), parameters, locals, stack,
1788 state_info.shared_info(), outer_state); 1797 state_info.shared_info(), outer_state);
1789 } 1798 }
1790 1799
1791 1800
1792 } // namespace compiler 1801 } // namespace compiler
1793 } // namespace internal 1802 } // namespace internal
1794 } // namespace v8 1803 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698