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

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

Issue 2587763003: [turbofan] Pass Runtime::FunctionId to TrapIf and TrapUnless isel methods. (Closed)
Patch Set: Fix typos 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/arm64/instruction-selector-arm64.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/base/adapters.h" 5 #include "src/base/adapters.h"
6 #include "src/base/bits.h" 6 #include "src/base/bits.h"
7 #include "src/compiler/instruction-selector-impl.h" 7 #include "src/compiler/instruction-selector-impl.h"
8 #include "src/compiler/node-matchers.h" 8 #include "src/compiler/node-matchers.h"
9 #include "src/compiler/node-properties.h" 9 #include "src/compiler/node-properties.h"
10 10
(...skipping 2025 matching lines...) Expand 10 before | Expand all | Expand 10 after
2036 kNotEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); 2036 kNotEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1));
2037 VisitWordCompareZero(this, node, node->InputAt(0), &cont); 2037 VisitWordCompareZero(this, node, node->InputAt(0), &cont);
2038 } 2038 }
2039 2039
2040 void InstructionSelector::VisitDeoptimizeUnless(Node* node) { 2040 void InstructionSelector::VisitDeoptimizeUnless(Node* node) {
2041 FlagsContinuation cont = FlagsContinuation::ForDeoptimize( 2041 FlagsContinuation cont = FlagsContinuation::ForDeoptimize(
2042 kEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); 2042 kEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1));
2043 VisitWordCompareZero(this, node, node->InputAt(0), &cont); 2043 VisitWordCompareZero(this, node, node->InputAt(0), &cont);
2044 } 2044 }
2045 2045
2046 void InstructionSelector::VisitTrapIf(Node* node) { 2046 void InstructionSelector::VisitTrapIf(Node* node, Runtime::FunctionId func_id) {
2047 FlagsContinuation cont = FlagsContinuation::ForTrap( 2047 FlagsContinuation cont =
2048 kNotEqual, OpParameter<Runtime::FunctionId>(node->op()), 2048 FlagsContinuation::ForTrap(kNotEqual, func_id, node->InputAt(1));
2049 node->InputAt(1));
2050 VisitWordCompareZero(this, node, node->InputAt(0), &cont); 2049 VisitWordCompareZero(this, node, node->InputAt(0), &cont);
2051 } 2050 }
2052 2051
2053 void InstructionSelector::VisitTrapUnless(Node* node) { 2052 void InstructionSelector::VisitTrapUnless(Node* node,
2054 FlagsContinuation cont = FlagsContinuation::ForTrap( 2053 Runtime::FunctionId func_id) {
2055 kEqual, OpParameter<Runtime::FunctionId>(node->op()), node->InputAt(1)); 2054 FlagsContinuation cont =
2055 FlagsContinuation::ForTrap(kEqual, func_id, node->InputAt(1));
2056 VisitWordCompareZero(this, node, node->InputAt(0), &cont); 2056 VisitWordCompareZero(this, node, node->InputAt(0), &cont);
2057 } 2057 }
2058 2058
2059 void InstructionSelector::VisitSwitch(Node* node, const SwitchInfo& sw) { 2059 void InstructionSelector::VisitSwitch(Node* node, const SwitchInfo& sw) {
2060 ArmOperandGenerator g(this); 2060 ArmOperandGenerator g(this);
2061 InstructionOperand value_operand = g.UseRegister(node->InputAt(0)); 2061 InstructionOperand value_operand = g.UseRegister(node->InputAt(0));
2062 2062
2063 // Emit either ArchTableSwitch or ArchLookupSwitch. 2063 // Emit either ArchTableSwitch or ArchLookupSwitch.
2064 size_t table_space_cost = 4 + sw.value_range; 2064 size_t table_space_cost = 4 + sw.value_range;
2065 size_t table_time_cost = 3; 2065 size_t table_time_cost = 3;
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
2319 Vector<MachineType> req_aligned = Vector<MachineType>::New(2); 2319 Vector<MachineType> req_aligned = Vector<MachineType>::New(2);
2320 req_aligned[0] = MachineType::Float32(); 2320 req_aligned[0] = MachineType::Float32();
2321 req_aligned[1] = MachineType::Float64(); 2321 req_aligned[1] = MachineType::Float64();
2322 return MachineOperatorBuilder::AlignmentRequirements:: 2322 return MachineOperatorBuilder::AlignmentRequirements::
2323 SomeUnalignedAccessUnsupported(req_aligned, req_aligned); 2323 SomeUnalignedAccessUnsupported(req_aligned, req_aligned);
2324 } 2324 }
2325 2325
2326 } // namespace compiler 2326 } // namespace compiler
2327 } // namespace internal 2327 } // namespace internal
2328 } // namespace v8 2328 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/arm64/instruction-selector-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698