public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "guojiufu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/95018] [10/11 Regression] Excessive unrolling for Fortran library array handling
Date: Wed, 13 May 2020 02:33:39 +0000 [thread overview]
Message-ID: <bug-95018-4-PB0JudYUNA@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-95018-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95018
--- Comment #25 from Jiu Fu Guo <guojiufu at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #23)
> (In reply to Richard Biener from comment #20)
> > (In reply to Jiu Fu Guo from comment #18)
> > > Currently, I'm thinking to enhance GCC 'cunroll' as:
> > > if the loop has multi-exits or upbound is not a fixed number, we may not do
> > > 'complete unroll' for the loop, except -funroll-all-loops is specified.
> >
> > That doens't make much sense (-funroll-all-loops is RTL unroller only).
> >
> > I think the growth limits are simply too large unless we compute a "win"
> > which we in this case do not. So I'd say the growth limits should scale
> > with win ^ (1/new param) thus if we estimate to eliminate 20% of the
> > loop stmts due to unrolling then the limit to apply is
> > limit * (0.2 ^ (1/X)) with X maybe defaulting to 2.
> >
> > I'd only apply this new limit for peeling (peeling is when the loop count
> > is not constant and thus we keep the exit tests).
> >
> > Of course people want more peeling (hello POWER people!)
>
> Btw, the issue with the rs6000 code at present is that it uses
> unroll_only_small_loops but that only affects the RTL unroller
> while the enablement of -funroll-loops at -O2 affects GIMPLE
> as well but unconstrained (with -O3 params). For the main
> unroll pass (not cunrolli) this triggers code size growth:
>
> unsigned int val = tree_unroll_loops_completely (flag_unroll_loops
> || flag_peel_loops
> || optimize >= 3, true);
>
> the "original" patch also adjusted parameters. If the intent is to only
> affect the RTL unroller then we need a separate flag controlling it
> (yeah, using the same flags as heuristic trigger was probably bad).
Yes, the patch controls RTL unroller for small loops, and also enabled cunroll
(through flag_unroll_loops). This cause cunroll may increase size as you
explained.
next prev parent reply other threads:[~2020-05-13 2:33 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-09 7:58 [Bug target/95018] New: " tkoenig at gcc dot gnu.org
2020-05-09 8:00 ` [Bug target/95018] " tkoenig at gcc dot gnu.org
2020-05-09 8:10 ` tkoenig at gcc dot gnu.org
2020-05-09 8:36 ` [Bug target/95018] [11 Regression] " tkoenig at gcc dot gnu.org
2020-05-09 9:01 ` tkoenig at gcc dot gnu.org
2020-05-09 9:03 ` tkoenig at gcc dot gnu.org
2020-05-09 9:42 ` [Bug target/95018] [10/11 " tkoenig at gcc dot gnu.org
2020-05-09 13:21 ` tkoenig at gcc dot gnu.org
2020-05-11 5:03 ` tkoenig at gcc dot gnu.org
2020-05-11 5:18 ` tkoenig at gcc dot gnu.org
2020-05-11 7:53 ` guojiufu at gcc dot gnu.org
2020-05-11 8:07 ` guojiufu at gcc dot gnu.org
2020-05-11 8:13 ` guojiufu at gcc dot gnu.org
2020-05-11 8:32 ` guojiufu at gcc dot gnu.org
2020-05-11 9:20 ` tkoenig at gcc dot gnu.org
2020-05-11 14:09 ` guojiufu at gcc dot gnu.org
2020-05-11 19:13 ` tkoenig at gcc dot gnu.org
2020-05-12 5:58 ` guojiufu at gcc dot gnu.org
2020-05-12 6:06 ` guojiufu at gcc dot gnu.org
2020-05-12 7:41 ` rguenth at gcc dot gnu.org
2020-05-12 7:50 ` rguenth at gcc dot gnu.org
2020-05-12 9:30 ` tkoenig at gcc dot gnu.org
2020-05-12 9:46 ` tkoenig at gcc dot gnu.org
2020-05-12 10:08 ` rguenth at gcc dot gnu.org
2020-05-12 10:27 ` rguenther at suse dot de
2020-05-13 2:33 ` guojiufu at gcc dot gnu.org [this message]
2020-05-13 2:59 ` guojiufu at gcc dot gnu.org
2020-05-13 3:37 ` guojiufu at gcc dot gnu.org
2020-05-13 6:07 ` rguenth at gcc dot gnu.org
2020-05-13 7:54 ` tkoenig at gcc dot gnu.org
2020-05-13 8:14 ` rguenth at gcc dot gnu.org
2020-05-13 9:54 ` guojiufu at gcc dot gnu.org
2020-05-13 10:14 ` rguenth at gcc dot gnu.org
2020-05-13 11:24 ` guojiufu at gcc dot gnu.org
2020-05-19 5:42 ` guojiufu at gcc dot gnu.org
2020-06-07 9:41 ` cvs-commit at gcc dot gnu.org
2020-06-08 2:54 ` guojiufu at gcc dot gnu.org
2020-06-08 5:12 ` tkoenig at gcc dot gnu.org
2020-06-09 2:50 ` guojiufu at gcc dot gnu.org
2020-06-19 14:39 ` cvs-commit at gcc dot gnu.org
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=bug-95018-4-PB0JudYUNA@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.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).