From: Paolo Bonzini <bonzini@gnu.org>
To: Dimitrios Apostolou <jimis@gmx.net>
Cc: gcc-patches@gcc.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 07:12:00 -0000 [thread overview]
Message-ID: <4E16ABD2.2050701@gnu.org> (raw)
In-Reply-To: <alpine.LNX.2.02.1107080642240.1237@localhost.localdomain>
On 07/08/2011 05:51 AM, Dimitrios Apostolou wrote:
> + /* first write DF_REF_BASE */
This is not necessary. These uses are written to use_vec, while the
uses from REG_EQUIV and REG_EQUAL are written to eq_use_vec (see
df_ref_create_structure).
Also, anyway this wouldn't work because you would have to split the loop
in two. I'll attribute that to the time of day when you were writing
the message. :)
> + case REG_NON_LOCAL_GOTO:
> + /* The frame ptr is used by a non-local goto. */
> + df_ref_record (DF_REF_BASE, collection_rec,
> + regno_reg_rtx[FRAME_POINTER_REGNUM],
> + NULL, bb, insn_info,
> + DF_REF_REG_USE, 0);
> +#if !HARD_FRAME_POINTER_IS_FRAME_POINTER
> + df_ref_record (DF_REF_BASE, collection_rec,
> + regno_reg_rtx[HARD_FRAME_POINTER_REGNUM],
> + NULL, bb, insn_info,
> + DF_REF_REG_USE, 0);
> +#endif
> + break;
Also note that you have to check which of FRAME_POINTER_REGNUM and
HARD_FRAME_POINTER_REGNUM comes first here, if you want to ensure the
DF_REF_BASE refs are created sorted. But it's likely better to _not_
create them sorted and just replace qsort with an insertion sort, as
discussed offlist. It will cost a single swap in a pretty rare case.
Paolo
next prev parent reply other threads:[~2011-07-08 7:04 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
2011-07-08 6:36 ` Dimitrios Apostolou
2011-07-08 7:12 ` Paolo Bonzini [this message]
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=4E16ABD2.2050701@gnu.org \
--to=bonzini@gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=jimis@gmx.net \
--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).