[cxx-conversion] New Hash Table (issue6244048)

Lawrence Crowl crowl@google.com
Tue May 29 23:46:00 GMT 2012


On 5/28/12, Eric Botcazou <ebotcazou@adacore.com> wrote:
> > My main concern is that the precise collector we have in place
> > now requires substantial care to use.  It is supported by a tool
> > that does not really understand C, let alone C++.  We avoid the
> > problems when annotations are unnecessary.  We can do that in one
> > of two ways, either by upgrading GTY to understand more of the
> > language so that it infers the right things from regular code,
> > or by changing the implementation strategy so that the garbage
> > collector does not need type information.  I prefer the latter
> > approach, as it makes our experience closer to our customers'
> > experience.
>
> Are you really saying that, because "our customers" might have
> different ways of doing garbage collection in their code, we should
> drop our implementation that might well be superior to theirs?
> That would be a weak argument IMO, all the more so that, in the
> end, this might degrade the GCC experience for them.

No, I am suggesting that the current GTY approach requires more
manual care than is desireable.  There are several ways to fix that.

One way is to improve GTY so that less manual effort is needed.
However, any work we spend on GTY would not affect our customers
except, perhaps, in the data size of the compiler.

Another way is to use C++ containers that manage the storage for us,
and to back that up with a conservative collector.  If we do so, then
we are operating in the same environment as our customers.  We can
fix performance issues in the compiler by generating better code.
That better code helps our customers with their code.  The intent
in living as our customers do is to improve the overall experience
of our customers.

Having said that, let me be clear.  There is no proposal as yet to
change anything about garbage collection in gcc other than upgrade
it as we need.  (See Diego's vec patch.)  We are just having a
friendly philosophical discussion.  :-)

-- 
Lawrence Crowl



More information about the Gcc-patches mailing list