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] Fix -fcompare-debug issue in reload1 (PR debug/46252)


On Tue, Nov 02, 2010 at 07:42:43PM +0100, Eric Botcazou wrote:
> > delete_dead_insn removes unused preceeding insn, but will not do that
> > if there are debug insns in between.
> > Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for
> > trunk?
> >
> > 2010-11-01  Jakub Jelinek  <jakub@redhat.com>
> >
> > 	PR debug/46252
> > 	* rtl.h (prev_real_nondebug_insn): New prototype.
> > 	* emit-rtl.c (prev_real_nondebug_insn): New function.
> > 	* reload1.c (delete_dead_insn): Use it instead of
> > 	prev_real_insn.
> > 	* cfgcleanup.c (try_head_merge_bb): Likewise.
> 
> The question is, shouldn't prev_real_insn (and next_real_insn) avoid returning 
> a DEBUG_INSN in the first place?  The remaining use of prev_real_insn seems 
> to want prev_real_nondebug_insn as well.

For prev_real_insn I think you're right, the remaining two uses also do want
to skip debug insns.  For next_real_insn I'm not that sure, it is used e.g.
in the scheduler where we want to see debug insns.
Having prev_real_insn skip debug insns and next_real_insn not skip them
would be inconsistent though.

	Jakub


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