This is the mail archive of the
mailing list for the GCC project.
Re: [patch] df-scan: split df_insn_delete for clearer dumps and better speed
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Steven Bosscher <stevenb dot gcc at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Paolo Bonzini <pbonzini at redhat dot com>
- Date: Thu, 21 Feb 2013 10:59:44 +0100
- Subject: Re: [patch] df-scan: split df_insn_delete for clearer dumps and better speed
- References: <CABu31nNwPkgtQsDDEzXoCP4J16Qv-1nV-+mGmf6CP63kykUx=Q@mail.gmail.com>
On Thu, Feb 21, 2013 at 1:10 AM, Steven Bosscher <email@example.com> wrote:
> 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
> 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. */
-df_insn_delete (basic_block bb, unsigned int uid)
+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.