From: Vladimir Makarov <vmakarov@redhat.com>
To: Jeff Law <law@redhat.com>
Cc: Ian Bolton <bolton@IceraSemi.com>, gcc@gcc.gnu.org
Subject: Re: Understanding IRA
Date: Wed, 04 Nov 2009 17:13:00 -0000 [thread overview]
Message-ID: <4AF1B65F.5080500@redhat.com> (raw)
In-Reply-To: <4AF0B686.30107@redhat.com>
Jeff Law wrote:
> On 11/03/09 09:29, Ian Bolton wrote:
>> Hi again, Vladimir,
>>
>> I am pleased to report some performance improvements after altering
>> ira-costs.c. A key benchmark for us has improved by 5%.
>>
>> Specifically, in record_reg_classes(), after the alt_cost has been
>> calculated and it will be applied to pp->mem_cost and pp->cost[k], I
>> check whether this particular operand wanted one of our BOTTOM_REGS
>> (r0-r15) and I further increase the pp->mem_cost by an arbitrary
>> amount and also increase pp->cost[k] by an arbitrary amount if k
>> does not represent the BOTTOM_REGS class. My aim here is to nudge
>> IRA in the right direction for operands that just want BOTTOM_REGS.
>>
>> After experimenting with different values for my "arbitrary
>> amounts", I discovered some that successfully made IRA more likely
>> to give BOTTOM_REGS to those instructions/operands that want
>> BOTTOM_REGS, since any other regs and memory ended up with high
>> enough costs for IRA to try and avoid using them.
>>
>> I have included a snippet from my version of record_reg_classes()
>> below:
>>
>>
> What I don't understand at this point is why the current mechanisms in
> IRA aren't showing a lower cost for using BOTTOM_REGS (or a higher
> cost for TOP_REGS). i.e. I don't think any of this should be
> necessary as IRA should already be doing something similar.
>
> This may be a case where your backend hasn't indicated that TOP_REGS
> has a higher cost than BOTTOM_REGS in particular situations.
>
I am agree with Jeff. It is hard to understand what you are doing
without the architecture knowledge and some macro values in your port
(IRA_COVER_CLASSES, MEMORY_MOVE_COST, and REGISTER_MOVE_COST).
I'd also add that besides right macro value definitions, you could use
insn alternative hints near register constraints like ? or even *.
next prev parent reply other threads:[~2009-11-04 17:13 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-16 14:22 Ian Bolton
2009-10-16 15:23 ` Vladimir Makarov
2009-10-16 16:19 ` Jeff Law
2009-10-19 19:21 ` Ian Bolton
2009-10-19 21:09 ` Vladimir Makarov
2009-10-23 7:33 ` Jeff Law
2009-11-04 17:52 ` Ian Bolton
2009-11-04 19:49 ` Jeff Law
2009-10-16 15:45 ` Vladimir Makarov
2009-11-03 16:29 ` Ian Bolton
2009-11-03 23:02 ` Jeff Law
2009-11-04 17:13 ` Vladimir Makarov [this message]
2009-11-05 0:23 ` Jeff Law
2009-11-05 17:36 Ian Bolton
2009-11-05 18:05 ` Ian Bolton
2009-11-06 12:53 ` Dave Hudson
2009-11-09 14:13 ` Ian Bolton
2009-11-10 12:19 ` Dave Hudson
2009-11-10 17:21 ` Jeff Law
2009-11-10 17:38 ` Ian Bolton
2009-11-11 15:19 ` Ian Bolton
2009-11-11 16:12 ` Jeff Law
2009-11-11 17:04 ` Vladimir Makarov
2009-11-11 18:36 ` Ian Bolton
2009-11-11 20:09 ` Ian Bolton
2009-11-16 17:35 ` Ian Bolton
[not found] ` <4B01BB87.6020902@redhat.com>
2009-11-19 15:41 ` Ian Bolton
[not found] ` <4B1451C7.2010207@redhat.com>
2009-12-02 20:29 ` Ian Bolton
2009-12-03 19:16 ` Jeff Law
2009-12-07 13:30 ` Ian Bolton
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=4AF1B65F.5080500@redhat.com \
--to=vmakarov@redhat.com \
--cc=bolton@IceraSemi.com \
--cc=gcc@gcc.gnu.org \
--cc=law@redhat.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).