public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Maciej W. Rozycki" <macro@orcam.me.uk>
To: YunQiang Su <syq@debian.org>
Cc: Jeff Law <jeffreyalaw@gmail.com>,
	YunQiang Su <yunqiang.su@cipunited.com>,
	 gcc-patches@gcc.gnu.org, jiaxun.yang@flygoat.com,
	 richard.sandiford@arm.com
Subject: Re: [PATCH] MIPS: don't expand large block move
Date: Tue, 30 May 2023 12:44:14 +0100 (BST)	[thread overview]
Message-ID: <alpine.DEB.2.21.2305300208110.25569@angie.orcam.me.uk> (raw)
In-Reply-To: <CAKcpw6Wgx3R5A31fnEAH_0+dPK4_Yw6MwCxODPyUth5rVbcK_w@mail.gmail.com>

On Wed, 24 May 2023, YunQiang Su wrote:

> > or even:
> >
> >       if (INTVAL (length) <= MIPS_MAX_MOVE_BYTES_STRAIGHT)
> >         ...
> >       else if (INTVAL (length) < 64 && optimize)
> >         ...
> >
> 
> I don't think this is a good option, since somebody may add some code,
> and may break our logic.

 There's no need to plan ahead for changes, which may never happen.  As it 
stands reading through such flattened code here requires one step less to 
analyse as there's one nested level and one exit point less here.  If more 
cases have to be added in the future, then whoever needs them will make 
any necessary adjustments to the structure (assuming minimal understanding 
how code works, which I think is a reasonable requirement for working on a 
compiler).

  Maciej

      reply	other threads:[~2023-05-30 11:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-19  6:11 YunQiang Su
2023-05-19 16:56 ` Jeff Law
2023-05-19 19:21   ` Maciej W. Rozycki
2023-05-24  2:04     ` YunQiang Su
2023-05-30 11:44       ` Maciej W. Rozycki [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=alpine.DEB.2.21.2305300208110.25569@angie.orcam.me.uk \
    --to=macro@orcam.me.uk \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jeffreyalaw@gmail.com \
    --cc=jiaxun.yang@flygoat.com \
    --cc=richard.sandiford@arm.com \
    --cc=syq@debian.org \
    --cc=yunqiang.su@cipunited.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).