public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Iain Sandoe <idsandoe@googlemail.com>
To: guojiufu <guojiufu@linux.ibm.com>
Cc: Segher Boessenkool <segher@kernel.crashing.org>,
	Gcc-patches
	<gcc-patches-bounces+guojiufu=linux.ibm.com@gcc.gnu.org>,
	Richard Biener <rguenther@suse.de>,
	GCC Patches <gcc-patches@gcc.gnu.org>,
	jlaw@tachyum.com, Bill Schmidt <wschmidt@linux.ibm.com>,
	David Edelsohn <dje.gcc@gmail.com>
Subject: Re: [PATCH V2] Use preferred mode for doloop iv [PR61837].
Date: Thu, 15 Jul 2021 08:39:13 +0100	[thread overview]
Message-ID: <6697920B-B5AB-41BF-9D82-D51578764BE8@googlemail.com> (raw)
In-Reply-To: <0edb4eebb7905bfd06e5dfc60711505d@imap.linux.ibm.com>



> On 15 Jul 2021, at 06:09, guojiufu via Gcc-patches <gcc-patches@gcc.gnu.org> wrote:
> 
> On 2021-07-15 02:04, Segher Boessenkool wrote:
> 

>>> +@deftypefn {Target Hook} machine_mode TARGET_PREFERRED_DOLOOP_MODE
>>> (machine_mode @var{mode})
>>> +This hook takes a @var{mode} which is the original mode of doloop IV.
>>> +And if the target prefers other mode for doloop IV, this hook returns
>>> the
>>> +preferred mode.
>>> +For example, on 64bit target, DImode may be preferred than SImode.
>>> +This hook could return the original mode itself if the target prefer to
>>> +keep the original mode.
>>> +The origianl mode and return mode should be MODE_INT.
>>> +@end deftypefn
>> (Typo, "original").  That has all the right contents, but needs someone
>> who is better at English than me to look at it / improve it.

well.. how about this small tweak?

This hook takes a @var{mode} for a doloop IV, where @code{mode} is the original mode for the operation.  If the target prefers an alternate @code{mode} for the operation, then this hook should return that mode.  For example, on a 64-bit target, @code{DImode} might be preferred over @code{SImode}.  The original @code{mode} should be returned if that is suitable.  Both the original and the returned modes should be @code{MODE_INT}.

0.02GBP only.
Iain


  reply	other threads:[~2021-07-15  7:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-13 12:50 Jiufu Guo
2021-07-13 20:50 ` Segher Boessenkool
2021-07-14  4:40   ` guojiufu
2021-07-14 10:26     ` guojiufu
2021-07-14 18:04       ` Segher Boessenkool
2021-07-15  5:09         ` guojiufu
2021-07-15  7:39           ` Iain Sandoe [this message]
2021-07-15  8:09             ` Jiufu Guo
2021-07-15  6:06 ` Richard Biener
2021-07-15  8:26   ` guojiufu

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=6697920B-B5AB-41BF-9D82-D51578764BE8@googlemail.com \
    --to=idsandoe@googlemail.com \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches-bounces+guojiufu=linux.ibm.com@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=guojiufu@linux.ibm.com \
    --cc=jlaw@tachyum.com \
    --cc=rguenther@suse.de \
    --cc=segher@kernel.crashing.org \
    --cc=wschmidt@linux.ibm.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).