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

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

Issue 526083002: [turbofan] Fix MachineOperatorReducer to use JSGraph as well. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix Created 6 years, 4 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
« no previous file with comments | « no previous file | src/compiler/machine-operator-reducer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/machine-operator-reducer.h
diff --git a/src/compiler/machine-operator-reducer.h b/src/compiler/machine-operator-reducer.h
index 3ed3100d785a23ada2416a1466b2452bd6a6740c..bd31a4b6afbbfa173961adca6f602e633ab10616 100644
--- a/src/compiler/machine-operator-reducer.h
+++ b/src/compiler/machine-operator-reducer.h
@@ -5,7 +5,6 @@
#ifndef V8_COMPILER_MACHINE_OPERATOR_REDUCER_H_
#define V8_COMPILER_MACHINE_OPERATOR_REDUCER_H_
-#include "src/compiler/common-operator.h"
#include "src/compiler/graph-reducer.h"
#include "src/compiler/machine-operator.h"
@@ -14,24 +13,20 @@ namespace internal {
namespace compiler {
// Forward declarations.
-class CommonNodeCache;
+class CommonOperatorBuilder;
+class JSGraph;
+
// Performs constant folding and strength reduction on nodes that have
// machine operators.
-class MachineOperatorReducer : public Reducer {
+class MachineOperatorReducer V8_FINAL : public Reducer {
public:
- explicit MachineOperatorReducer(Graph* graph);
-
- MachineOperatorReducer(Graph* graph, CommonNodeCache* cache);
+ explicit MachineOperatorReducer(JSGraph* jsgraph);
+ ~MachineOperatorReducer();
- virtual Reduction Reduce(Node* node);
+ virtual Reduction Reduce(Node* node) V8_OVERRIDE;
private:
- Graph* graph_;
- CommonNodeCache* cache_;
- CommonOperatorBuilder common_;
- MachineOperatorBuilder machine_;
-
Node* Float64Constant(volatile double value);
Node* Int32Constant(int32_t value);
Node* Int64Constant(int64_t value);
@@ -46,9 +41,18 @@ class MachineOperatorReducer : public Reducer {
Reduction ReplaceInt64(int64_t value) {
return Replace(Int64Constant(value));
}
+
+ Graph* graph() const;
+ JSGraph* jsgraph() const { return jsgraph_; }
+ CommonOperatorBuilder* common() const;
+ MachineOperatorBuilder* machine() { return &machine_; }
+
+ JSGraph* jsgraph_;
+ MachineOperatorBuilder machine_;
};
-}
-}
-} // namespace v8::internal::compiler
+
+} // namespace compiler
+} // namespace internal
+} // namespace v8
#endif // V8_COMPILER_MACHINE_OPERATOR_REDUCER_H_
« no previous file with comments | « no previous file | src/compiler/machine-operator-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698