[all-commits] [llvm/llvm-project] 6be2e8: [MemProf] Emit richer optimization remarks for sin...

Teresa Johnson via All-commits all-commits at lists.llvm.org
Thu Feb 12 12:56:17 PST 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6be2e8902951dabfc15a0c6f0bb872742a959aa3
      https://github.com/llvm/llvm-project/commit/6be2e8902951dabfc15a0c6f0bb872742a959aa3
  Author: Teresa Johnson <tejohnson at google.com>
  Date:   2026-02-12 (Thu, 12 Feb 2026)

  Changed paths:
    M llvm/lib/Analysis/MemoryProfileInfo.cpp
    M llvm/test/Transforms/PGOProfile/memprof.ll

  Log Message:
  -----------
  [MemProf] Emit richer optimization remarks for single-type allocations (#181089)

Emit per-context optimization remarks, when we apply a hint
unambiguously to an allocation, including the full allocation context
hash and total profiled size. When no context size information is
available, we fall back to a single remark per allocation. While this is
somewhat redundant with the message emitted for
-memprof-report-hinted-sizes, the latter enables emitting additional
messages, and so it is left in for now.

To support this consistently, added a new internal option
-memprof-keep-context-size-info that ensures context size information
is tracked and available for these remarks even when hinted size
reporting isn't fully enabled. This also will be useful for providing
this additional information to the LTO link for remarks there (in a
subsequent PR).

Updated memprof.ll to verify both the detailed per-context remarks
(when size info is kept) and the original per-allocation remarks (when
it is not).



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