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

Side by Side Diff: src/compiler/simplified-operator-reducer.cc

Issue 2384453002: [turbofan] Eliminate unnecessary hole to undefined conversion. (Closed)
Patch Set: Created 4 years, 2 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 | no next file » | 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/simplified-operator-reducer.h" 5 #include "src/compiler/simplified-operator-reducer.h"
6 6
7 #include "src/compiler/js-graph.h" 7 #include "src/compiler/js-graph.h"
8 #include "src/compiler/machine-operator.h" 8 #include "src/compiler/machine-operator.h"
9 #include "src/compiler/node-matchers.h" 9 #include "src/compiler/node-matchers.h"
10 #include "src/compiler/operator-properties.h" 10 #include "src/compiler/operator-properties.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 if (m.HasValue()) return ReplaceInt32(DoubleToInt32(m.Value())); 119 if (m.HasValue()) return ReplaceInt32(DoubleToInt32(m.Value()));
120 if (m.IsChangeInt31ToTaggedSigned() || m.IsChangeInt32ToTagged() || 120 if (m.IsChangeInt31ToTaggedSigned() || m.IsChangeInt32ToTagged() ||
121 m.IsChangeUint32ToTagged()) { 121 m.IsChangeUint32ToTagged()) {
122 return Replace(m.InputAt(0)); 122 return Replace(m.InputAt(0));
123 } 123 }
124 if (m.IsChangeFloat64ToTagged()) { 124 if (m.IsChangeFloat64ToTagged()) {
125 return Change(node, machine()->TruncateFloat64ToWord32(), m.InputAt(0)); 125 return Change(node, machine()->TruncateFloat64ToWord32(), m.InputAt(0));
126 } 126 }
127 break; 127 break;
128 } 128 }
129 case IrOpcode::kCheckedTaggedSignedToInt32: {
130 NodeMatcher m(node->InputAt(0));
131 if (m.IsConvertTaggedHoleToUndefined()) {
132 node->ReplaceInput(0, m.InputAt(0));
133 return Changed(node);
134 }
135 break;
136 }
129 case IrOpcode::kCheckIf: { 137 case IrOpcode::kCheckIf: {
130 HeapObjectMatcher m(node->InputAt(0)); 138 HeapObjectMatcher m(node->InputAt(0));
131 if (m.Is(factory()->true_value())) { 139 if (m.Is(factory()->true_value())) {
132 Node* const effect = NodeProperties::GetEffectInput(node); 140 Node* const effect = NodeProperties::GetEffectInput(node);
133 return Replace(effect); 141 return Replace(effect);
134 } 142 }
135 break; 143 break;
136 } 144 }
137 case IrOpcode::kCheckNumber: { 145 case IrOpcode::kCheckNumber: {
138 NodeMatcher m(node->InputAt(0)); 146 NodeMatcher m(node->InputAt(0));
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 return jsgraph()->isolate(); 249 return jsgraph()->isolate();
242 } 250 }
243 251
244 MachineOperatorBuilder* SimplifiedOperatorReducer::machine() const { 252 MachineOperatorBuilder* SimplifiedOperatorReducer::machine() const {
245 return jsgraph()->machine(); 253 return jsgraph()->machine();
246 } 254 }
247 255
248 } // namespace compiler 256 } // namespace compiler
249 } // namespace internal 257 } // namespace internal
250 } // namespace v8 258 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698