public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Dmitry Mikushin <dmitry@kernelgen.org>
Cc: David Edelsohn <dje.gcc@gmail.com>, Jeffrey Law <law@redhat.com>,
	       Qing Zhao <QING.ZHAO@oracle.com>, GCC <gcc@gcc.gnu.org>
Subject: Re: Does gcc automatically lower optimization level for very large routines?
Date: Fri, 20 Dec 2019 22:52:00 -0000	[thread overview]
Message-ID: <20191220225203.GI3152@gate.crashing.org> (raw)
In-Reply-To: <CAJoDaPYu8Wwb4PPSMQf4NMT9yog_tLzi2-cnmYHhxFCfs+x5pw@mail.gmail.com>

On Fri, Dec 20, 2019 at 02:57:57AM +0100, Dmitry Mikushin wrote:
> Trying to plan memory consumption ahead-of-work contradicts with the nature
> of the graph traversal. Estimation may work very well for something simple
> like linear or log-linear behavior.

Almost everything we do is (almost) linear.

> But many compiler algorithms are known
> to be polynomial or exponential

Many?  There are a few (register allocation is a well-known example),
but anything more than almost linear is quite easy to make blow up.  It
is also not super hard in most cases to make things linear, it just
needs careful attention.

> (or even worse in case of bugs).

Well, sure, if there is a bug *anything* can go wrong ;-)


Segher

  reply	other threads:[~2019-12-20 22:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-19 16:37 Qing Zhao
2019-12-19 22:51 ` Dmitry Mikushin
2019-12-19 23:07   ` Qing Zhao
2019-12-20  0:41     ` Jeff Law
2019-12-20  1:32       ` David Edelsohn
2019-12-20  1:58         ` Dmitry Mikushin
2019-12-20 22:52           ` Segher Boessenkool [this message]
2019-12-20 23:00             ` Dmitry Mikushin
2019-12-20 11:13       ` Richard Biener
2019-12-20 16:05         ` Qing Zhao
2019-12-20 16:22           ` Jonathan Wakely
2020-01-01  5:25 ` Andi Kleen
2020-01-01 15:20   ` Segher Boessenkool

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=20191220225203.GI3152@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=QING.ZHAO@oracle.com \
    --cc=dje.gcc@gmail.com \
    --cc=dmitry@kernelgen.org \
    --cc=gcc@gcc.gnu.org \
    --cc=law@redhat.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).