This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Remove useless df_insn_rescan calls in copyprop_hardreg_forward_1
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Paolo Bonzini <pbonzini at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 23 Feb 2010 23:50:10 +0100
- Subject: [PATCH] Remove useless df_insn_rescan calls in copyprop_hardreg_forward_1
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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?
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