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)


> 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.

-- 
Eric Botcazou


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