Commit e645b560 authored by mtrofin's avatar mtrofin Committed by Commit bot

[wasm] Debug-time print for compiler graph

Simple "Print" API for the compiler graph.

BUG=

Review-Url: https://codereview.chromium.org/2447993002
Cr-Commit-Position: refs/heads/master@{#40571}
parent d7a8caa9
......@@ -7,8 +7,9 @@
#include <algorithm>
#include "src/base/bits.h"
#include "src/compiler/node.h"
#include "src/compiler/graph-visualizer.h"
#include "src/compiler/node-properties.h"
#include "src/compiler/node.h"
#include "src/compiler/verifier.h"
namespace v8 {
......@@ -72,6 +73,11 @@ NodeId Graph::NextNodeId() {
return id;
}
void Graph::Print() const {
OFStream os(stdout);
os << AsRPO(*this);
}
} // namespace compiler
} // namespace internal
} // namespace v8
......@@ -121,6 +121,9 @@ class V8_EXPORT_PRIVATE Graph final : public NON_EXPORTED_BASE(ZoneObject) {
void AddDecorator(GraphDecorator* decorator);
void RemoveDecorator(GraphDecorator* decorator);
// Very simple print API usable in a debugger.
void Print() const;
private:
friend class NodeMarkerBase;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment