This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Patch, fortran, RFC] PR 40958 Reduce size of module files
- From: Mikael Morin <mikael dot morin at sfr dot fr>
- To: fortran at gcc dot gnu dot org
- Cc: Janne Blomqvist <blomqvist dot janne at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 26 Nov 2011 00:15:23 +0100
- Subject: Re: [Patch, fortran, RFC] PR 40958 Reduce size of module files
- References: <CAO9iq9ETk22S6DuhCJD9Tgb0fHkb8MJmR9q+X3itpgNq6wWgrQ@mail.gmail.com>
On Friday 25 November 2011 11:10:01 Janne Blomqvist wrote:
> Based on a brief inspection of the code, most if
> not all of these seeks are for a very short distance (typically peek a
> few bytes ahead in the stream, then seek back)
I'm afraid they aren't.
The moves are as follows (-: sequential, x: seek)
--> beginning of file
- skip operator interfaces
- skip user operators
- skip commons, equivalences, and derived type extensions
- register the offset of each symbol node and skip it
- (this is usually
- the biggest part of the module)
- read the symtree list and mark needed the associated symbols (if they are
wanted)
--> end of file
x go back to operator interfaces and load them
- load user operators
- load commons
- load equivalences
xxxxxxx now the required symbols are known, so for each one of them seek to
its offset and load it. This requires a lot of seeks, and if the number of
symbols, components etc is high in the module, they are not necessarily "short
distance"
x load derived type extensions
We'll see the results from Salvatore, but I'm not very optimistic.
Mikael