public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Mike Stump <mikestump@comcast.net>
To: Steven Bosscher <stevenb.gcc@gmail.com>
Cc: Jakub Jelinek <jakub@redhat.com>, Jeff Law <law@redhat.com>,
	Laurynas Biveinis <laurynas.biveinis@gmail.com>,
	gcc-patches Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [gc-improv] Permanent vs function RTL obstack fix
Date: Tue, 12 Apr 2011 10:44:00 -0000	[thread overview]
Message-ID: <FAB556CA-EF98-4D55-AB2E-564217F8C8BC@comcast.net> (raw)
In-Reply-To: <BANLkTinrxQ61-8dDhUV-FE40U9VD3npR1g@mail.gmail.com>

On Apr 12, 2011, at 1:45 AM, Steven Bosscher wrote:
> On Tue, Apr 12, 2011 at 9:01 AM, Jakub Jelinek <jakub@redhat.com> wrote:
>> On Tue, Apr 12, 2011 at 08:33:56AM +0200, Steven Bosscher wrote:
>>> I think all these comments from you "old guys" ;-) are more
>>> discouraging than fair. What Laurynas and Bernd have done, is nothing
>> 
>> It is IMHO completely fair to point that the risks this brings in
>> a huge maintainance nightmare are very high.
> 
> And IM-equally-HO it is completely unfair to talk about risks in any
> situation where there is nothing yet to talk about! Give it a chance
> and wait for something that's more than just an idea, and then assess
> the risks based on an implementation.

The problem is that in the olden days, people thought it would work, then, they ran into, oh, but the lifetime is wrong.  Oh, but I don't know what the lifetime will be before I start allocating.  Oh, what do you mean I can't copy it...  All these things happened after real bug reports and great difficulty in tracking down real problems.  A review might not be able to spot the things that won't work.  We don't want to discourage, only to let everyone know what our experience is with these sorts of problems.  So, for example, if one is predicating copying objects to solve lifetime problems, we can expound what some of the problems were in the past.  They could be relevant, they might not be not relevant; also, they just might cause people to explore an area that might be a problem, find and address it sooner.

Also, actual patches have been posted since Jan 27th...  I don't see that all the problems are cleverly avoided.  So, let's take one:

>   - If objects stored in PCH have pointers pointing outside of PCH-able/GC-managed memory, these become wild pointers on PCH read even with GTY((skip)) applied properly. However, not all GTY((skip)) pointers point outside of PCH-able memory, so I have overloaded GTY((deletable)) option to reset such fields to NULL on PCH write. This is only a part of the fix as logic needs to be reviewed what to do with these NULLs after the PCH read. In case of DECL_RTL, the NULL in the field causes re-creation of rtx anew, which I think is the right thing.

Not an example of a warm fuzzy.  When you combine this with the entire idea of PCH, and that is to slosh to disk and back, the entire state of the compiler, essentially, unmodified, we run into a conceptual gap.  Now, why did PCH have that design, so that we could limit the number of pch bugs and come up with a robust design that just works.  This is a useful property.

Now, one can audit DECL_RTL, to see if it matters, but there are roughly 344 places to check.  I glanced at a few, to see if I can spot problems.  I find it hard to know if any particular one will be a problem.  At least some of them can't be found by testing.  Presently we do what I'd call smoke testing for pch.  Deeper issues aren't covered.  So, who then will spot the issues?

  reply	other threads:[~2011-04-12 10:44 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-07  6:17 Laurynas Biveinis
2011-04-07 21:33 ` Steven Bosscher
2011-04-08 13:22   ` Laurynas Biveinis
2011-04-08 14:36     ` Jeff Law
2011-04-08 14:39       ` Richard Guenther
2011-04-08 14:42         ` Jeff Law
2011-04-09 10:34       ` Steven Bosscher
2011-04-10 18:27         ` Laurynas Biveinis
2011-04-10 18:49           ` Basile Starynkevitch
2011-04-11 20:03           ` Jeff Law
2011-04-12  0:22             ` Mike Stump
2011-04-12  2:54               ` Jeff Law
2011-04-12  6:34                 ` Steven Bosscher
2011-04-12  7:01                   ` Jakub Jelinek
2011-04-12  8:45                     ` Steven Bosscher
2011-04-12 10:44                       ` Mike Stump [this message]
2011-04-12 10:49                         ` Steven Bosscher
2011-04-12 15:02                       ` Jeff Law
2011-04-12 11:56             ` Bernd Schmidt
2011-04-12 15:31               ` Jeff Law
2011-04-10 18:23       ` Laurynas Biveinis
2011-04-10 22:33         ` Steven Bosscher
2011-04-11 20:08         ` Jeff Law
2011-04-12 11:43           ` Laurynas Biveinis
2011-04-12 11:46             ` Laurynas Biveinis
2011-04-12 17:25               ` Mike Stump

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=FAB556CA-EF98-4D55-AB2E-564217F8C8BC@comcast.net \
    --to=mikestump@comcast.net \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=laurynas.biveinis@gmail.com \
    --cc=law@redhat.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).