https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65536
--- Comment #52 from Manuel López-Ibáñez <manu at gcc dot gnu.org> --- (In reply to Jan Hubicka from comment #50) > > > > +/* Do not track column numbers higher than this one. As a result, the > > + range of column_bits is [7, 18] (or 0 if column numbers are > > + disabled). */ > > +#define LINE_MAP_MAX_COLUMN_NUMBER (1U << 17) > > + > > +/* Do not track column numbers if locations get higher than this. */ > > +#define LINE_MAP_MAX_LOCATION_WITH_COLS 0x70000000 > > + > > +/* Highest possible source location encoded within an ordinary or > > + macro map. */ > > +#define LINE_MAP_MAX_SOURCE_LOCATION 0x7FFFFFF0 > > I understood the limit of 0x70000000 to give some buffer so we can still > record new > files but also drop the line number information? Do we really need to reserve space for 0x7FFFFFF0 - 0x70000000 = 268435440 files? > Well, this is a bug in C/C++ FEs clearly, lang_type should not be declared > twice with different meanings. One needs to be renamed. You can however > safely > ignore it and get build to complete with --disable-werror I'll try that. Thanks! > I will try to add assets and reproduce it (at least with cache disabled on > gcc > bootstrap), lets see if I get any luck. I only saw it on Chromium that is > order of mangnitude bigger than GCC. Just to give you idea, GCC linktime > memory consumption is about 700MB, while Firefox takes 3GB and Chromium 9GB. > It has 11k files linked to one unit (which makes is so much bigger than > firefox > that does include many .cpp units into one to get around the bloat). > Before my changes, the linemap occupied about 1GB. You can get an estimate of how much memory would be required to stream in/out directly the line_table by summing up the memory reported by dump_line_table_statistics for each TU before streaming out (perhaps using -ftrack-macro-expansion=0 to reduce it further). This would still be an overestimate, because one can drop one char (sysp) and one int (included_from) per map and one can drop all maps that are not used by LTO. Moreover, you will not need a cache and everything will be in order already when you stream in.