[lto] Show addresses of cgraph nodes
Diego Novillo
dnovillo@google.com
Fri Dec 19 14:15:00 GMT 2008
Useful when debugging large callgraph sets.
Tested on x86_64.
Diego.
* cgraph.c (dump_cgraph_node): Show memory address of NODE.
* cgraph.h (csi_end_p): Tidy formatting.
Index: cgraph.c
===================================================================
--- cgraph.c (revision 142823)
+++ cgraph.c (working copy)
@@ -1139,7 +1139,8 @@ void
dump_cgraph_node (FILE *f, struct cgraph_node *node)
{
struct cgraph_edge *edge;
- fprintf (f, "%s/%i(%i):", cgraph_node_name (node), node->uid, node->pid);
+ fprintf (f, "%s/%i(%i) [%p]:", cgraph_node_name (node), node->uid,
+ node->pid, (void *) node);
if (node->global.inlined_to)
fprintf (f, " (inline copy in %s/%i)",
cgraph_node_name (node->global.inlined_to),
Index: cgraph.h
===================================================================
--- cgraph.h (revision 142823)
+++ cgraph.h (working copy)
@@ -425,7 +425,7 @@ const char *cgraph_inline_failed_string
static inline bool
csi_end_p (cgraph_node_set_iterator csi)
{
- return csi.index >= VEC_length(cgraph_node_ptr, csi.set->nodes);
+ return csi.index >= VEC_length (cgraph_node_ptr, csi.set->nodes);
}
/* Advance iterator CSI. */
More information about the Gcc-patches
mailing list