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

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

Issue 2591903002: [wasm] sundry trap handler fixes (Closed)
Patch Set: Merge VisitLoad and VisitProtectedLoad Created 3 years, 12 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
« no previous file with comments | « no previous file | src/compiler/machine-operator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/compiler-source-position-table.h" 10 #include "src/compiler/compiler-source-position-table.h"
(...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 DCHECK_GE(kMaxInt, instructions_.size()); 832 DCHECK_GE(kMaxInt, instructions_.size());
833 return static_cast<int>(instructions_.size()); 833 return static_cast<int>(instructions_.size());
834 }; 834 };
835 int current_block_end = current_num_instructions(); 835 int current_block_end = current_num_instructions();
836 836
837 int effect_level = 0; 837 int effect_level = 0;
838 for (Node* const node : *block) { 838 for (Node* const node : *block) {
839 if (node->opcode() == IrOpcode::kStore || 839 if (node->opcode() == IrOpcode::kStore ||
840 node->opcode() == IrOpcode::kUnalignedStore || 840 node->opcode() == IrOpcode::kUnalignedStore ||
841 node->opcode() == IrOpcode::kCheckedStore || 841 node->opcode() == IrOpcode::kCheckedStore ||
842 node->opcode() == IrOpcode::kCall) { 842 node->opcode() == IrOpcode::kCall ||
843 node->opcode() == IrOpcode::kProtectedLoad ||
844 node->opcode() == IrOpcode::kProtectedStore) {
843 ++effect_level; 845 ++effect_level;
844 } 846 }
845 SetEffectLevel(node, effect_level); 847 SetEffectLevel(node, effect_level);
846 } 848 }
847 849
848 // We visit the control first, then the nodes in the block, so the block's 850 // We visit the control first, then the nodes in the block, so the block's
849 // control input should be on the same effect level as the last node. 851 // control input should be on the same effect level as the last node.
850 if (block->control_input() != nullptr) { 852 if (block->control_input() != nullptr) {
851 SetEffectLevel(block->control_input(), effect_level); 853 SetEffectLevel(block->control_input(), effect_level);
852 } 854 }
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
1426 MarkAsWord32(node); 1428 MarkAsWord32(node);
1427 MarkPairProjectionsAsWord32(node); 1429 MarkPairProjectionsAsWord32(node);
1428 return VisitWord32PairSar(node); 1430 return VisitWord32PairSar(node);
1429 case IrOpcode::kAtomicLoad: { 1431 case IrOpcode::kAtomicLoad: {
1430 LoadRepresentation type = LoadRepresentationOf(node->op()); 1432 LoadRepresentation type = LoadRepresentationOf(node->op());
1431 MarkAsRepresentation(type.representation(), node); 1433 MarkAsRepresentation(type.representation(), node);
1432 return VisitAtomicLoad(node); 1434 return VisitAtomicLoad(node);
1433 } 1435 }
1434 case IrOpcode::kAtomicStore: 1436 case IrOpcode::kAtomicStore:
1435 return VisitAtomicStore(node); 1437 return VisitAtomicStore(node);
1436 case IrOpcode::kProtectedLoad: 1438 case IrOpcode::kProtectedLoad: {
1439 LoadRepresentation type = LoadRepresentationOf(node->op());
1440 MarkAsRepresentation(type.representation(), node);
1437 return VisitProtectedLoad(node); 1441 return VisitProtectedLoad(node);
1442 }
1438 case IrOpcode::kUnsafePointerAdd: 1443 case IrOpcode::kUnsafePointerAdd:
1439 MarkAsRepresentation(MachineType::PointerRepresentation(), node); 1444 MarkAsRepresentation(MachineType::PointerRepresentation(), node);
1440 return VisitUnsafePointerAdd(node); 1445 return VisitUnsafePointerAdd(node);
1441 case IrOpcode::kCreateFloat32x4: 1446 case IrOpcode::kCreateFloat32x4:
1442 return MarkAsSimd128(node), VisitCreateFloat32x4(node); 1447 return MarkAsSimd128(node), VisitCreateFloat32x4(node);
1443 case IrOpcode::kFloat32x4ExtractLane: 1448 case IrOpcode::kFloat32x4ExtractLane:
1444 return MarkAsFloat32(node), VisitFloat32x4ExtractLane(node); 1449 return MarkAsFloat32(node), VisitFloat32x4ExtractLane(node);
1445 case IrOpcode::kFloat32x4ReplaceLane: 1450 case IrOpcode::kFloat32x4ReplaceLane:
1446 return MarkAsSimd128(node), VisitFloat32x4ReplaceLane(node); 1451 return MarkAsSimd128(node), VisitFloat32x4ReplaceLane(node);
1447 case IrOpcode::kFloat32x4FromInt32x4: 1452 case IrOpcode::kFloat32x4FromInt32x4:
(...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after
2252 return new (instruction_zone()) FrameStateDescriptor( 2257 return new (instruction_zone()) FrameStateDescriptor(
2253 instruction_zone(), state_info.type(), state_info.bailout_id(), 2258 instruction_zone(), state_info.type(), state_info.bailout_id(),
2254 state_info.state_combine(), parameters, locals, stack, 2259 state_info.state_combine(), parameters, locals, stack,
2255 state_info.shared_info(), outer_state); 2260 state_info.shared_info(), outer_state);
2256 } 2261 }
2257 2262
2258 2263
2259 } // namespace compiler 2264 } // namespace compiler
2260 } // namespace internal 2265 } // namespace internal
2261 } // namespace v8 2266 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/machine-operator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698