public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: Richard Biener <richard.guenther@gmail.com>
Cc: Steven Bosscher <stevenb.gcc@gmail.com>,
	       GCC Patches <gcc-patches@gcc.gnu.org>,
	       Jakub Jelinek <jakub@redhat.com>
Subject: Re: [patch PR middle-end/39326 - compile time and memory explosion in combine
Date: Mon, 11 Mar 2013 18:05:00 -0000	[thread overview]
Message-ID: <513E1CE7.5020808@redhat.com> (raw)
In-Reply-To: <CAFiYyc1uHari+eG=DR8BLzsndBwk8gwRLau-cR2+zzO_Xra4qg@mail.gmail.com>

On 03/11/2013 03:23 AM, Richard Biener wrote:
> On Sat, Mar 9, 2013 at 11:23 PM, Steven Bosscher <stevenb.gcc@gmail.com> wrote:
>> Hello,
>>
>> The attached patch fixes one of the (at least) three scalability
>> problems reported in PR middle-end/39326. This problem is that combine
>> takes forever and increases the memory footprint from ~650MB to >7GB.
>> The cause is DSE creating a lot of new registers in replace_read, and
>> those registers are not copy-prop'd out between dse1 and combine. The
>> result is many overlapping live ranges and single-set-single-use
>> registers that combine is made to work on.
>>
>> The fix is to just not create so many new registers in DSE in the
>> first place. It is wasteful and unnecessary if an existing register
>> can be re-used.
>>
>> With this patch, for the test case of the PR the combine time in
>> combine goes down from ~350s to ~4.5s, and the memory footprint
>> explosion is avoided. For my set of cc1-i files this also helps reduce
>> compile time a modest amount, especially for the larger files of
>> course.
>>
>> Bootstrapped&tested on {x86_64,powerpc64}-unknown-linux-gnu.
>> OK for trunk?
>
> Not sure on the patch details - but in general I wonder why _DSE_
> performs full redundancy elimination at all ... which replace_read
> seems to be.
>
> Anyway, for this one I'd say we wait for stage1 and consider backporting
> for 4.8.1 given we want to do a 4.8 RC1 soon.
Agreed on the defer until 4.8.1.

jeff

  reply	other threads:[~2013-03-11 18:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-09 22:24 Steven Bosscher
2013-03-11  9:23 ` Richard Biener
2013-03-11 18:05   ` Jeff Law [this message]
2013-03-11 18:27   ` Steven Bosscher

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=513E1CE7.5020808@redhat.com \
    --to=law@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=richard.guenther@gmail.com \
    --cc=stevenb.gcc@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).