public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: guojiufu <guojiufu@linux.ibm.com>
To: Jiufu Guo <guojiufu@linux.ibm.com>
Cc: David Edelsohn <dje.gcc@gmail.com>,
	gcc-patches@gcc.gnu.org, segher@kernel.crashing.org,
	linkw@gcc.gnu.org, bergner@linux.ibm.com
Subject: Re: [PATCH 4/4] rs6000: build constant via li/lis;rldic
Date: Thu, 15 Jun 2023 17:09:56 +0800	[thread overview]
Message-ID: <71d7c67cf4a888573fc4096d78b693e5@linux.ibm.com> (raw)
In-Reply-To: <7nsfavbu0g.fsf@ltcden2-lp1.aus.stglabs.ibm.com>

On 2023-06-13 17:18, Jiufu Guo via Gcc-patches wrote:
> Hi David,
> 
> Thanks for your valuable comments!
> 
> David Edelsohn <dje.gcc@gmail.com> writes:
>> 
...
>> Do you have any measurement of how expensive it is to test all of 
>> these additional methods to generate a constant?  How much does this 
>> affect the
>> compile time?
> 
> Yeap, Thanks for this very good question!
> This patch is mostly using bitwise operations and if-conditions,
> it would be expected not expensive.
> 
> Testcases were checked.  For example:
> A case with ~1000 constants: most of them hit this feature.
> With this feature, the compiling time is slightly faster.
> 
> 0m1.985s(without patch) vs. 0m1.874s(with patch)
> (note:D rs6000_emit_set_long_const does not occur in hot perf
> functions.  So, the tricky time saving would not directly cause
> by this feature.)
> 
> A case with ~1000 constants:(most are not hit by this feature)
> 0m2.493s(without patch) vs. 0m2.558s(with patch).

Typo, this should be:
0m2.493s(with patch) vs. 0m2.558s(without patch).

It is also faster with the patch :)

BR,
Jeff (Jiufu Guo)

> 
> For runtime, actually, with the patch, it seems there is no visible
> improvement in SPEC2017.  While I still feel this patch is
> doing the right thing: use fewer instructions to build the constant.
> 
> BR,
> Jeff (Jiufu Guo)
> 
>> 
>> Thanks, David
>> 


  reply	other threads:[~2023-06-15  9:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-08  1:55 [PATCH V2 0/4] rs6000: build constant via li/lis;rldicX Jiufu Guo
2023-06-08  1:55 ` [PATCH 1/4] rs6000: build constant via li;rotldi Jiufu Guo
2023-06-11  1:11   ` David Edelsohn
2023-06-13  3:30     ` Jiufu Guo
2023-06-13 13:47       ` David Edelsohn
2023-06-14  1:16         ` Jiufu Guo
2023-06-08  1:55 ` [PATCH 2/4] rs6000: build constant via lis;rotldi Jiufu Guo
2023-06-11  1:20   ` David Edelsohn
2023-06-08  1:55 ` [PATCH 3/4] rs6000: build constant via li/lis;rldicl/rldicr Jiufu Guo
2023-06-11  1:27   ` David Edelsohn
2023-06-13  3:32     ` Jiufu Guo
2023-06-08  1:55 ` [PATCH 4/4] rs6000: build constant via li/lis;rldic Jiufu Guo
2023-06-11  1:37   ` David Edelsohn
2023-06-13  9:18     ` Jiufu Guo
2023-06-15  9:09       ` guojiufu [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-02-03 10:22 [PATCH 0/4] rs6000: build constant via li/lis;rldicX Jiufu Guo
2023-02-03 10:22 ` [PATCH 4/4] rs6000: build constant via li/lis;rldic Jiufu Guo

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=71d7c67cf4a888573fc4096d78b693e5@linux.ibm.com \
    --to=guojiufu@linux.ibm.com \
    --cc=bergner@linux.ibm.com \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=linkw@gcc.gnu.org \
    --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).