public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: Mike Stump <mikestump@comcast.net>
Cc: Laurynas Biveinis <laurynas.biveinis@gmail.com>,
	       Steven Bosscher <stevenb.gcc@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 02:54:00 -0000	[thread overview]
Message-ID: <4DA3BEEA.10608@redhat.com> (raw)
In-Reply-To: <6E9E9711-46D0-4B15-BB5D-15253EE00753@comcast.net>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/11/11 18:21, Mike Stump wrote:
> On Apr 11, 2011, at 1:03 PM, Jeff Law wrote:
>> The obvious solution is you copy the object, but then you have to be
>> able to distinguish within the object, what fields point to other
>> temporary objects vs permanent objects so that you can copy the
>> referenced temporary objects, but not the permanent objects (other parts
>> of the compiler may expect those permanent objects to be unique/shared).
>>   Not fun, not at all fun.  Been there, done that.
> 
> And then someone tells you that you can't copy...  Usually a nasty bug report much later.  So the choice is then, not solve a problem, or make everything permanent or add GC (back).  :-)  Been there, done that too.
Right.  Hence the old hack to mark the temporary obstacks and make them
permanent (wasting an enormous amount of space in the process).  I don't
recall the name of that function, but it certainly made me barf.

And yes, I remember all too well the problems with deep copying having
written one of the earliest tree deep copy routines to support
- -fcombine-statics .  It was the source of more problems than I could
ever count -- all related to objects allocated to different obstacks
hanging off a single tree node or objects of two different types being
stored into the same field within tree nodes.  That was circa 1992/1993.


These were the kind of problems that ultimately led to the GC system we
have today.  There are clearly things that can be better handled with
different allocation models and I'll support moving to better models
where it makes sense.  Where it doesn't, obviously I won't support it.

jeff
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNo77qAAoJEBRtltQi2kC7X0UH/0n1ydyhcvfjjoqhQCIwjf9J
jp3MOel6I1RTjAMm69N0ZqCP5t8AuHIIJdlrSQ1Aworx0gNl4+VjbEXJEM6dcQB4
enJ5mYmPXQ3EMDEi6C/uPIGwPcPsqO9sFTe91plQIsI7m6OTRjM4I/aS9XmRQ/uQ
8qBhDTSY3sTn4rOTUvqKfvdStP9B/Sf2tYpYbHgm/tfLRQ5UFHWpZFckcyntHFs8
rTxcA3xKlVNSg2D9+3CfM8KVWqMVXeHgB+tlB2Q6L7/TAeCqGHABE5MxeB1+HDJN
QoB0HCMCt7t6sqGYk6S5xayyfJUrWvt5XBiVa8oXrP9sVh1iNM8mY33zzwPE2M4=
=9inU
-----END PGP SIGNATURE-----

  reply	other threads:[~2011-04-12  2:54 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 [this message]
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
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=4DA3BEEA.10608@redhat.com \
    --to=law@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=laurynas.biveinis@gmail.com \
    --cc=mikestump@comcast.net \
    --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).