[RFC] Use wide chars to represent Fortran source internally
Tobias Burnus
burnus@net-b.de
Thu May 1 10:44:00 GMT 2008
FX wrote:
> This patch is a first step to handling non ASCII encoded source files
> and non-default character kinds in gfortran.
Thanks for the patch; I think supporting non-8bit characters is useful -
especially with the move to UTF-8 and the growing importance Asian
languages which are not representable in 8bits.
> As a consequence of this patch, memory usage to store the source file
> roughly quadruples. I've not seen a single case where it gives a
> significant memory increase on the total amount used during
> compilation higher than 7%, even at -O0: for the huge
> cp2k-in-one-file, which has 26MB, 430k-lines source files, compilation
> at -O0 requires 1.5 GB of memory, so the 75 MB additional memory isn't
> seen.
I think the increase is OK (as is the patch), however, I do not know
whether anyone thinks this increase it too big.
Regarding the 100 MB (25+75 MB), I really wonder whether we could not
release some memory while compiling. Do we really need to have that much
in memory? For instance, do we really access lines (e.g. for error
messages) in a module after END MODULE? Or the body of a subroutine
after END subroutine? Actually, when are they released? I think after
some early processing of the middle end (e.g. unused variables) the
whole source could be thrown away, which would reduce the totally needed
amount of memory.
Tobias,
who will do a proper review after Whit Sunday.
More information about the Fortran
mailing list