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: GCC 5 & modularity


On Wed, Mar 21, 2012 at 10:57:08AM +0100, Richard Guenther wrote:
> 
> 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,


Sorry people, we don't have any established list of named modules. I see
nowhere a list of one or two dozens of modules with for each of them:

  * a name

  * short description in one or two sentences

  * the entire set of files or directories implementing that module

  * the API of that module (perhaps as a public header file, with the strong
    requirement that internal functions should be declared in a private header
    file)

Again, I take as a good example GTK/Gnome. It has a documented set of named
modules, there is a figure explaining their organization and a table listing
all of them, and each module has a documentation and a set of header files
defining its interface. It has also a naming convention: in C, all the
public identifiers of a module starts by the same prefix (e.g.
GtkSourceView); in C++ the interface is inside a single C++ namespace. At
last, it has a crystal clear file heararchy which, for a given file, makes
finding to which module it belongs very easy (often the parent or
grand-parent directory gives the name of the module).

So far, I was not even able to find a list of modules names of GCC. and for
each module, the set of source files implementing it (and the set of public
header files defining its interface at the very least).

And no reply even mentionned any module names. We badly need that some
people with a *global* understanding of GCC (these are few, I am not of
them) propose a list of module *names* to be discussed. 


For exmpla, I have absolutely no idea if the register allocator is one
module (or perhaps two, and probably none) or if it is just part of the
backend RTL passes


I'm quite surprised no one mentionned how it is difficult to explain GCC to
a newscomer (e.g. some student wanting to work on GCC within a GSOC). This
is partly the case because we cannot make a short list of modules. And to
ease the understanding effort, that list should be reasonably short. We
should have a list of 7-30 modules at most (I agree that some of these
modules could be further defined as made of several sub-modules). And each
of these modules should have a unique name. Each of these modules should
also have a small "title" sentende describint what it does (in a dozen
English words). At last, such a description should be part of the internal
documentation. http://gcc.gnu.org/onlinedocs/gccint/ should have a chapter
(probably after "3. http://gcc.gnu.org/onlinedocs/gccint/Interface.html";)
perhaps titled "organization of GCC in toplevel-modules" explaining all
this.

We are far from that. We first need to discuss a set of proposed module
names and titles. (Unfortunately, I am not able to propose it, because I
don't have a global knowledge of GCC; I expecte the few "global reviewers"
to have enough such knowledge.)

Once we have a proposal for modules names and titles we can discuss them,
and dive more deaper into a modular organization of GCC. (I really think we
cannot discuss of things which stay ill-defined and un-named).

Regards.

PS. Again, I don't have a large enough knowledge of GCC to even propose a
list of modules.

-- 
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]