This is the mail archive of the 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: [C++ patch] Cleanup way functions are deferred

> On Saturday, June 21, 2003, at 12:16 PM, Jan Hubicka wrote:
> >the DECL_EXTERNAL/DECL_PUBLIC/DECL_COMDAT flags are set back and forth 
> >by C++
> >frontend during finish_file apparently just to avoid confusion of 
> >This confuses my unit-at-a-time code as it sees wrong attributes of the
> >declarations once finish_file is done.
> Do you introduce a speed regression?  More passes on lists, or scanning 
> longer lists are the two main culprits I am thinking about.  Ideally, 
> we want zero scans on long lists (all decls for example), and hitting 
> each one we emit, once.

I do half of traversals of the varray compared to original code and I
simplified condition to rule out non-interesting ones, so it should not
be faster :)
The whole thing should be probably worklist based (ie mark_used should
enqueue functions we want to un-defer).  I am doing so inside unit-at-a-time
and then this loop iterates much fewer times than it used to, so perhaps
it is not needed.

> Offhand, the patch looks safe or a speed improvement.
> The case I'm thinking about is PCH compilation, 20 files, large C++ pch 
> header, small bodied C++ files.

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