public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Sandra Loosemore <sandra@codesourcery.com>
To: Segher Boessenkool <segher@kernel.crashing.org>,
	<gcc-patches@gcc.gnu.org>
Cc: <law@redhat.com>
Subject: Re: [PATCH 3/3] Add targetm.insn_cost hook
Date: Wed, 11 Oct 2017 23:48:00 -0000	[thread overview]
Message-ID: <59DEABAD.6030603@codesourcery.com> (raw)
In-Reply-To: <b043f49b7c81c4d92f4e36807f28c49781fe63f3.1507574244.git.segher@kernel.crashing.org>

On 10/09/2017 01:35 PM, Segher Boessenkool wrote:
> This adds a new hook that the insn_cost function uses if a target has
> implemented it (it uses the old pattern_cost nee insn_rtx_cost if not).
>
> I'll commit this now; it was okayed by Jeff at
> https://gcc.gnu.org/ml/gcc-patches/2017-08/msg00204.html .
>
>
> Segher
>
>
> 2017-10-09  Segher Boessenkool  <segher@kernel.crashing.org>
>
> 	* target.def (insn_cost): New hook.
> 	* doc/tm.texi.in (TARGET_INSN_COST): New hook.
> 	* doc/tm.texi: Regenerate.
> 	* rtlanal.c (insn_cost): Use the new hook.

As a target maintainer, I'm kind of confused by this patch, and I don't 
think the tm.texi change gives sufficient guidance about the default 
hook behavior, how it interacts with TARGET_RTX_COSTS and/or 
TARGET_ADDRESS_COST, or the different contexts the three hooks are used 
in.  Do target maintainers need to do something to define this new hook 
to prevent performance regressions?

I could try to write up some advice about cost models and tuning for the 
internals manual, but at present I don't feel like I have any 
understanding of what motivated this change or how it changed the 
recommended practices for back end tuning.  :-(

-Sandra the missing-some-brain-cells


  reply	other threads:[~2017-10-11 23:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-09 19:35 [PATCH 1/3] Replace insn_rtx_cost with insn_cost and pattern_cost Segher Boessenkool
2017-10-09 19:35 ` [PATCH 2/3] combine: Use insn_cost instead of pattern_cost everywhere Segher Boessenkool
2017-10-09 19:48 ` [PATCH 3/3] Add targetm.insn_cost hook Segher Boessenkool
2017-10-11 23:48   ` Sandra Loosemore [this message]
2017-10-12  2:21     ` Segher Boessenkool

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=59DEABAD.6030603@codesourcery.com \
    --to=sandra@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=law@redhat.com \
    --cc=segher@kernel.crashing.org \
    /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).