This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: timing of lexical analysis in -ftime-report
- From: Neil Booth <neil at daikokuya dot co dot uk>
- To: Zack Weinberg <zack at codesourcery dot com>
- Cc: blhewitt at attbi dot com, gcc at gcc dot gnu dot org
- Date: Mon, 17 Mar 2003 20:32:43 +0000
- Subject: Re: timing of lexical analysis in -ftime-report
- References: <8765qhlq5e.fsf@egil.codesourcery.com>
Zack Weinberg wrote:-
> The primary function is indeed to give a starting point for
> performance comparisons of different sections of gcc. But we do
> intend the names of the different passes to reflect what they are
> called in compiler theory, because that makes it easier to understand.
>
> For C and its descendants, it happens that the preprocessor has to do
> almost all the work of lexical analysis, and there's no point in doing
> it twice. Thus, the majority of time performing lexical analysis
> happens under TV_CPP. If you were to look at, say, Fortran source
> code you would find that lexical analysis is attributed to TV_LEX,
> since that language does not use the C preprocessor.
For CPP it's historical baggage; we might try and eliminate TV_LEX
for C family.
Neil.