From 70ba99ef272b89ea39d865e3ea356b92a25cf903 Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Sun, 8 Nov 2020 09:53:13 +0900 Subject: [PATCH] temporary --- main.cc | 42 ------------------------------------------ 1 file changed, 42 deletions(-) diff --git a/main.cc b/main.cc index f5dad80f..a86ade9f 100644 --- a/main.cc +++ b/main.cc @@ -182,7 +182,6 @@ static void handle_mergeable_strings(std::vector &files) { } static void bin_sections(std::vector &files) { -#if 1 int unit = (files.size() + 127) / 128; std::vector> slices = split(files, unit); @@ -217,47 +216,6 @@ static void bin_sections(std::vector &files) { sections.insert(sections.end(), group[i].begin(), group[i].end()); } } -#elif 1 - int num_osec = OutputSection::instances.size(); - std::vector> sizes(files.size(), std::vector(num_osec)); - - tbb::parallel_for(0, (int)files.size(), [&](int i) { - for (InputSection *isec : files[i]->sections) { - if (isec) { - OutputSection *osec = isec->output_section; - sizes[i][osec->idx]++; - } - } - }); - - std::vector> offsets(files.size() + 1, std::vector(num_osec)); - - for (int i = 1; i < files.size() + 1; i++) - for (int j = 0; j < num_osec; j++) - offsets[i][j] = offsets[i - 1][j] + sizes[i - 1][j]; - - tbb::parallel_for(0, num_osec, [&](int j) { - OutputSection::instances[j]->sections.resize(offsets[files.size()][j]); - }); - - tbb::parallel_for(0, (int)files.size(), [&](int i) { - for (InputSection *isec : files[i]->sections) { - if (isec) { - OutputSection *osec = isec->output_section; - osec->sections[offsets[i][osec->idx]++] = isec; - } - } - }); -#else - for (ObjectFile *file : files) { - for (InputSection *isec : file->sections) { - if (!isec) - continue; - OutputSection *osec = isec->output_section; - osec->sections.push_back(isec); - } - } -#endif } static void set_isec_offsets() {