[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}
This commit is contained in:
parent
d7a8caa92a
commit
e645b56073
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user