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] Remove useless df_insn_rescan calls in copyprop_hardreg_forward_1


On Tue, Feb 23, 2010 at 11:50 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> Hi!
>
> While looking into regcprop.c VTA issue, I've noticed that
> it calls df_insn_rescan right after apply_change_group succeeded (and
> validate_change is the only way how it changes code). ?As apply_change_group
> in that case already calls df_insn_rescan, IMNSHO we don't need to call it
> again.
>
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

Ok.

Thanks,
Richard.

> 2010-02-23 ?Jakub Jelinek ?<jakub@redhat.com>
>
> ? ? ? ?* regcprop.c (copyprop_hardreg_forward_1): Don't call df_insn_rescan.
>
> --- gcc/regcprop.c.jj ? 2009-11-25 16:47:37.000000000 +0100
> +++ gcc/regcprop.c ? ? ?2010-02-23 18:09:24.000000000 +0100
> @@ -1,6 +1,6 @@
> ?/* Copy propagation on hard registers for the GNU compiler.
> - ? Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
> - ? Free Software Foundation, Inc.
> + ? Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
> + ? 2010 ?Free Software Foundation, Inc.
>
> ? ?This file is part of GCC.
>
> @@ -650,7 +650,6 @@ copyprop_hardreg_forward_1 (basic_block
> ? ? ? ? ? ? ? ?{
> ? ? ? ? ? ? ? ? ?changed = apply_change_group ();
> ? ? ? ? ? ? ? ? ?gcc_assert (changed);
> - ? ? ? ? ? ? ? ? df_insn_rescan (insn);
> ? ? ? ? ? ? ? ? ?anything_changed = true;
> ? ? ? ? ? ? ? ?}
> ? ? ? ? ? ?}
> @@ -842,10 +841,7 @@ copyprop_hardreg_forward_1 (basic_block
>
> ? ? did_replacement:
> ? ? ? if (changed)
> - ? ? ? {
> - ? ? ? ? df_insn_rescan (insn);
> - ? ? ? ? anything_changed = true;
> - ? ? ? }
> + ? ? ? anything_changed = true;
>
> ? ? ? /* Clobber call-clobbered registers. ?*/
> ? ? ? if (CALL_P (insn))
>
> ? ? ? ?Jakub
>


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