From: Dimitrios Apostolou <jimis@gmx.net>
To: gcc-patches@gcc.gnu.org
Cc: Paolo Bonzini <bonzini@gnu.org>, Steven Bosscher <stevenb.gcc@gmail.com>
Subject: Re: [df-scan.c] Optimise DF_REFs ordering in collection_rec, use HARD_REG_SETs instead of bitmaps
Date: Fri, 08 Jul 2011 03:52:00 -0000 [thread overview]
Message-ID: <alpine.LNX.2.02.1107080631090.1237@localhost.localdomain> (raw)
In-Reply-To: <alpine.LNX.2.02.1107080549070.1237@localhost.localdomain>
To document the gains from the bitmaps, here is (part of) the annotated
source from callgrind profiler, showing instruction count. Before:
1,154,400 if (bitmap_bit_p(regs_invalidated_by_call_regset, i)
8,080,800 => bitmap.c:bitmap_bit_p (192400x)
1,021,200 && !bitmap_bit_p (&defs_generated, i)
5,106,000 => bitmap.c:bitmap_bit_p (170200x)
340,400 && (!is_sibling_call
. || !bitmap_bit_p (df->exit_block_uses, i)
. || refers_to_regno_p (i, i+1,
. crtl->return_rtx, NULL)))
2,053,500 df_ref_record (DF_REF_BASE, collection_rec, regno_reg_rtx[i
35,279,934 => df-scan.c:df_ref_record (170200x)
. NULL, bb, insn_info, DF_REF_REG_DEF,
. DF_REF_MAY_CLOBBER | flags);
. }
After:
1,346,800 if (TEST_HARD_REG_BIT(regs_invalidated_by_call, i)
510,600 && !TEST_HARD_REG_BIT (defs_generated, i)
340,400 && (!is_sibling_call
. || !bitmap_bit_p (df->exit_block_uses, i)
. || refers_to_regno_p (i, i+1,
. crtl->return_rtx, NULL)))
2,057,200 df_ref_record (DF_REF_BASE, collection_rec, regno_reg_rtx[i
35,279,934 => df-scan.c:df_ref_record (170200x)
. NULL, bb, insn_info, DF_REF_REG_DEF,
. DF_REF_MAY_CLOBBER | flags);
. }
Dimitris
next prev parent reply other threads:[~2011-07-08 3:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-08 3:33 Dimitrios Apostolou
2011-07-08 3:52 ` Dimitrios Apostolou [this message]
2011-07-08 6:36 ` Dimitrios Apostolou
2011-07-08 7:12 ` Paolo Bonzini
2011-07-09 1:29 ` Dimitrios Apostolou
2011-07-08 6:37 ` Steven Bosscher
2011-07-08 7:04 ` Dimitrios Apostolou
2011-07-08 6:59 ` Jakub Jelinek
2011-07-08 9:09 ` Dimitrios Apostolou
2011-07-08 14:22 ` Paolo Bonzini
2011-07-08 14:25 ` Paolo Bonzini
2011-07-08 8:42 ` Richard Guenther
2011-07-08 10:20 ` Dimitrios Apostolou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LNX.2.02.1107080631090.1237@localhost.localdomain \
--to=jimis@gmx.net \
--cc=bonzini@gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=stevenb.gcc@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).