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

Unified Diff: src/compiler/graph-replay.h

Issue 426233002: Land the Fan (disabled) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback, rebase and "git cl format" Created 6 years, 5 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 | « src/compiler/graph-reducer.cc ('k') | src/compiler/graph-replay.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/graph-replay.h
diff --git a/src/compiler/graph-replay.h b/src/compiler/graph-replay.h
new file mode 100644
index 0000000000000000000000000000000000000000..cc186d77c94a0aa9e1c956fda75d1b72dd0821ed
--- /dev/null
+++ b/src/compiler/graph-replay.h
@@ -0,0 +1,44 @@
+// Copyright 2014 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_GRAPH_REPLAY_H_
+#define V8_COMPILER_GRAPH_REPLAY_H_
+
+#include "src/v8.h"
+
+#include "src/compiler/node.h"
+
+namespace v8 {
+namespace internal {
+namespace compiler {
+
+class Graph;
+class Operator;
+
+// Helper class to print a full replay of a graph. This replay can be used to
+// materialize the same graph within a C++ unit test and hence test subsequent
+// optimization passes on a graph without going through the construction steps.
+class GraphReplayPrinter : public NullNodeVisitor {
+ public:
+#ifdef DEBUG
+ static void PrintReplay(Graph* graph);
+#else
+ static void PrintReplay(Graph* graph) {}
+#endif
+
+ GenericGraphVisit::Control Pre(Node* node);
+ void PostEdge(Node* from, int index, Node* to);
+
+ private:
+ GraphReplayPrinter() {}
+
+ static void PrintReplayOpCreator(Operator* op);
+
+ DISALLOW_COPY_AND_ASSIGN(GraphReplayPrinter);
+};
+}
+}
+} // namespace v8::internal::compiler
+
+#endif // V8_COMPILER_GRAPH_REPLAY_H_
« no previous file with comments | « src/compiler/graph-reducer.cc ('k') | src/compiler/graph-replay.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698