public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Plugins & GGC ie GTY
@ 2009-04-01 22:49 Joern Rennecke
  2009-04-01 23:40 ` Steven Bosscher
  2009-04-02  5:34 ` Basile STARYNKEVITCH
  0 siblings, 2 replies; 9+ messages in thread
From: Joern Rennecke @ 2009-04-01 22:49 UTC (permalink / raw)
  To: Basile STARYNKEVITCH
  Cc: Richard Guenther, Taras Glek, Joseph S. Myers, GCC Mailing List,
	Diego Novillo, Le-Chun Wu, Grigori Fursin

> And if garbage collection is avoidable in GCC, given the strong opposition it has, all the GTY & gengtype stuff would have been removed by now. The mere fact it is staying here is in my opinion very significant. If GC was not relevant in GCC, GGC & GTY would have gone long time ago. They didn't!

I believe it is avoidable, but:
- There is no consensus that it should be avoided, and there are more
  important issues to discuss.
- Even if there was a consensus to avoid it, nobody is willing to but in
  the time to change gcc and keep it leak-free (or merely keep memory leaks
  at a level comparable to GGC memory overhead).

> To be more specific and concrete, many passes use GTY-ed data. It seems that the common scenario is to have some data built in one pass and reused in some other passes. Then there is no easy way to find out who would delete the data,
> 
> Now, I don't see why a plugin won't fall in that "pattern". Definitely, some guy would want to code a plugin which provides eg two or three (not only one) passes in GCC, all related in the sense that they would operate on some common data. Here a garbage collector makes sense, and having some GTY-ed data (or a vector) inside a plugin is definitely relevant.

As long as you only need to GTY known types, you can avoid having extra GTY
roots by having all plugins share one GTY root in the plugin infrastructure;
this root can point to a list to which each plugin can add at will.

If you want new types, it gets ugly, because how can you independently
develop plugins and avoid collisions?  An enum to describe a type
won't be enough anymore, unless you want to go te a really silly width and
statart doling out namespaces.

You could approach it a bit more object-oriented and have a pointer in
each object that points to a descriptor for the type.
If you define such a type in the plugin infrastructure, it again becomes
a special kind of pre-defined type.
I suppose the main work will be to get the GTY parser to create the
type descriptors for custom types in modules. 
This e-mail was sent from a group e-mail system of ARC International Plc. Full details of the registered names and addresses of companies within the ARC group can be found on the ARC website.ARC International plc, Registered Office: Verulam Point, Station WaySt. Albans AL1 5HE United Kingdom Registered in England and Wales No.  3592130savm-exch03 
 
 
 
 
 
 
 

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-05-05  6:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <49D25E40.6080507@mozilla.com>
     [not found] ` <84fc9c000904010146j53e49ed9i6c271751d41dfd42@mail.gmail.com>
     [not found]   ` <Pine.LNX.4.64.0904011257550.14922@digraph.polyomino.org.uk>
     [not found]     ` <49D398C9.1010809@mozilla.com>
2009-04-01 17:22       ` Plugins & GGC ie GTY Basile STARYNKEVITCH
2009-04-01 18:26         ` Richard Guenther
2009-04-01 18:37           ` Basile STARYNKEVITCH
2009-04-01 20:48             ` Basile STARYNKEVITCH
2009-04-01 22:49 Joern Rennecke
2009-04-01 23:40 ` Steven Bosscher
2009-04-02  5:34 ` Basile STARYNKEVITCH
2009-05-05  2:53   ` Justin Seyster
2009-05-05  6:09     ` Basile STARYNKEVITCH

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).