This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH]: for making df faster.
- From: Kenneth Zadeck <zadeck at naturalbridge dot com>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>, "Bonzini, Paolo" <bonzini at gnu dot org>, "Park, Seongbae" <seongbae dot park at gmail dot com>, "Hubicha, Jan" <jh at suse dot cz>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 22 Jul 2007 11:39:06 -0400
- Subject: [PATCH]: for making df faster.
This patch depends on the first two frags of the regrename.c part of
http://gcc.gnu.org/ml/gcc-patches/2007-07/msg00356.html so until honza
gets that part of his patch accepted, this patch cannot go in.
This patch makes regrename behave as all of the other rtl level passes
by either rescanning the insns as they are changed or accumulating all
of the changes until the end of the pass. This speeds up regrename
(which is not frequently run) since rescanning all of the insns at the
end of a pass that changes very little is really slow.
I bootstrapped and regression tested this patch on x86-64, ppc and ia-64.
2007-07-22 Kenneth Zadeck <zadeck@naturalbridge.com>
* regrename.c (rerename_optimize): Use deferred rescanning and
insert explicit calls to rescan insns when changed.
Kenny
Index: regrename.c
===================================================================
--- regrename.c (revision 126821)
+++ regrename.c (working copy)
@@ -185,8 +185,8 @@ regrename_optimize (void)
df_set_flags (DF_LR_RUN_DCE);
df_note_add_problem ();
df_analyze ();
- df_set_flags (DF_NO_INSN_RESCAN);
-
+ df_set_flags (DF_DEFER_INSN_RESCAN);
+
memset (tick, 0, sizeof tick);
gcc_obstack_init (&rename_obstack);
@@ -346,8 +346,6 @@ regrename_optimize (void)
}
obstack_free (&rename_obstack, NULL);
- df_clear_flags (DF_NO_INSN_RESCAN);
- df_insn_rescan_all ();
if (dump_file)
fputc ('\n', dump_file);
@@ -365,6 +363,7 @@ do_replace (struct du_chain *chain, int
if (regno >= FIRST_PSEUDO_REGISTER)
ORIGINAL_REGNO (*chain->loc) = regno;
REG_ATTRS (*chain->loc) = attr;
+ df_insn_rescan (chain->insn);
chain = chain->next_use;
}
}
@@ -827,5 +826,7 @@
for (i = 0; i < n_ops; i++)
*recog_data.operand_loc[i] = old_operands[i];
+ if (recog_data.n_dups)
+ df_insn_rescan (insn);
/* Step 2B: Can't rename function call argument registers. */
if (CALL_P (insn) && CALL_INSN_FUNCTION_USAGE (insn))