[all-commits] [llvm/llvm-project] cf5e2b: [KeyInstr] MDNodeKeyImpl<DILocation> skip zero val...

Orlando Cazalet-Hyams via All-commits all-commits at lists.llvm.org
Mon Jun 9 06:50:55 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cf5e2b613d026faa6bd297f3180a76e03d3a8537
      https://github.com/llvm/llvm-project/commit/cf5e2b613d026faa6bd297f3180a76e03d3a8537
  Author: Orlando Cazalet-Hyams <orlando.hyams at sony.com>
  Date:   2025-06-09 (Mon, 09 Jun 2025)

  Changed paths:
    M llvm/lib/IR/LLVMContextImpl.h

  Log Message:
  -----------
  [KeyInstr] MDNodeKeyImpl<DILocation> skip zero values for hash (#143357)

[KeyInstr] MDNodeKeyImpl<DILocation> skip zero values for hash

Hashing AtomGroup and AtomRank substantially impacts performance whether Key
Instructions is enabled or not. We can't detect whether it's enabled here
cheaply; avoiding hashing zero values is a good approximation. This affects
Key Instruction builds too, but any potential costs incurred by messing with
the hash distribution (hash_combine(x) != hash_combine(x, 0)) appear to still
be massively outweighed by the overall compile time savings by performing this
check.

See PR for compile-time-tracker numbers.



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