[all-commits] [llvm/llvm-project] e57315: [MemProf] Fix discarding of noncold contexts after...

Teresa Johnson via All-commits all-commits at lists.llvm.org
Fri Jul 18 21:11:59 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e57315e6ca8f05154e205136bb940b8cb14028d3
      https://github.com/llvm/llvm-project/commit/e57315e6ca8f05154e205136bb940b8cb14028d3
  Author: Teresa Johnson <tejohnson at google.com>
  Date:   2025-07-18 (Fri, 18 Jul 2025)

  Changed paths:
    M llvm/include/llvm/Analysis/MemoryProfileInfo.h
    M llvm/lib/Analysis/MemoryProfileInfo.cpp
    M llvm/test/Transforms/Inline/memprof_inline2.ll
    A llvm/test/Transforms/Inline/memprof_inline3.ll

  Log Message:
  -----------
  [MemProf] Fix discarding of noncold contexts after inlining (#149599)

When we rebuild the call site tries after inlining of an allocation with
MD_memprof metadata, we don't want to reapply the discarding of small
non-cold contexts (under -memprof-callsite-cold-threshold=) because we
have either no context size info (without -memprof-report-hinted-sizes
or another option that causes us to keep that as metadata), and even
with that information in the metadata, we have imperfect information at
that point as we have already discarded some contexts during matching.

The first case was even worse because we didn't guard our check by
whether the number of cold bytes was 0, leading to very aggressive
pruning during post-inline metadata rebuilding without the context size
information.



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