The addition of the support for `--enable-non-contiguous-regions` from PR #90007 moved an "early out" condition in `LinkerScript::computeInputSections()`. This could result in other relatively expensive checks, i.e. `pat.sectionPat.match`, `cmd->matchesFile`, `pat.excludesFile` and `flagsMatch`, to be performed unnecessarily in the default situation where `--enable-non-contiguous-regions` is disabled. This fix restores the "early out" condition and shows an ~14% improvement for the Linux kernel benchmark link and has been seen to improve performance by up to ~30% for a large UE5 link.
71 KiB
71 KiB