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

Unified Diff: src/compiler/store-store-elimination.h

Issue 2087483003: [compiler] Introduce a simple store-store elimination, disabled by default. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@p1
Patch Set: Created 4 years, 6 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/store-store-elimination.h
diff --git a/src/compiler/store-store-elimination.h b/src/compiler/store-store-elimination.h
new file mode 100644
index 0000000000000000000000000000000000000000..383ed710a18c1c95797bd32c206f7667b90ed0fe
--- /dev/null
+++ b/src/compiler/store-store-elimination.h
@@ -0,0 +1,41 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef V8_COMPILER_STORE_STORE_ELIMINATION_H_
+#define V8_COMPILER_STORE_STORE_ELIMINATION_H_
+
+#include "src/compiler/common-operator.h"
+#include "src/compiler/graph-reducer.h"
+#include "src/compiler/js-graph.h"
+
+namespace v8 {
+namespace internal {
+namespace compiler {
+
+// Forward declarations.
+class CommonOperatorBuilder;
+class JSGraph;
+
+class StoreStoreElimination final {
+ public:
+ StoreStoreElimination(JSGraph* js_graph, Zone* zone);
+ ~StoreStoreElimination();
+
+ static bool IsEligibleNode(Node* node);
+
+ void ReduceEligibleNode(Node* node);
+
+ private:
+ JSGraph* jsgraph() const { return jsgraph_; }
+ Zone* zone() const { return zone_; }
+
+ JSGraph* const jsgraph_;
+ Zone* const zone_;
+};
+
+} // namespace compiler
+} // namespace internal
+} // namespace v8
+
+#endif // V8_COMPILER_STORE_STORE_ELIMINATION_H_

Powered by Google App Engine
This is Rietveld 408576698