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] df-scan: split df_insn_delete for clearer dumps and better speed


On Thu, Feb 21, 2013 at 1:10 AM, Steven Bosscher <stevenb.gcc@gmail.com> wrote:
> Hello,
>
> The attached patch splits a new function df_insn_info_delete from
> df_insn_delete. The original motivation was to get rid of the silly
> "deleting insn with uid = ..." messages when re-scanning an insn,
> because the mentioned insn isn't deleted at all (it's just rescanned).
> But it turns out that there is also a modest but measurable speed-up
> (especially at -O0), probably because of avoiding the overhead of
> df_grow_bb_info and df_grow_reg_info in common usage of
> df_insn_delete.
>
> Bootstrapped&tested on powerpc64-unknown-linux-gnu and on
> x86_64-unknown-linux-gnu. OK for trunk?

+/* Delete all of the refs information from the insn with UID.
+   Internal helper for df_insn_info_delete, df_insn_rescan, and other

df_insn_delete I suppose

+   df-scan routines that don't have to work in deferred mode and don't
+   have to mark basic blocks for re-processing.  */

-void
-df_insn_delete (basic_block bb, unsigned int uid)
+static void
+df_insn_info_delete (unsigned int uid)
 {

+/* Delete all of the refs information from INSN, either right now
+   or marked for later in deferred mode.
+
+   FIXME: BB must be passed in, to mark the basic block containing
+         the insn as dirty, but emit-rtl.c doesn't do so.  */

you mean the remove_insn call?  So it should call df_insn_info_delete instead?
It _does_ mark the block as dirtly later, if it is not a debug insn.

Your change changes behavior for df->changeable_flags &
DF_DEFER_INSN_RESCAN btw, so it needs someone DF aware to review
and that makes it stage1 material as well I think.

It's also odd how insn_info == NULL is handled here.

Richard.

> Ciao!
> Steven


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