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

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

Issue 1883023003: [turbofan] Avoid unnecessary tagging of floating point values. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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 29 matching lines...) Expand all
40 } 40 }
41 case IrOpcode::kChangeBoolToBit: { 41 case IrOpcode::kChangeBoolToBit: {
42 HeapObjectMatcher m(node->InputAt(0)); 42 HeapObjectMatcher m(node->InputAt(0));
43 if (m.HasValue()) return ReplaceInt32(m.Value()->BooleanValue()); 43 if (m.HasValue()) return ReplaceInt32(m.Value()->BooleanValue());
44 if (m.IsChangeBitToBool()) return Replace(m.InputAt(0)); 44 if (m.IsChangeBitToBool()) return Replace(m.InputAt(0));
45 break; 45 break;
46 } 46 }
47 case IrOpcode::kChangeFloat64ToTagged: { 47 case IrOpcode::kChangeFloat64ToTagged: {
48 Float64Matcher m(node->InputAt(0)); 48 Float64Matcher m(node->InputAt(0));
49 if (m.HasValue()) return ReplaceNumber(m.Value()); 49 if (m.HasValue()) return ReplaceNumber(m.Value());
50 if (m.IsChangeTaggedToFloat64()) return Replace(m.node()->InputAt(0));
50 break; 51 break;
51 } 52 }
52 case IrOpcode::kChangeInt32ToTagged: { 53 case IrOpcode::kChangeInt32ToTagged: {
53 Int32Matcher m(node->InputAt(0)); 54 Int32Matcher m(node->InputAt(0));
54 if (m.HasValue()) return ReplaceNumber(m.Value()); 55 if (m.HasValue()) return ReplaceNumber(m.Value());
55 break; 56 break;
56 } 57 }
57 case IrOpcode::kChangeTaggedToFloat64: { 58 case IrOpcode::kChangeTaggedToFloat64: {
58 NumberMatcher m(node->InputAt(0)); 59 NumberMatcher m(node->InputAt(0));
59 if (m.HasValue()) return ReplaceFloat64(m.Value()); 60 if (m.HasValue()) return ReplaceFloat64(m.Value());
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 Graph* SimplifiedOperatorReducer::graph() const { return jsgraph()->graph(); } 159 Graph* SimplifiedOperatorReducer::graph() const { return jsgraph()->graph(); }
159 160
160 161
161 MachineOperatorBuilder* SimplifiedOperatorReducer::machine() const { 162 MachineOperatorBuilder* SimplifiedOperatorReducer::machine() const {
162 return jsgraph()->machine(); 163 return jsgraph()->machine();
163 } 164 }
164 165
165 } // namespace compiler 166 } // namespace compiler
166 } // namespace internal 167 } // namespace internal
167 } // namespace v8 168 } // 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