Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ELF] Simplify SectionBase::partition handling and make it live by de…
…fault. NFC Previously an InputSectionBase is dead (`partition==0`) by default. SyntheticSection calls markLive and BssSection overrides that with markDead. It is more natural to make InputSectionBase live by default and let --gc-sections mark InputSectionBase dead. When linking a Release build of clang: * --no-gc-sections:, the removed `inputSections` loop decreases markLive time from 4ms to 1ms. * --gc-sections: the extra `inputSections` loop increases markLive time from 0.181296s to 0.188526s. This is as of we lose the removing one `inputSections` loop optimization (4374824). I believe the loss can be mitigated if we refactor markLive.
- Loading branch information
Showing
5 changed files
with
8 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters