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

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

Issue 1980383002: [turbofan] Kill type Guard nodes during effect/control linearization. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: For "reason" wasm requires Begin/FinishRegion ATM. Created 4 years, 7 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 | « src/compiler/instruction-selector.h ('k') | test/mjsunit/regress/regress-crbug-612142.js » ('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/instruction-selector-impl.h" 10 #include "src/compiler/instruction-selector-impl.h"
(...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after
851 case IrOpcode::kEffectPhi: 851 case IrOpcode::kEffectPhi:
852 case IrOpcode::kMerge: 852 case IrOpcode::kMerge:
853 case IrOpcode::kTerminate: 853 case IrOpcode::kTerminate:
854 case IrOpcode::kBeginRegion: 854 case IrOpcode::kBeginRegion:
855 // No code needed for these graph artifacts. 855 // No code needed for these graph artifacts.
856 return; 856 return;
857 case IrOpcode::kIfException: 857 case IrOpcode::kIfException:
858 return MarkAsReference(node), VisitIfException(node); 858 return MarkAsReference(node), VisitIfException(node);
859 case IrOpcode::kFinishRegion: 859 case IrOpcode::kFinishRegion:
860 return MarkAsReference(node), VisitFinishRegion(node); 860 return MarkAsReference(node), VisitFinishRegion(node);
861 case IrOpcode::kGuard:
862 return MarkAsReference(node), VisitGuard(node);
863 case IrOpcode::kParameter: { 861 case IrOpcode::kParameter: {
864 MachineType type = 862 MachineType type =
865 linkage()->GetParameterType(ParameterIndexOf(node->op())); 863 linkage()->GetParameterType(ParameterIndexOf(node->op()));
866 MarkAsRepresentation(type.representation(), node); 864 MarkAsRepresentation(type.representation(), node);
867 return VisitParameter(node); 865 return VisitParameter(node);
868 } 866 }
869 case IrOpcode::kOsrValue: 867 case IrOpcode::kOsrValue:
870 return MarkAsReference(node), VisitOsrValue(node); 868 return MarkAsReference(node), VisitOsrValue(node);
871 case IrOpcode::kPhi: { 869 case IrOpcode::kPhi: {
872 MachineRepresentation rep = PhiRepresentationOf(node->op()); 870 MachineRepresentation rep = PhiRepresentationOf(node->op());
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after
1437 void InstructionSelector::VisitWord32PairSar(Node* node) { UNIMPLEMENTED(); } 1435 void InstructionSelector::VisitWord32PairSar(Node* node) { UNIMPLEMENTED(); }
1438 #endif // V8_TARGET_ARCH_64_BIT 1436 #endif // V8_TARGET_ARCH_64_BIT
1439 1437
1440 void InstructionSelector::VisitFinishRegion(Node* node) { 1438 void InstructionSelector::VisitFinishRegion(Node* node) {
1441 OperandGenerator g(this); 1439 OperandGenerator g(this);
1442 Node* value = node->InputAt(0); 1440 Node* value = node->InputAt(0);
1443 Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value)); 1441 Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value));
1444 } 1442 }
1445 1443
1446 1444
1447 void InstructionSelector::VisitGuard(Node* node) {
1448 OperandGenerator g(this);
1449 Node* value = node->InputAt(0);
1450 Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value));
1451 }
1452
1453
1454 void InstructionSelector::VisitParameter(Node* node) { 1445 void InstructionSelector::VisitParameter(Node* node) {
1455 OperandGenerator g(this); 1446 OperandGenerator g(this);
1456 int index = ParameterIndexOf(node->op()); 1447 int index = ParameterIndexOf(node->op());
1457 InstructionOperand op = 1448 InstructionOperand op =
1458 linkage()->ParameterHasSecondaryLocation(index) 1449 linkage()->ParameterHasSecondaryLocation(index)
1459 ? g.DefineAsDualLocation( 1450 ? g.DefineAsDualLocation(
1460 node, linkage()->GetParameterLocation(index), 1451 node, linkage()->GetParameterLocation(index),
1461 linkage()->GetParameterSecondaryLocation(index)) 1452 linkage()->GetParameterSecondaryLocation(index))
1462 : g.DefineAsLocation( 1453 : g.DefineAsLocation(
1463 node, linkage()->GetParameterLocation(index), 1454 node, linkage()->GetParameterLocation(index),
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
1820 return new (instruction_zone()) FrameStateDescriptor( 1811 return new (instruction_zone()) FrameStateDescriptor(
1821 instruction_zone(), state_info.type(), state_info.bailout_id(), 1812 instruction_zone(), state_info.type(), state_info.bailout_id(),
1822 state_info.state_combine(), parameters, locals, stack, 1813 state_info.state_combine(), parameters, locals, stack,
1823 state_info.shared_info(), outer_state); 1814 state_info.shared_info(), outer_state);
1824 } 1815 }
1825 1816
1826 1817
1827 } // namespace compiler 1818 } // namespace compiler
1828 } // namespace internal 1819 } // namespace internal
1829 } // namespace v8 1820 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/instruction-selector.h ('k') | test/mjsunit/regress/regress-crbug-612142.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698