[all-commits] [llvm/llvm-project] 44addb: [LTO] Sort DefinedGlobals in LTO cache key (#210025)

Nikita Popov via All-commits all-commits at lists.llvm.org
Fri Jul 17 10:35:35 PDT 2026


  Branch: refs/heads/release/23.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 44addbd4e1fbf754092185cd74c08a1e283df80f
      https://github.com/llvm/llvm-project/commit/44addbd4e1fbf754092185cd74c08a1e283df80f
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2026-07-17 (Fri, 17 Jul 2026)

  Changed paths:
    M llvm/lib/LTO/LTO.cpp
    A llvm/test/ThinLTO/X86/Inputs/cache-defined-globals-order.ll
    A llvm/test/ThinLTO/X86/cache-defined-globals-order.ll

  Log Message:
  -----------
  [LTO] Sort DefinedGlobals in LTO cache key (#210025)

Sort the DefindeGlobals by GUID when computing the LTO cache key, to
avoid making the cache key dependent on the insertion order. This fixes
large compile-time regressions in rust incremental builds.

Alternatively one could make collectDefinedGVSummariesPerModule() work
on the sortedRange(), but as that is also used in other places, it
probably makes sense to sort locally.

The issue was introduced in 760bb06cb3cd98832f1e4e7a4eaebd98b66d2bdd.

(cherry picked from commit 90e31c46d005ae0a7f5968c38a9310bee499923c)



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