From: Max Filippov <jcmvbkbc@gmail.com>
To: "Takayuki 'January June' Suwa" <jjsuwa_sys3175@yahoo.co.jp>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH 3/4] xtensa: Improve instruction cost estimation and suggestion
Date: Sat, 11 Jun 2022 16:13:38 -0700 [thread overview]
Message-ID: <CAMo8BfJWPthG9noLvXkEeeanzej7hapLkKs8G6SOrLomrnuyTQ@mail.gmail.com> (raw)
In-Reply-To: <90af87ac-56ce-a620-ce14-ecbb524b4e57@yahoo.co.jp>
On Thu, Jun 9, 2022 at 9:26 PM Takayuki 'January June' Suwa
<jjsuwa_sys3175@yahoo.co.jp> wrote:
>
> This patch implements a new target-specific relative RTL insn cost function
> because of suboptimal cost estimation by default, and fixes several "length"
> insn attributes (related to the cost estimation).
>
> And also introduces a new machine-dependent option "-mextra-l32r-costs="
> that tells implementation-specific InstRAM/ROM access penalty for L32R
> instruction to the compiler (in clock-cycle units, 0 by default).
>
> gcc/ChangeLog:
>
> * config/xtensa/xtensa.cc (xtensa_rtx_costs): Correct wrong case
> for ABS and NEG, add missing case for BSWAP and CLRSB, and
> double the costs for integer divisions using libfuncs if
> optimizing for speed, in order to take advantage of fast constant
> division by multiplication.
> (TARGET_INSN_COST): New macro definition.
> (xtensa_is_insn_L32R_p, xtensa_insn_cost): New functions for
> calculating relative costs of a RTL insns, for both of speed and
> size.
> * config/xtensa/xtensa.md (return, nop, trap): Correct values of
> the attribute "length" that depends on TARGET_DENSITY.
> (define_asm_attributes, blockage, frame_blockage): Add missing
> attributes.
> * config/xtensa/xtensa.opt (-mextra-l32r-costs=): New machine-
> dependent option, however, preparatory work for now.
> ---
> gcc/config/xtensa/xtensa.cc | 116 ++++++++++++++++++++++++++++++++---
> gcc/config/xtensa/xtensa.md | 29 ++++++---
> gcc/config/xtensa/xtensa.opt | 4 ++
> 3 files changed, 134 insertions(+), 15 deletions(-)
Regtested for target=xtensa-linux-uclibc, no new regressions.
Committed to master.
--
Thanks.
-- Max
prev parent reply other threads:[~2022-06-11 23:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-10 4:19 Takayuki 'January June' Suwa
2022-06-11 23:13 ` Max Filippov [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=CAMo8BfJWPthG9noLvXkEeeanzej7hapLkKs8G6SOrLomrnuyTQ@mail.gmail.com \
--to=jcmvbkbc@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jjsuwa_sys3175@yahoo.co.jp \
/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).