public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Hongyu Wang <wwwhhhyyy333@gmail.com>
To: Richard Biener <richard.guenther@gmail.com>
Cc: Segher Boessenkool <segher@kernel.crashing.org>,
	Hongyu Wang <hongyu.wang@intel.com>,
	 gcc-patches@gcc.gnu.org, dje.gcc@gmail.com
Subject: Re: [PATCH] rs6000: Adjust loop_unroll_adjust to match middle-end change [PR 107692]
Date: Wed, 23 Nov 2022 09:53:20 +0800	[thread overview]
Message-ID: <CA+OydWnvT_ZP1csjB5btbVK7cJMvYpQZQvCADrLp=ug07FXoyw@mail.gmail.com> (raw)
In-Reply-To: <CAFiYyc3Ui9ivMvV3i2tXwUtoT=v4b017hB6kh=7xfE4XJ_yCoQ@mail.gmail.com>

Hi, Segher and Richard

> > Something in your patch was wrong, please fix that (or revert the
> > patch).  You should not have to touch config/rs6000/ at all.
>
> Sure something is wrong, but I think there's the opportunity to
> simplify rs6000/ and s390x/, the only other two implementors of
> the hook used.

If I understand correctly, the wrong part is we should not break the
logic of -funroll-loops and check OPTION_SET_P in
targetm.loop_unroll_adjust to pretend the loop-unrolling is disabled
with -fno-unroll-loops.
I don't have a good idea to resolve this, perhaps add another hook and
check OPTION_SET_P (flag_unroll_loops) && munroll_only_small_loops
there and use that hook in rtl_loop_unroll::gate (), but still it
doesn't work if we want to strictly follow the logic that
-munroll-only-small-loops should not enable loop unrolling.
IMHO the middle-end part with target hook looks quite tricky (and of
course the OPTION_SET_P in the target hook). So Richard if you agree,
I'd like to install the reversion patch posted in
https://gcc.gnu.org/pipermail/gcc-patches/2022-November/606774.html
and move all them to the backend first.

-- 
Regards,

Hongyu, Wang

  reply	other threads:[~2022-11-23  1:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-16 23:54 Hongyu Wang
2022-11-18 14:46 ` Segher Boessenkool
2022-11-22  9:00   ` Richard Biener
2022-11-23  1:53     ` Hongyu Wang [this message]
2022-11-23 20:02       ` Richard Biener

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='CA+OydWnvT_ZP1csjB5btbVK7cJMvYpQZQvCADrLp=ug07FXoyw@mail.gmail.com' \
    --to=wwwhhhyyy333@gmail.com \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hongyu.wang@intel.com \
    --cc=richard.guenther@gmail.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).