This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] DOT a function directly from a gdb session


On Wed, Dec 12, 2012 at 03:11:26PM +0100, Steven Bosscher wrote:
> There are several warts that need addressing for GCC 4.9. I'm aware of
> the following bugs. There may be others, if you find any please let me
> know.
 
Ok, in case I find something, I'll let you know.

> 1. dumping for debug_dot_cfg (struct function *fn), fn != cfun
> This doesn't work with non-loop dumping because
> pre_and_rev_post_order_compute only works on cfun. Much of the CFG
> infrastructure hasn't been fully converted yet to work on any
> arbitrary CFG. Historically, there would be only one CFG at a time,
> but with cgraph we now maintain CFGs (and even loops) for functions
> throughout the compilation process. I'm planning to fix most issues
> for GCC 4.9.

So ideally pre_and_rev_post_order_compute should have another
parameter of type struct function *, right?

> 2. dumping with unreachable blocks
> The CFG dumpers actually handle this (since my latest patch to
> graph.c) but pre_and_rev_post_order_compute does not. If you remove
> the assert there, it will work. Again, for GCC 4.9 we'll have to look
> into a better solution for this (e.g. only conditionally assert, on
> demand).

Yeah, I have unreachable blocks in CFG, so that's it.

> 3. dumping with loops but incorrect loop tree
> If the loop tree isn't up to date, get_loop_body* will not work
> properly and dumping the CFG will crash. I don't know of any means to
> check the state of the loop tree and fall back to non-loop dumping.
> 
> 4. dumping with some of the more exotic tree dumping flags
> Not sure if all of them work, I haven't tested all combinations (vops,
> stmtaddr, etc.).

Thanks,

	Marek


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]