From: Vladimir Makarov <vmakarov@redhat.com>
To: Richard Biener <rguenther@suse.de>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] rtl-optimization/104686 - speedup IRA allocno conflict test
Date: Wed, 2 Mar 2022 08:58:27 -0500 [thread overview]
Message-ID: <10e68be1-314a-4078-243b-09ccbf08176b@redhat.com> (raw)
In-Reply-To: <20220302085845.423FC13345@imap2.suse-dmz.suse.de>
On 2022-03-02 03:58, Richard Biener wrote:
> In this PR allocnos_conflict_p takes 90% of the compile-time via
> the calls from update_conflict_hard_regno_costs. This is due to
> the high number of conflicts recorded in the dense bitvector
> representation. Fortunately we can take advantage of the bitvector
> representation here and turn the O(n) conflict test into an O(1) one,
> greatly speeding up the compile of the testcase from 39s to just 4s
> (93% IRA time to 26% IRA time).
>
> While for the testcase in question the first allocno is almost always
> the nice one the patch tries a more systematic approach to finding
> the allocno to iterate object conflicts over. That does reduce
> the actual number of compares for the testcase but it doesn't make
> a measurable difference wall-clock wise. That's not guaranteed
> though I think so I've kept this systematic way of choosing the
> cheapest allocno.
>
> Bootstrapped and tested on x86_64-unknown-linux-gnu.
>
> OK for trunk?
>
Yes.
Richard, thank you again for working on this issue.
> 2022-03-02 Richard Biener <rguenther@suse.de>
>
> PR rtl-optimization/104686
> * ira-color.cc (object_conflicts_with_allocno_p): New function
> using a bitvector test instead of iterating when possible.
> (allocnos_conflict_p): Choose the best allocno to iterate over
> object conflicts.
> (update_conflict_hard_regno_costs): Do allocnos_conflict_p test
> last.
> other_allocno),
prev parent reply other threads:[~2022-03-02 13:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-02 8:58 Richard Biener
2022-03-02 13:58 ` Vladimir Makarov [this message]
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=10e68be1-314a-4078-243b-09ccbf08176b@redhat.com \
--to=vmakarov@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=rguenther@suse.de \
/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).