On December 16, 2018 1:19:13 PM GMT+01:00, Jan Hubicka <hubi...@ucw.cz> wrote: >> On December 15, 2018 10:17:43 PM GMT+01:00, Jan Hubicka ><hubi...@ucw.cz> wrote: >> >Hi, >> >this patch is motivated by finding that Firefox ipa summaries >stream-in >> >is fully dominated by streaming edge summaries that are not >necessary >> >because they lead to external calls or are from comdat functions >that >> >are unused. >> > >> >Reading them, populating hashes and later removing them at once >> >streaming is finished increases memory use by about 1GB. This patch >> >simply adds logic to notice such unnecesary summaries early and not >> >put them to memory. This includes ADDR_EXPR that seems to be most >> >common >> >constant values and are easy to rebuild. >> >> Don't you want to go the full way decomposing it to sym + offset? > >Hmm, it may make sense - in stats ADDR_EXPR was most common compared to >refs, but we have easy way to get sym+offset via >get_ref_base_and_offset >and rebuild the tree, right?
For addresses should be get_addr_base_and_unit_offset and yes, we can rebuild the thing with & MEM [&sym + offset] > >Honza