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: WPA stream_out form & memory consumption


> On Mon, Apr 7, 2014 at 8:20 PM, Jan Hubicka <hubicka@ucw.cz> wrote:
> >> AFAIK we settled on a simpler one dropping columns at stream-out time
> >> that also helped.
> >>
> >> As for the correct way to do the optimization we agreed(?) that streaming
> >> the locations elsewhere and using references to them is more appropriate.
> >> At stream-in (or before stream-out) we can then read the location pairs
> >> and sort them before assigning linemap entries.
> >
> > Yep, however what makes difference is the sharing in between compilation units
> > (so sameheaders gets assigned same locations) rather than sharing within the unit
> > (by my experiments).  The separate streaming+sorting will only help sharing
> > within the unit.
> >
> > Perhaps something rather simplelike keeping previous stream and merging them will
> > work, too, not sure if better than the simple cache hash though.
> > Or perhaps we can somehow track per-source-file location spaces. Don't know.
> 
> But then linemap itself should provide the ability to lookup existing
> entries rather than you adding another table ontop of it ...

I think the linemap representation does well for frontend use, that produces
locations more or less in sequential manner.  It is just LTO that is special.
> 
> Note that you mess up the include stack when you re-use linemap entries
> across files (we at least care to setup the source TU information so you
> get 'included from foo.c' correctly - if you re-use linemaps you get that
> screwed up and ultimately end up with bogus inline stacks for example).

Hmm, never looked into how we track those to be honest. Indeed something that
would need to be matched when chaching, too. 

If I get time, I will probably try to impelemnt the separate section
for locators and we can see where we want to go from there.

Honza
> 
> Richard.
> 
> > Honza


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