[all-commits] [llvm/llvm-project] dbdbf1: [LLD][ELF] Fix performance regression when using l...

Andrew Ng via All-commits all-commits at lists.llvm.org
Wed Apr 29 03:30:04 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: dbdbf1e63d735eada7c9e4ff42ac0e56f56f5774
      https://github.com/llvm/llvm-project/commit/dbdbf1e63d735eada7c9e4ff42ac0e56f56f5774
  Author: Andrew Ng <andrew.ng at sony.com>
  Date:   2026-04-29 (Wed, 29 Apr 2026)

  Changed paths:
    M lld/ELF/LinkerScript.cpp

  Log Message:
  -----------
  [LLD][ELF] Fix performance regression when using linker scripts (#194668)

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.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list