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] Don't reset debug stmts in delete_trivially_dead_insns unnecessarily


On Tue, Oct 5, 2010 at 1:48 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> Hi!
>
> This patch implements something similar to what we do in DF to avoid
> resetting debug stmts, in particular if possible put a D#N temporary
> right before the to be deleted trivially dead insn and use the D#N
> DEBUG_EXPR in following DEBUG_INSNs instead of resetting them.
>
> Bootstrapped/regtested on x86_64-linux and i686-linux. ?Ok for trunk?
>
> In i686-linux bootstrap/regtest delete_trivially_dead_insns had
> to reset 18291 DEBUG_INSNs, but additional 19170 could be kept because of
> this patch, on x86_64-linux 20807 resets happened and 3503 could be kept.
> Still, even on x86_64-linux 180 DIEs in cc1plus got newly DW_AT_location
> which they didn't have before.
>
> 2010-10-05 ?Jakub Jelinek ?<jakub@redhat.com>
>
> ? ? ? ?* cse.c (is_dead_reg): Change into inline function that is not
> ? ? ? ?called through for_each_rtx.
> ? ? ? ?(set_live_p): Adjust caller.
> ? ? ? ?(insn_live_p): Don't reset DEBUG_INSNs here.
> ? ? ? ?(struct dead_debug_insn_data): New data.
> ? ? ? ?(count_stores, is_dead_debug_insn, replace_dead_reg): New functions.
> ? ? ? ?(delete_trivially_dead_insns): If there is just one setter for the
> ? ? ? ?dead reg that is referenced by some DEBUG_INSNs, create a DEBUG_EXPR
> ? ? ? ?and add DEBUG_INSN for it right before the removed setter and
> ? ? ? ?use the DEBUG_EXPR instead of the dead pseudo.
>

This caused:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46771

H.J.


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