public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: Hongyu Wang <hongyu.wang@intel.com>, gcc-patches@gcc.gnu.org
Cc: richard.guenther@gmail.com, ubizjak@gmail.com, hongtao.liu@intel.com
Subject: Re: [PATCH] i386: Only enable small loop unrolling in backend [PR 107602]
Date: Mon, 21 Nov 2022 10:40:52 -0700	[thread overview]
Message-ID: <72ce55ba-2cda-6185-b89a-6d30ea95a383@gmail.com> (raw)
In-Reply-To: <20221119062532.75190-1-hongyu.wang@intel.com>


On 11/18/22 23:25, Hongyu Wang via Gcc-patches wrote:
> Hi,
>
> Followed by the discussion in pr107602, -munroll-only-small-loops
> Does not turns on/off -funroll-loops, and current check in
> pass_rtl_unroll_loops::gate would cause -funroll-loops do not take
> effect. Revert the change about targetm.loop_unroll_adjust and apply
> the backend option change to strictly follow the rule that
> -funroll-loops takes full control of loop unrolling, and
> munroll-only-small-loops just change its behavior to unroll small size
> loops.
>
> Bootstrapped and regtested on x86-64-pc-linux-gnu.
>
> Ok for trunk?
>
> gcc/ChangeLog:
>
> 	PR target/107602
> 	* common/config/i386/i386-common.cc (ix86_optimization_table):
> 	Enable loop unroll O2, disable -fweb and -frename-registers
> 	by default.
> 	* config/i386/i386-options.cc
> 	(ix86_override_options_after_change):
> 	Disable small loop unroll when funroll-loops enabled, reset
> 	cunroll_grow_size when it is not explicitly enabled.
> 	(ix86_option_override_internal): Call
> 	ix86_override_options_after_change instead of calling
> 	ix86_recompute_optlev_based_flags and ix86_default_align
> 	separately.
> 	* config/i386/i386.cc (ix86_loop_unroll_adjust): Adjust unroll
> 	factor if -munroll-only-small-loops enabled.
> 	* loop-init.cc (pass_rtl_unroll_loops::gate): Do not enable
> 	loop unrolling for -O2-speed.
> 	(pass_rtl_unroll_loops::execute): Rmove
> 	targetm.loop_unroll_adjust check.
The reversion of the loop-init.cc changes is fine.  The x86 maintainers 
will need to chime in on the rest.  Consider installing the loop-init.cc 
reversion immediately as the current state has regressed s390 and 
potentially other targets.


jeff


  parent reply	other threads:[~2022-11-21 17:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-19  6:25 Hongyu Wang
2022-11-21  1:01 ` Liu, Hongtao
2022-11-21  1:35   ` Hongtao Liu
2022-11-21  6:12     ` Hongyu Wang
2022-11-21 17:40 ` Jeff Law [this message]
2022-11-22  1:08   ` Hongtao Liu
2022-11-23  1:54   ` Hongyu Wang

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=72ce55ba-2cda-6185-b89a-6d30ea95a383@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hongtao.liu@intel.com \
    --cc=hongyu.wang@intel.com \
    --cc=richard.guenther@gmail.com \
    --cc=ubizjak@gmail.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).