Commit 66350781 by Diego Novillo Committed by Diego Novillo

tree-dfa.c (dump_variable): Write DECL_INITIAL for VAR if it has one.


	* tree-dfa.c (dump_variable): Write DECL_INITIAL for VAR
	if it has one.  Handle cases where VAR does not have an
	annotation or cfun is NULL.

From-SVN: r149291
parent d251bfca
2009-07-06 Diego Novillo <dnovillo@google.com> 2009-07-06 Diego Novillo <dnovillo@google.com>
* tree-dfa.c (dump_variable): Write DECL_INITIAL for VAR
if it has one. Handle cases where VAR does not have an
annotation or cfun is NULL.
2009-07-06 Diego Novillo <dnovillo@google.com>
* tree.c: Include debug.h. * tree.c: Include debug.h.
(initialize_tree_contains_struct): New. (initialize_tree_contains_struct): New.
(init_ttree): Call it. (init_ttree): Call it.
......
...@@ -275,20 +275,26 @@ dump_variable (FILE *file, tree var) ...@@ -275,20 +275,26 @@ dump_variable (FILE *file, tree var)
else if (is_call_used (var)) else if (is_call_used (var))
fprintf (file, ", call used"); fprintf (file, ", call used");
if (ann->noalias_state == NO_ALIAS) if (ann && ann->noalias_state == NO_ALIAS)
fprintf (file, ", NO_ALIAS (does not alias other NO_ALIAS symbols)"); fprintf (file, ", NO_ALIAS (does not alias other NO_ALIAS symbols)");
else if (ann->noalias_state == NO_ALIAS_GLOBAL) else if (ann && ann->noalias_state == NO_ALIAS_GLOBAL)
fprintf (file, ", NO_ALIAS_GLOBAL (does not alias other NO_ALIAS symbols" fprintf (file, ", NO_ALIAS_GLOBAL (does not alias other NO_ALIAS symbols"
" and global vars)"); " and global vars)");
else if (ann->noalias_state == NO_ALIAS_ANYTHING) else if (ann && ann->noalias_state == NO_ALIAS_ANYTHING)
fprintf (file, ", NO_ALIAS_ANYTHING (does not alias any other symbols)"); fprintf (file, ", NO_ALIAS_ANYTHING (does not alias any other symbols)");
if (gimple_default_def (cfun, var)) if (cfun && gimple_default_def (cfun, var))
{ {
fprintf (file, ", default def: "); fprintf (file, ", default def: ");
print_generic_expr (file, gimple_default_def (cfun, var), dump_flags); print_generic_expr (file, gimple_default_def (cfun, var), dump_flags);
} }
if (DECL_INITIAL (var))
{
fprintf (file, ", initial: ");
print_generic_expr (file, DECL_INITIAL (var), dump_flags);
}
fprintf (file, "\n"); fprintf (file, "\n");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment