diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-02-26 11:03:46 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-02-26 11:03:46 +0000 |
commit | b4d018540102e346f2d5efab723653aa058db1cd (patch) | |
tree | fac744086a908f3a248241a609608809305cd3af /gcc/var-tracking.c | |
parent | e55f862af93fdfc69f4ee2a59d9e587939ef54b0 (diff) | |
download | gcc-b4d018540102e346f2d5efab723653aa058db1cd.tar.gz |
* Makefile.in (var-tracking.o): Depend on $(DIAGNOSTIC_H).
* var-tracking.c: Include diagnostic.h.
(debug_dv): New function.
(dump_var): Print DEBUG_EXPR_DECLs as D#N instead of D.-N.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157085 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/var-tracking.c')
-rw-r--r-- | gcc/var-tracking.c | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c index 99589e95f2b..59369cb08be 100644 --- a/gcc/var-tracking.c +++ b/gcc/var-tracking.c @@ -111,6 +111,7 @@ #include "target.h" #include "toplev.h" #include "params.h" +#include "diagnostic.h" /* var-tracking.c assumes that tree code with the same value as VALUE rtx code has no chance to appear in REG_EXPR/MEM_EXPRs and isn't a decl. @@ -822,6 +823,17 @@ dv_from_value (rtx value) return dv; } +extern void debug_dv (decl_or_value dv); + +void +debug_dv (decl_or_value dv) +{ + if (dv_is_value_p (dv)) + debug_rtx (dv_as_value (dv)); + else + debug_generic_stmt (dv_as_decl (dv)); +} + typedef unsigned int dvuid; /* Return the uid of DV. */ @@ -5779,14 +5791,17 @@ dump_var (variable var) const_tree decl = dv_as_decl (var->dv); if (DECL_NAME (decl)) - fprintf (dump_file, " name: %s", - IDENTIFIER_POINTER (DECL_NAME (decl))); + { + fprintf (dump_file, " name: %s", + IDENTIFIER_POINTER (DECL_NAME (decl))); + if (dump_flags & TDF_UID) + fprintf (dump_file, "D.%u", DECL_UID (decl)); + } + else if (TREE_CODE (decl) == DEBUG_EXPR_DECL) + fprintf (dump_file, " name: D#%u", DEBUG_TEMP_UID (decl)); else fprintf (dump_file, " name: D.%u", DECL_UID (decl)); - if (dump_flags & TDF_UID) - fprintf (dump_file, " D.%u\n", DECL_UID (decl)); - else - fprintf (dump_file, "\n"); + fprintf (dump_file, "\n"); } else { |