c01fe6729e607fd064eb27db2a9420aedb75ffd4
This implements garbage collection on locations within macro expansions, when streaming out a CMI. When doing the reachability walks, we now note which macro locations we need and then only write those locations. The complication here is that every macro expansion location has an independently calculated offset. This complicates writing, but reading remains the same -- the macro locations of a CMI continue to form a contiguous block. For std headers this reduced the number of macro maps by 40% and the number of locations by 16%. For a GMF including iostream, it reduced it by 80% and 60% respectively. Ordinary locations are still transformed en-mass. They are somewhat more complicated to apply a similar optimization to. gcc/cp/ * module.cc (struct macro_info): New. (struct macro_traits): New. (macro_remap, macro_table): New globals. (depset::hash::find_dependencies): Note namespace location. (module_for_macro_loc): Adjust. (module_state::note_location): New. (module_state::Write_location): Note location when not streaming. Adjust macro location streaming. (module_state::read_location): Adjust macro location streaming. (module_state::write_init_maps): New. (module_state::write_prepare_maps): Reimplement macro map preparation. (module_state::write_macro_maps): Reimplement. (module_state::read_macro_maps): Likewise. (module_state::write_begin): Adjust. gcc/testsuite/ * g++.dg/modules/loc-prune-1.C: New. * g++.dg/modules/loc-prune-2.C: New. * g++.dg/modules/loc-prune-3.C: New. * g++.dg/modules/pr98718_a.C: Adjust. * g++.dg/modules/pr98718_b.C: Adjust.
…
…
…
…
…
…
…
…
…
…
…
This directory contains the GNU Compiler Collection (GCC). The GNU Compiler Collection is free software. See the files whose names start with COPYING for copying permission. The manuals, and some of the runtime libraries, are under different terms; see the individual source files for details. The directory INSTALL contains copies of the installation information as HTML and plain text. The source of this information is gcc/doc/install.texi. The installation information includes details of what is included in the GCC sources and what files GCC installs. See the file gcc/doc/gcc.texi (together with other files that it includes) for usage and porting information. An online readable version of the manual is in the files gcc/doc/gcc.info*. See http://gcc.gnu.org/bugs/ for how to report bugs usefully. Copyright years on GCC source files may be listed using range notation, e.g., 1987-2012, indicating that every year in the range, inclusive, is a copyrightable year that could otherwise be listed individually.
Description
Languages
C++
33%
C
27.4%
Ada
13%
Go
7.1%
D
7%
Other
12.1%