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]

timing of lexical analysis in -ftime-report


Hi, I hope that this is the appropriate forum for my question.  I'm very 
uncertain that this is a defect in gcc - I'm just looking for a better 
understanding of what gcc is doing.

I've been looking at gcc internals (specifically gcc 3.2.2) for a class I'm 
taking, and I've observed that the function _cpp_lex_direct in cpplex.c 
appears to be doing what would be considered lexical analysis in compiler 
theory.  However, since this function is called by cpp_get_token in c_lex.c 
(with a few functions in between), -ftime-report classifies any time spent in 
the _cpp_lex_direct function as "preprocessing" (TV_CPP).

My question then: Are the phases reported in -ftime-report intended to 
correspond at all closely to "traditional" notions of compiler phases?  If 
not, is the intention for -ftime-report to just give a starting point to 
compare the performance of different sections of gcc, and the phase ids are 
really just an id for a particular gcc section meant to be used for reference 
and not for theoretical application?

Brandon


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