This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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]

Whole-file compilation in gfortran


Hi gfortranners, hi Michael,

A short mail about the topic of whole-file compilation. This is not an urgent mail, I simply thought about it a bit more, and I wanted to share my impressions, check that I'm not too confused about the goals and means here, and then share links to two patches ([1] and [2] below) by Steven Bosscher and Michael Matz aiming at this (I didn't know about these patches, or forgot, so maybe the notice will be good for others as well).

As far as I understood, there are 3 different issues to be tackled that this would help us :
(a) perform better inter-file checking of interfaces,
(b) inline non-contained procedures, and
(c) module loading performance


I will not talk about (a) here, as it's probably the most tricky. As far as I see, (c) requires us to store modules into memory in addition to writing them to disk, so that we can load symbols from them without actually reading/parsing the file back. There might be more to it, Paul could tell.

Now, I'm kind of puzzled about (b). Following the approach of Michael Matz at [2], means that every time we would create a function decl, we start by looking whether there already is one with this name in the toplevel namespace, and if there is, we use this instead of creating a new. Michael apparently never follow this patch up, but I can't think of any fundamental objection to it, of anything that would make it completely flawed. (The one thing I can think of is that, without further type-checking of function decls, we might end up create ICEs on invalid code that the front-end doesn't catch yet, like mismatching arguments; but we can add type-checking, can't we?

So, I hope my point of view here is not to naïve, but I'd like to hear your opinions on all this.

FX


[1] http://gcc.gnu.org/ml/gcc/2005-07/msg00863.html [2] http://gcc.gnu.org/ml/gcc/2005-07/msg00940.html


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