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


On Thu, 2004-08-12 at 07:01, Olivier Hainque wrote:
>  That's actually what I did, which unfortunately doesn't change much because
>  no -g also implies no line number notes, whatever the optimize value.

One of my suggestions was to emit a dummy instruction to hold the block
info.  If we are compiling with optimization, it should get optimized
away.  If we are compiling without optimization, it should not get
optimized away.

You could try something like
  (use (const_int 0))
or maybe
  (clobber (const_int 0))
but you might need something a little more creative than that to
actually work.  Maybe emitting a no op move would work.

I don't see how a new CLEANUP_* value can fix this.  If there is no
active insn in a lexical block, then it disappears, regardless of
whether there is a basic block around to correspond to it.  In some
cases, there might be a jump_insn for the extra basic block, but this
won't be true in all cases.

Another issue to keep in mind here that for mainline, you will also need
to disable some of the optimizations done by tree-ssa.  The fixes we are
discussing really only solves the problem for gcc-3.4.

Or perhaps we should take a completely different approach here.  Instead
of trying to maintain the block info in the rtl, just accept that blocks
may get lost, and if we have unreferenced blocks left over in
reemit_insn_block_notes before the reorder_blocks call, then we just
insert them in some arbitrary place.  It doesn't really matter where,
since they have a 0 sized address span anyways.  Perhaps you were
suggesting something like this at the beginning?  We could optionally do
this only when not optimizing.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com



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