This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Are egcs optimizations safe for conservative GC?
- To: Mike Stump <mrs at windriver dot com>
- Subject: Re: Are egcs optimizations safe for conservative GC?
- From: Kevin Atkinson <kevinatk at home dot com>
- Date: Wed, 05 Jan 2000 00:57:15 -0500
- CC: law at cygnus dot com, egcs at egcs dot cygnus dot com, riw at swipnet dot se
- References: <200001050415.UAA04423@kankakee.wrs.com>
Mike Stump wrote:
>
> > Date: Tue, 04 Jan 2000 22:49:33 -0500
> > From: Kevin Atkinson <kevinatk@home.com>
>
> > The last time this came up I got two very diffrent answers and no
> > one answered my question of how to prevent the loop optimizer from
> > doing this. Is gcc GC safe is there is always at least one variable
> > that is not a local pointing to the object in question? Is there
> > anything one can do with volatile to help prevent this? --
>
> Well, -fvolatile I think would prevent most variables from going away
> or being transformed. This would be a sledge hammer approach.
I will say so. Won't this KILL performace. With out being able to put
things in registers is there much the optimizer can do?
> I
> think the answer is, if you find any `bugs' (should be rare judging by
> the experience of the gc folks), please report them as bugs, and we
> can then introduce a -fgc switch to the compiler that says, please
> turn off all optimizations that gc systems would not like and then tie
> the particular optimization that caused the bug to this switch.
>
> I think that gc is a good long term technology that will become more
> and more important and popular as time goes on. I don't think we'd
> reject patches to improve the compiler in these systems.
>
> Now, if someone wanted to go gunning for such `bugs' before they are
> reported and fixed them that would be great (for the gc folks out
> there), but like all donations, this doesn't happen, unless someone
> _wants_ to make it happen. So far, no one has stepped forward to
> donate the work.
>
But does jeff fell that way? I bet you he can right now list about 50
bugs by pointing out ways gcc will spoke a garbage detector when
compiled with -O2.
I want to use a garbage collector for speed as oppose to convience.
That is I want to use a garbage collector to avoid having to do manual
reference counting which will kill performace as I assign one pointer
two the other quite often. Thus I am willing to cooperate with the
garabage collector so that it guaranteed to bahave. So I want to know
what I can do so that the garabage collector and gcc -O2 corporate with
out killing performance.
> Another way of asking your question is, are there any bugs in gcc?
> The answer is sure, but you might not hit any.
--
Kevin Atkinson
kevinatk@home.com
http://metalab.unc.edu/kevina/