--- a/hotspot/src/share/vm/opto/node.hpp Wed Jul 29 12:33:48 2015 +0200
+++ b/hotspot/src/share/vm/opto/node.hpp Wed Mar 18 16:16:30 2015 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -1038,13 +1038,35 @@
Node* find(int idx) const; // Search the graph for the given idx.
Node* find_ctrl(int idx) const; // Search control ancestors for the given idx.
void dump() const { dump("\n"); } // Print this node.
- void dump(const char* suffix, outputStream *st = tty) const;// Print this node.
+ void dump(const char* suffix, bool mark = false, outputStream *st = tty) const; // Print this node.
void dump(int depth) const; // Print this node, recursively to depth d
void dump_ctrl(int depth) const; // Print control nodes, to depth d
- virtual void dump_req(outputStream *st = tty) const; // Print required-edge info
- virtual void dump_prec(outputStream *st = tty) const; // Print precedence-edge info
- virtual void dump_out(outputStream *st = tty) const; // Print the output edge info
- virtual void dump_spec(outputStream *st) const {}; // Print per-node info
+ void dump_comp() const; // Print this node in compact representation.
+ // Print this node in compact representation.
+ void dump_comp(const char* suffix, outputStream *st = tty) const;
+ virtual void dump_req(outputStream *st = tty) const; // Print required-edge info
+ virtual void dump_prec(outputStream *st = tty) const; // Print precedence-edge info
+ virtual void dump_out(outputStream *st = tty) const; // Print the output edge info
+ virtual void dump_spec(outputStream *st) const {}; // Print per-node info
+ // Print compact per-node info
+ virtual void dump_compact_spec(outputStream *st) const { dump_spec(st); }
+ void dump_related() const; // Print related nodes (depends on node at hand).
+ // Print related nodes up to given depths for input and output nodes.
+ void dump_related(uint d_in, uint d_out) const;
+ void dump_related_compact() const; // Print related nodes in compact representation.
+ // Collect related nodes.
+ virtual void related(GrowableArray<Node*> *in_rel, GrowableArray<Node*> *out_rel, bool compact) const;
+ // Collect nodes starting from this node, explicitly including/excluding control and data links.
+ void collect_nodes(GrowableArray<Node*> *ns, int d, bool ctrl, bool data) const;
+
+ // Node collectors, to be used in implementations of Node::rel().
+ // Collect the entire data input graph. Include control inputs if requested.
+ void collect_nodes_in_all_data(GrowableArray<Node*> *ns, bool ctrl) const;
+ // Collect the entire control input graph. Include data inputs if requested.
+ void collect_nodes_in_all_ctrl(GrowableArray<Node*> *ns, bool data) const;
+ // Collect the entire output graph until hitting and including control nodes.
+ void collect_nodes_out_all_ctrl_boundary(GrowableArray<Node*> *ns) const;
+
void verify_edges(Unique_Node_List &visited); // Verify bi-directional edges
void verify() const; // Check Def-Use info for my subgraph
static void verify_recur(const Node *n, int verify_depth, VectorSet &old_space, VectorSet &new_space);
@@ -1091,6 +1113,20 @@
#endif
};
+
+#ifndef PRODUCT
+
+// Used in debugging code to avoid walking across dead or uninitialized edges.
+inline bool NotANode(const Node* n) {
+ if (n == NULL) return true;
+ if (((intptr_t)n & 1) != 0) return true; // uninitialized, etc.
+ if (*(address*)n == badAddress) return true; // kill by Node::destruct
+ return false;
+}
+
+#endif
+
+
//-----------------------------------------------------------------------------
// Iterators over DU info, and associated Node functions.
@@ -1618,6 +1654,7 @@
virtual uint ideal_reg() const;
#ifndef PRODUCT
virtual void dump_spec(outputStream *st) const;
+ virtual void dump_compact_spec(outputStream *st) const;
#endif
};