This is the mail archive of the gcc@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: O0 cleanup_cfg vs debuggability


James E Wilson wrote:
> In gcc-3.4, I think you can solve this by redefining what a forwarder 
> block is, or how we handle them.  See forwarder_block_p in cfganal.c. 
> Normally, a forwarder block is something that contains no active insns 
> other than a branch, and we optimize them away whenever possible to 
> simplify the cfg.  However, if we want full debugging info, then a block 
> that contains a line number note should not be considered a forwarder 
> block, or else, we should not be optimizing away forwarder blocks.  The 
> rest of what the jump pass is doing is probably not relevant to your 
> problem.
> 
> In gcc-3.5 however, we are already screwed before the first rtl pass. 
> As a side effect of the gimple to rtl transformation, we don't bother to 
> emit the empty block that is only needed to hold the line number note. 
> So we would have to fix the gimple to rtl transformation first to 
> preserve this info, then fix the cleanup_cfg code to not optimize away 
> blocks that contain line number notes.  Try compiling with -da 
> -fdump-tree-all and look at the last tree dump and the first rtl dump.

 I see. Will investigate further the various possible approaches and
 get back to you later. Thanks for your prompt feedback.

 Olivier


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