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

Unified Diff: src/compiler/binary-operator-reducer.h

Issue 1350223006: binary-operator-reducer: reduce mul+div(shift) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: ensure no extra precision Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: src/compiler/binary-operator-reducer.h
diff --git a/src/compiler/common-operator-reducer.h b/src/compiler/binary-operator-reducer.h
similarity index 68%
copy from src/compiler/common-operator-reducer.h
copy to src/compiler/binary-operator-reducer.h
index 8582d6b633f674575bf049d6f1569de17ccc6963..b8fe444343fe755f479feed7bacdad2ad59cbd99 100644
--- a/src/compiler/common-operator-reducer.h
+++ b/src/compiler/binary-operator-reducer.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef V8_COMPILER_COMMON_OPERATOR_REDUCER_H_
-#define V8_COMPILER_COMMON_OPERATOR_REDUCER_H_
+#ifndef V8_COMPILER_BINARY_OPERATOR_REDUCER_H_
+#define V8_COMPILER_BINARY_OPERATOR_REDUCER_H_
#include "src/compiler/graph-reducer.h"
@@ -19,22 +19,17 @@ class Operator;
// Performs strength reduction on nodes that have common operators.
-class CommonOperatorReducer final : public AdvancedReducer {
+class BinaryOperatorReducer final : public AdvancedReducer {
public:
- CommonOperatorReducer(Editor* editor, Graph* graph,
+ BinaryOperatorReducer(Editor* editor, Graph* graph,
CommonOperatorBuilder* common,
MachineOperatorBuilder* machine);
- ~CommonOperatorReducer() final {}
+ ~BinaryOperatorReducer() final {}
Reduction Reduce(Node* node) final;
private:
- Reduction ReduceBranch(Node* node);
- Reduction ReduceMerge(Node* node);
- Reduction ReduceEffectPhi(Node* node);
- Reduction ReducePhi(Node* node);
- Reduction ReduceReturn(Node* node);
- Reduction ReduceSelect(Node* node);
+ Reduction ReduceFloat64Mul(Node* node);
Reduction Change(Node* node, Operator const* op, Node* a);
Reduction Change(Node* node, Operator const* op, Node* a, Node* b);
@@ -54,4 +49,4 @@ class CommonOperatorReducer final : public AdvancedReducer {
} // namespace internal
} // namespace v8
-#endif // V8_COMPILER_COMMON_OPERATOR_REDUCER_H_
+#endif // V8_COMPILER_BINARY_OPERATOR_REDUCER_H_

Powered by Google App Engine
This is Rietveld 408576698