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]

Re: SoC Project: Incremental Parsing (of C++)


Gabriel Dos Reis <gdr@cs.tamu.edu> writes:

> | Another approach I've considered is to skip parsing functions until
> | they are needed.  Since the parser dominates the -O0 compilation time,
> | and since large C++ projects have hundreds of inline functions which
> | are never needed by any particular compilation, I think there could be
> | a big -O0 benefit from only parsing functions as needed.
> 
> That defered parsing might work with C (I don't really know), but it
> certainly is problematic with C++ because there are bindings that
> need to be in overload sets, and you cannot accurately capture those if
> you don't parse the function bodies.  Sadly.

You do clearly need to parse the function declarations--the name and
the parameters--but do you really need to parse the function bodies
themselves?  If so, then my idea would certainly fail.

Ian


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