public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Make debug(edge) more verbose.
@ 2019-05-31  9:33 Martin Liška
  2019-05-31 14:58 ` Jeff Law
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Liška @ 2019-05-31  9:33 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 426 bytes --]

Hi.

With the patch one can see more info during debugging:

(gdb) pp
<edge (5 -> 6)>
 5 [11.0% (guessed)]  count:105119324 (estimated locally) (FALLTHRU,CAN_FALLTHRU,LOOP_EXIT)

Ready for trunk?
Thanks,
Martin

gcc/ChangeLog:

2019-05-31  Martin Liska  <mliska@suse.cz>

	* cfg.c (debug): Use TDF_DETAILS for debug and
	print edge info only once.
---
 gcc/cfg.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)



[-- Attachment #2: 0001-Make-debug-edge-more-verbose.patch --]
[-- Type: text/x-patch, Size: 578 bytes --]

diff --git a/gcc/cfg.c b/gcc/cfg.c
index 94e68c83e45..983115ee40a 100644
--- a/gcc/cfg.c
+++ b/gcc/cfg.c
@@ -546,9 +546,10 @@ dump_edge_info (FILE *file, edge e, dump_flags_t flags, int do_succ)
 DEBUG_FUNCTION void
 debug (edge_def &ref)
 {
-  /* FIXME (crowl): Is this desireable?  */
-  dump_edge_info (stderr, &ref, TDF_NONE, false);
-  dump_edge_info (stderr, &ref, TDF_NONE, true);
+  fprintf (stderr, "<edge (%d -> %d)>\n",
+	   ref.src->index, ref.dest->index);
+  dump_edge_info (stderr, &ref, TDF_DETAILS, false);
+  fprintf (stderr, "\n");
 }
 
 DEBUG_FUNCTION void


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Make debug(edge) more verbose.
  2019-05-31  9:33 [PATCH] Make debug(edge) more verbose Martin Liška
@ 2019-05-31 14:58 ` Jeff Law
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2019-05-31 14:58 UTC (permalink / raw)
  To: Martin Liška, gcc-patches

On 5/31/19 3:23 AM, Martin Liška wrote:
> Hi.
> 
> With the patch one can see more info during debugging:
> 
> (gdb) pp
> <edge (5 -> 6)>
>  5 [11.0% (guessed)]  count:105119324 (estimated locally) (FALLTHRU,CAN_FALLTHRU,LOOP_EXIT)
> 
> Ready for trunk?
> Thanks,
> Martin
> 
> gcc/ChangeLog:
> 
> 2019-05-31  Martin Liska  <mliska@suse.cz>
> 
> 	* cfg.c (debug): Use TDF_DETAILS for debug and
> 	print edge info only once.
> ---
>  gcc/cfg.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> 
OK
jeff

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-05-31 14:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-31  9:33 [PATCH] Make debug(edge) more verbose Martin Liška
2019-05-31 14:58 ` Jeff Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).