< prev index next >
src/share/vm/opto/cfgnode.hpp
Print this page
rev 8739 : 8004073: Implement C2 Ideal node specific dump() method
Summary: add Node::dump_rel() to dump a node and its related nodes (the notion of "related" depends on the node at hand); add Node::dump_comp() to dump a node in compact representation; add Node::dump_rel_comp() to dump a node and its related nodes in compact representation; add the required machinery; extend some C2 IR nodes with compact and related dumping
Reviewed-by:
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1997, 2010, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -227,10 +227,14 @@
virtual bool depends_only_on_test() const { return false; }
virtual const Type *bottom_type() const { return Type::CONTROL; }
virtual const Type *Value( PhaseTransform *phase ) const;
virtual Node *Identity( PhaseTransform *phase );
virtual const RegMask &out_RegMask() const;
+
+#ifndef PRODUCT
+ virtual void rel(GrowableArray<Node*> *in_rel, GrowableArray<Node*> *out_rel, bool compact) const;
+#endif
};
//------------------------------CProjNode--------------------------------------
// control projection for node that produces multiple control-flow paths
class CProjNode : public ProjNode {
@@ -380,10 +384,11 @@
// Returns NULL is it couldn't improve the type.
static const TypeInt* filtered_int_type(PhaseGVN* phase, Node* val, Node* if_proj);
#ifndef PRODUCT
virtual void dump_spec(outputStream *st) const;
+ virtual void rel(GrowableArray <Node *> *in_rel, GrowableArray <Node *> *out_rel, bool compact) const;
#endif
};
class IfProjNode : public CProjNode {
public:
@@ -391,10 +396,15 @@
virtual Node *Identity(PhaseTransform *phase);
protected:
// Type of If input when this branch is always taken
virtual bool always_taken(const TypeTuple* t) const = 0;
+
+#ifndef PRODUCT
+public:
+ virtual void rel(GrowableArray<Node*> *in_rel, GrowableArray<Node*> *out_rel, bool compact) const;
+#endif
};
class IfTrueNode : public IfProjNode {
public:
IfTrueNode( IfNode *ifnode ) : IfProjNode(ifnode,1) {
@@ -453,10 +463,13 @@
init_class_id(Class_Jump);
}
virtual int Opcode() const;
virtual const RegMask& out_RegMask() const;
virtual const Node* is_block_proj() const { return this; }
+#ifndef PRODUCT
+ virtual void rel(GrowableArray<Node*> *in_rel, GrowableArray<Node*> *out_rel, bool compact) const;
+#endif
};
class JumpProjNode : public JProjNode {
virtual uint hash() const;
virtual uint cmp( const Node &n ) const;
@@ -477,10 +490,12 @@
int dest_bci() const { return _dest_bci; }
int switch_val() const { return _switch_val; }
uint proj_no() const { return _proj_no; }
#ifndef PRODUCT
virtual void dump_spec(outputStream *st) const;
+ virtual void dump_comp_spec(outputStream *st) const;
+ virtual void rel(GrowableArray<Node*> *in_rel, GrowableArray<Node*> *out_rel, bool compact) const;
#endif
};
//------------------------------CatchNode--------------------------------------
// Helper node to fork exceptions. "Catch" catches any exceptions thrown by
< prev index next >