On Wed, Apr 28, 2021 at 1:30 AM Martin Sebor via Gcc-patches <gcc-patches@gcc.gnu.org> wrote: > > The free_lang_data pass is defined entirely in tree.c. Its code > changes only rarely (only 13% commits to tree.c), and unlike > the rest of tree.c, is even more rarely read. The pass is also > right in the middle of tree.c, surrounded by various utility > functions many of which do tend to be frequently referenced (IME), > making the rest of the code harder to find and navigate in than > it should be. The pass contributes nearly 1300 lines of code to > the already quite sizable tree.c (over 16,000 LOC). > > To help alleviate some of these problems the attached change moves > the free_lang_data code to its own file where it's easier to find > and work with separately from the rest of tree.c. There are no > functional changes. > > Tested on x86_64-linux.
Since it's an IPA pass can you please name it ipa-free-lang-data.cc (.cc!)? There are now a few functions exported from this, please consider retaining those in tree.c (I spotted assign_assembler_name_if_needed, but there may be others), otherwise policy dictates we need a ipa-free-lang-data.h and adjust #includes at users. OK with that changes. Thanks, Richard. > > Martin