[all-commits] [llvm/llvm-project] 898891: [lld-macho] Improve ICF thunk folding logic (#131186)

alx32 via All-commits all-commits at lists.llvm.org
Fri Mar 14 15:49:56 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 89889149cd21bb70c9a545fc18c1bfc1467b1b04
      https://github.com/llvm/llvm-project/commit/89889149cd21bb70c9a545fc18c1bfc1467b1b04
  Author: alx32 <103613512+alx32 at users.noreply.github.com>
  Date:   2025-03-14 (Fri, 14 Mar 2025)

  Changed paths:
    M lld/MachO/ICF.cpp

  Log Message:
  -----------
  [lld-macho] Improve ICF thunk folding logic (#131186)

Refactor to add some early return logic to `applySafeThunksToRange` so
that we completely skip irrelevant ranges.

Also add a check for `isCodeSection` to ensure we only apply branch
thunks to code section (they don't make sense for anything else).
Currently this isn't an issue since there are no `keepUnique` non-code
sections - but this is not a hard restriction and may be implemented in
the future, so we should be able to handle (i.e. avoid) this scenario.



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