This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC - Alternatives to gengtype


On Sun, Nov 18, 2012 at 11:25:55AM -0500, Diego Novillo wrote:
> I agree with the analysis of Uday and Basile.  [...]
> 
> However, let's discuss this topic in some other thread, please.  I'd
> like to take this thread back to the original topic: what do we do
> with GC and PCH?

I really think that GCC need some form of garbage collector. 
If it is Ggc+gengtype (to be improved), or Boehm GC, or even 
some other GC (for instance both 
http://starynkevitch.net/Basile/qishintro.html and 
http://gcc.gnu.org/viewcvs/branches/melt-branch/gcc/melt-runtime.c 
are or contain precise copying collectors that I wrote, and with 
some effort that could be made nicely compatible with C++).
But my feeling is that a lot of people don't want GCC to 
have any kind of garbage collector and dream of having only manual 
allocation & de-allocation (I Basile personally think that it is not realistic 
and not desirable, because it will make future contributions to GCC much more 
costly to develop, and I probably would myself lose interest in GCC 
when garbage collection will be removed). 


Regarding PCH [pre-compiled header], I think that it is related to PPH
[pre-processed headers]
 
I don't understand yet if PPH is abandoned, or just post-poned. I was 
believing it was a very mature experimental branch.

A very related question, now that we have switched to C++, is: do we accept 
the idea of having a common ancestor class (e.g. a GccObject root class 
for GCC, like GObject is for GTK and QObject is for Qt) with virtual methods 
(i.e. do we accept a vtable) for essential GCC datatypes like edge, gimple, 
basic_block and tree-s. My understanding is that many people firmly reject 
such an idea (probably because it might perhaps make gimple one word fatter). 
But I would easily imagine that having a single top GccObject root class, 
with several virtual abstract methods inside, could considerably help 
in implementing new garbage collection scheme and a lot of utility 
functionality (e.g. for dump perhaps LTO & perhaps PCH 
we would just have some virtual methods in GccObject for them).

I also don't understand if PCH is really important; I feel that very few people 
are using it (in particular, because it practically requires a single header 
file for all of the application). In other words, could we give up PCH 
(probably not, but I don't understand why), e.g.  give up PCH for GCC 5.0 
(and aim to have PPH for GCC 5.1)?

My feeling is that the question of having a garbage collector inside GCC 
is not the same as the question of keeping gengtype+ggc in its present form
(or in an improved form).

At last, I don't understand if experimenting with e.g. a single GccObject 
root class is easily feasible (is it a matter of just adding some inheritance 
in a few *.h files, or is it much worse than that). 

Now, I do admit that I don't have a clear overall picture about GCC, 
and that all global reviewers have a much better whole picture of GCC than I do.


BTW, perhaps what might be missing is a good analysis & detailed metrics 
of the existing GCC source base.  Perhaps some plugin or extension of GCC 
could help to make it.
(I Basile would be very happy to work on a MELT extension to access and 
measure and navigate inside the entire GCC compiler, but this is a quite 
big project, and I don't know how could I be funded to work on this).

Regards.

-- 
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]