From: Steven Bosscher <stevenb@suse.de>
To: Shinpei Kato <shinny@j02.itscom.net>, gcc@gcc.gnu.org
Subject: Re: ARCH_rtx_costs
Date: Fri, 08 Oct 2004 08:18:00 -0000 [thread overview]
Message-ID: <200410080916.52678.stevenb@suse.de> (raw)
In-Reply-To: <20041008101956.2FAD.SHINNY@j02.itscom.net>
On Friday 08 October 2004 03:20, Shinpei Kato wrote:
> Hi, Eric. Thanks for reply.
>
> > http://gcc.gnu.org/onlinedocs/gccint/Costs.html#Costs
>
> Yes I refer to it.
>
> > Has most of the cost information you need, looking at a similar existing
> > port could help. What you want to remember in particular is that it's a
> > set of relative costs. For example, if your "fast" instruction is an
> > add, e.g. add $2, $3, $4, and takes one cycle and a multiply takes 12
> > cycles then you'd want to have a MULT cost COST_N_INSNS (12).
>
> So COST_N_INSNS doesn't mean real cycles but relative cycles, does it?
> That is, COST_N_INSNS (1) doesn't mean one cycle.
It's COSTS_N_INSNS, note the extra S. From rtl.h: (you can look at
the sources too, they're there for a reason ;-)
/* Return the right cost to give to an operation
to make the cost of the corresponding register-to-register instruction
N times that of a fast register-to-register instruction. */
#define COSTS_N_INSNS(N) ((N) * 4)
so COSTS_N_INSNS(1) is the cost of a reg-reg move instruction, and
COSTS_N_INSNS(X) is the cost of X is relative to that.
> If I don't know about cycle cost, I need to ask people who develop an
> architecture.
Yes.
Gr.
Steven
next prev parent reply other threads:[~2004-10-08 7:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-07 13:04 ARCH_rtx_costs Shinpei Kato
2004-10-07 19:17 ` ARCH_rtx_costs Eric Christopher
2004-10-08 8:01 ` ARCH_rtx_costs Shinpei Kato
2004-10-08 8:18 ` Steven Bosscher [this message]
2004-10-08 11:47 ` ARCH_rtx_costs Shinpei Kato
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=200410080916.52678.stevenb@suse.de \
--to=stevenb@suse.de \
--cc=gcc@gcc.gnu.org \
--cc=shinny@j02.itscom.net \
/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).