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

Side by Side Diff: src/compiler/operator-properties.cc

Issue 2134173002: [turbofan] Remove eager frame state from comparisons. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix. 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
« no previous file with comments | « src/compiler/js-typed-lowering.cc ('k') | test/cctest/compiler/test-js-typed-lowering.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/operator-properties.h" 5 #include "src/compiler/operator-properties.h"
6 6
7 #include "src/compiler/js-operator.h" 7 #include "src/compiler/js-operator.h"
8 #include "src/compiler/linkage.h" 8 #include "src/compiler/linkage.h"
9 #include "src/compiler/opcodes.h" 9 #include "src/compiler/opcodes.h"
10 10
(...skipping 27 matching lines...) Expand all
38 // Binary operations 38 // Binary operations
39 case IrOpcode::kJSAdd: 39 case IrOpcode::kJSAdd:
40 case IrOpcode::kJSSubtract: 40 case IrOpcode::kJSSubtract:
41 case IrOpcode::kJSMultiply: 41 case IrOpcode::kJSMultiply:
42 case IrOpcode::kJSDivide: 42 case IrOpcode::kJSDivide:
43 case IrOpcode::kJSModulus: 43 case IrOpcode::kJSModulus:
44 44
45 // Compare operations 45 // Compare operations
46 case IrOpcode::kJSEqual: 46 case IrOpcode::kJSEqual:
47 case IrOpcode::kJSNotEqual: 47 case IrOpcode::kJSNotEqual:
48 case IrOpcode::kJSGreaterThan:
49 case IrOpcode::kJSGreaterThanOrEqual:
50 case IrOpcode::kJSLessThan:
51 case IrOpcode::kJSLessThanOrEqual:
48 case IrOpcode::kJSHasProperty: 52 case IrOpcode::kJSHasProperty:
49 case IrOpcode::kJSInstanceOf: 53 case IrOpcode::kJSInstanceOf:
50 54
51 // Object operations 55 // Object operations
52 case IrOpcode::kJSCreate: 56 case IrOpcode::kJSCreate:
53 case IrOpcode::kJSCreateArguments: 57 case IrOpcode::kJSCreateArguments:
54 case IrOpcode::kJSCreateArray: 58 case IrOpcode::kJSCreateArray:
55 case IrOpcode::kJSCreateLiteralArray: 59 case IrOpcode::kJSCreateLiteralArray:
56 case IrOpcode::kJSCreateLiteralObject: 60 case IrOpcode::kJSCreateLiteralObject:
57 case IrOpcode::kJSCreateLiteralRegExp: 61 case IrOpcode::kJSCreateLiteralRegExp:
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // as a result of lazy deopt in ToNumber conversion) need a second frame 95 // as a result of lazy deopt in ToNumber conversion) need a second frame
92 // state so that we can resume before the operation. 96 // state so that we can resume before the operation.
93 case IrOpcode::kJSBitwiseAnd: 97 case IrOpcode::kJSBitwiseAnd:
94 case IrOpcode::kJSBitwiseOr: 98 case IrOpcode::kJSBitwiseOr:
95 case IrOpcode::kJSBitwiseXor: 99 case IrOpcode::kJSBitwiseXor:
96 case IrOpcode::kJSShiftLeft: 100 case IrOpcode::kJSShiftLeft:
97 case IrOpcode::kJSShiftRight: 101 case IrOpcode::kJSShiftRight:
98 case IrOpcode::kJSShiftRightLogical: 102 case IrOpcode::kJSShiftRightLogical:
99 return 2; 103 return 2;
100 104
101 // Compare operators that can deopt in the middle the operation (e.g.,
102 // as a result of lazy deopt in ToNumber conversion) need a second frame
103 // state so that we can resume before the operation.
104 case IrOpcode::kJSGreaterThan:
105 case IrOpcode::kJSGreaterThanOrEqual:
106 case IrOpcode::kJSLessThan:
107 case IrOpcode::kJSLessThanOrEqual:
108 return 2;
109
110 default: 105 default:
111 return 0; 106 return 0;
112 } 107 }
113 } 108 }
114 109
115 110
116 // static 111 // static
117 int OperatorProperties::GetTotalInputCount(const Operator* op) { 112 int OperatorProperties::GetTotalInputCount(const Operator* op) {
118 return op->ValueInputCount() + GetContextInputCount(op) + 113 return op->ValueInputCount() + GetContextInputCount(op) +
119 GetFrameStateInputCount(op) + op->EffectInputCount() + 114 GetFrameStateInputCount(op) + op->EffectInputCount() +
120 op->ControlInputCount(); 115 op->ControlInputCount();
121 } 116 }
122 117
123 118
124 // static 119 // static
125 bool OperatorProperties::IsBasicBlockBegin(const Operator* op) { 120 bool OperatorProperties::IsBasicBlockBegin(const Operator* op) {
126 Operator::Opcode const opcode = op->opcode(); 121 Operator::Opcode const opcode = op->opcode();
127 return opcode == IrOpcode::kStart || opcode == IrOpcode::kEnd || 122 return opcode == IrOpcode::kStart || opcode == IrOpcode::kEnd ||
128 opcode == IrOpcode::kDead || opcode == IrOpcode::kLoop || 123 opcode == IrOpcode::kDead || opcode == IrOpcode::kLoop ||
129 opcode == IrOpcode::kMerge || opcode == IrOpcode::kIfTrue || 124 opcode == IrOpcode::kMerge || opcode == IrOpcode::kIfTrue ||
130 opcode == IrOpcode::kIfFalse || opcode == IrOpcode::kIfSuccess || 125 opcode == IrOpcode::kIfFalse || opcode == IrOpcode::kIfSuccess ||
131 opcode == IrOpcode::kIfException || opcode == IrOpcode::kIfValue || 126 opcode == IrOpcode::kIfException || opcode == IrOpcode::kIfValue ||
132 opcode == IrOpcode::kIfDefault; 127 opcode == IrOpcode::kIfDefault;
133 } 128 }
134 129
135 } // namespace compiler 130 } // namespace compiler
136 } // namespace internal 131 } // namespace internal
137 } // namespace v8 132 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-typed-lowering.cc ('k') | test/cctest/compiler/test-js-typed-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698