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

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

Issue 1478923002: Revert of binary-operator-reducer: reduce mul+div(shift) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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/binary-operator-reducer.cc ('k') | src/compiler/pipeline.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/machine-operator-reducer.h" 5 #include "src/compiler/machine-operator-reducer.h"
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/base/division-by-constant.h" 8 #include "src/base/division-by-constant.h"
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/compiler/diamond.h" 10 #include "src/compiler/diamond.h"
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 return Changed(node); 641 return Changed(node);
642 } 642 }
643 return NoChange(); 643 return NoChange();
644 } 644 }
645 645
646 646
647 Reduction MachineOperatorReducer::ReduceTruncateFloat64ToInt32(Node* node) { 647 Reduction MachineOperatorReducer::ReduceTruncateFloat64ToInt32(Node* node) {
648 Float64Matcher m(node->InputAt(0)); 648 Float64Matcher m(node->InputAt(0));
649 if (m.HasValue()) return ReplaceInt32(DoubleToInt32(m.Value())); 649 if (m.HasValue()) return ReplaceInt32(DoubleToInt32(m.Value()));
650 if (m.IsChangeInt32ToFloat64()) return Replace(m.node()->InputAt(0)); 650 if (m.IsChangeInt32ToFloat64()) return Replace(m.node()->InputAt(0));
651 if (m.IsRoundInt64ToFloat64()) return Replace(m.node()->InputAt(0));
652 if (m.IsPhi()) { 651 if (m.IsPhi()) {
653 Node* const phi = m.node(); 652 Node* const phi = m.node();
654 DCHECK_EQ(kRepFloat64, RepresentationOf(OpParameter<MachineType>(phi))); 653 DCHECK_EQ(kRepFloat64, RepresentationOf(OpParameter<MachineType>(phi)));
655 if (phi->OwnedBy(node)) { 654 if (phi->OwnedBy(node)) {
656 // TruncateFloat64ToInt32[mode](Phi[Float64](x1,...,xn)) 655 // TruncateFloat64ToInt32[mode](Phi[Float64](x1,...,xn))
657 // => Phi[Int32](TruncateFloat64ToInt32[mode](x1), 656 // => Phi[Int32](TruncateFloat64ToInt32[mode](x1),
658 // ..., 657 // ...,
659 // TruncateFloat64ToInt32[mode](xn)) 658 // TruncateFloat64ToInt32[mode](xn))
660 const int value_input_count = phi->InputCount() - 1; 659 const int value_input_count = phi->InputCount() - 1;
661 for (int i = 0; i < value_input_count; ++i) { 660 for (int i = 0; i < value_input_count; ++i) {
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
1077 MachineOperatorBuilder* MachineOperatorReducer::machine() const { 1076 MachineOperatorBuilder* MachineOperatorReducer::machine() const {
1078 return jsgraph()->machine(); 1077 return jsgraph()->machine();
1079 } 1078 }
1080 1079
1081 1080
1082 Graph* MachineOperatorReducer::graph() const { return jsgraph()->graph(); } 1081 Graph* MachineOperatorReducer::graph() const { return jsgraph()->graph(); }
1083 1082
1084 } // namespace compiler 1083 } // namespace compiler
1085 } // namespace internal 1084 } // namespace internal
1086 } // namespace v8 1085 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/binary-operator-reducer.cc ('k') | src/compiler/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698