http://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html#Debugging-Options

describes -fdump-tree-SWITCH

where SWITCH may be one of a number of "switches" including:

  cfg
  vcg

I tried the vcg switch; however, it looks like that's just the control
flow for basic block.  The cfg switch looks similar except it
prefixes the control flow for each function with the function
name.  In addition, calls in the function appear as the actual
function name called with possibly some generated variable
names as argument and result.  For example, the output from
compile of cp/pt.c with -fdump-tree-cfg contains:

instantiate_class_template (type)
{
...
}

and within the ..., there's:

  union tree_node * D.76307;
  union tree_node * type.1598;
  ...
  type.1598 = type;
  D.76307 = most_specialized_class (type.1598, templ);

which I think corresponds to the obvious line in:

  /* Figure out which template is being instantiated.  */
  templ = most_general_template (CLASSTYPE_TI_TEMPLATE (type));
  gcc_assert (TREE_CODE (templ) == TEMPLATE_DECL);

  /* Determine what specialization of the original template to
     instantiate.  */
  t = most_specialized_class (type, templ);
  if (t == error_mark_node)

of pt.c around line 7371 (viewable here:
http://gcc.gnu.org/viewcvs/trunk/gcc/cp/pt.c?revision=153977&view=markup
)

Does someone know of a way to view this in a graphical way,
somewhat like what xvcg does for its cfg's?

TIA.

-Larry

Reply via email to