public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
To: Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
	Kyrylo Tkachov	<Kyrylo.Tkachov@arm.com>,
	Richard Earnshaw <Richard.Earnshaw@arm.com>, nd	<nd@arm.com>
Subject: Re: [PATCH][ARM] Enable code hoisting with -Os (PR80155)
Date: Mon, 16 Sep 2019 12:58:00 -0000	[thread overview]
Message-ID: <VI1PR0801MB2127A0D7D6B63726464014F8838C0@VI1PR0801MB2127.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <CAAgBjM=8rkGO=c2+y0kgNVCKP0fsqcuPKzKDuNW2zyc594yoyw@mail.gmail.com>

Hi Prathamesh,

> My only concern with the patch is that the issue isn't specific to
> code-hoisting.
> For this particular case (reproducible with pr77445-2.c), disabling
> jump threading
> doesn't cause the register spill with hoisting enabled.
> Likewise disabling forwprop3 and forwprop4 prevents the spill.
> The last time I tried, setting setting
> max-jump-thread-duplication-stmts to 20 and
> fsm-scale-path-stmts to 3, not only removed the spill but also
> resulted in 9 more hoistings,
> but regressed some other test on jump threading.
> So I was wondering whether we should look into fine-tuning relevant params,
> instead of disabling code hoisting entirely (we will end up regressing
> some test cases either way) ?

The point is that -fcode-hoisting is the optimization that made some benchmarks
run significantly slower compared to older GCC versions. It's been more than 2.5
years without progress, so let's just fix it now in the obvious way.

Yes, there are likely better solutions. And if someone writes an acceptable patch
then we can easily enable hoisting again. Surely it is far better to have a fixed
compiler *now* rather than wait a few more years for a solution that has the
same effect but which might not be trivially backportable?

Cheers,
Wilco

  reply	other threads:[~2019-09-16 12:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-11 15:50 Wilco Dijkstra
2019-09-12  9:54 ` Richard Biener
2019-09-12 11:29   ` Wilco Dijkstra
2019-09-12 11:55     ` Richard Biener
2019-09-14 21:49 ` Prathamesh Kulkarni
2019-09-16 12:58   ` Wilco Dijkstra [this message]
2019-09-16 13:31     ` Richard Biener
2019-09-17 17:18       ` Wilco Dijkstra
2019-09-18  8:47         ` Richard Biener
2019-09-18 16:47           ` Prathamesh Kulkarni
2019-09-19  1:28             ` Prathamesh Kulkarni
2019-09-19 10:47               ` Richard Biener
2019-09-19 10:37             ` Richard Biener
2019-10-10 10:40 ` Joey Ye

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=VI1PR0801MB2127A0D7D6B63726464014F8838C0@VI1PR0801MB2127.eurprd08.prod.outlook.com \
    --to=wilco.dijkstra@arm.com \
    --cc=Kyrylo.Tkachov@arm.com \
    --cc=Richard.Earnshaw@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=nd@arm.com \
    --cc=prathamesh.kulkarni@linaro.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).