On Wed, Mar 21, 2012 at 10:36 AM, Peter Dolding <oia...@gmail.com> wrote:
> On Wed, Mar 21, 2012 at 3:47 AM, Basile Starynkevitch
> <bas...@starynkevitch.net> wrote:
>> On Tue, 20 Mar 2012 18:39:40 +1000
>> Peter Dolding <oia...@gmail.com> wrote:
>>>
>>> The top level modules already exist and are named.
>>
>>
>> Not really. I see nowhere on the GCC site a picture as clear as
>> the "plateform overview" figure on http://developer.gnome.org/
>> And I am not able to list and name corresponding modules.
>> If you do, please send a link or make an exhaustive list.
>>
>> The internal executables like cc1 are too high.
>>
>> For example, my feeling is that GCC (actually cc1) is made of three layers
>>
>> front-ends  |  middle-end    |  back-ends
>
> Back-ends are shared between all languages gcc supports but can be
> target particular..  So they are already a kind of module in there own
> right.
>
> Middle-end is language neutral.  Yes these are basically already a
> module just not broken down enough.
>
> front-ends part in cc1 is the only part that is fully unique to cc1.
> The middle-end and back-ends you will find used with other languages
> as is.
>
> This here is a very good read.
> http://www.cse.iitb.ac.in/grc/intdocs/gcc-conceptual-structure.html
>
> For the official harder to read form
> http://gcc.gnu.org/onlinedocs/gccint.pdf   basically this really needs
> some graphics added.  And a little sorting.  But the same information
> is in there as the gcc conceptual structure write up.
>
> Even better gccint.pdf goes into what c files should be in each module.
>
> This is why you hitting the wall that gcc is already kinda module
> design.  Everything is sorted to go into modules is just starting
> cutting.
>
> Note I said exist and named.  I did not say they were into a simple to
> read graphic on the gcc site.

Indeed.  There is also different module hierarchies that overlap.  For
example ILs used in the different parts of the compiler.

I think Basile is mostly confused about what files belong to what module,
a question with not a single answer per file.  It's been suggested before,
but moving files into subdirectories might help here, at least for those
which have a clearly defined module.  The C frontend is one obvious
example, generator programs for machine descriptions another,
RTL optimization passes are harder, GIMPLE/SSA optimization
passes are somewhat hard, ... there is not always a good directory
to put things in.  For example I absolutely hate the suggested gimple/

Richard.

> Peter Dolding

Reply via email to