Makefile.in (var-tracking.o): Depend on $(DIAGNOSTIC_H).

* 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.

From-SVN: r157085
This commit is contained in:
Jakub Jelinek 2010-02-26 12:03:46 +01:00 committed by Jakub Jelinek
parent 5a30996511
commit 6764d92cee
3 changed files with 27 additions and 7 deletions

View File

@ -1,5 +1,10 @@
2010-02-26 Jakub Jelinek <jakub@redhat.com>
* 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.
PR debug/43160
* var-tracking.c (dv_onepart_p): Return true for DEBUG_EXPR_DECLs.
(add_value_chain, add_value_chains, remove_value_chain,

View File

@ -3025,7 +3025,7 @@ var-tracking.o : var-tracking.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(TREE_H) hard-reg-set.h insn-config.h reload.h $(FLAGS_H) \
$(BASIC_BLOCK_H) output.h sbitmap.h alloc-pool.h $(FIBHEAP_H) $(HASHTAB_H) \
$(REGS_H) $(EXPR_H) $(TIMEVAR_H) $(TREE_PASS_H) $(TREE_FLOW_H) \
cselib.h $(TARGET_H) $(TOPLEV_H) $(PARAMS_H)
cselib.h $(TARGET_H) $(TOPLEV_H) $(PARAMS_H) $(DIAGNOSTIC_H)
profile.o : profile.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(TREE_H) $(FLAGS_H) output.h $(REGS_H) $(EXPR_H) $(FUNCTION_H) \
$(TOPLEV_H) $(COVERAGE_H) $(TREE_FLOW_H) value-prof.h cfghooks.h \

View File

@ -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
{