[llvm-branch-commits] [llvm] [NFC][MemProf] Replace memprofraw with YAML in memprof.ll test (PR #216878)
Ellis Hoag via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Aug 17 16:47:01 PDT 2026
================
@@ -1,35 +1,16 @@
;; Tests memprof profile matching (with and without instrumentation profiles).
+; RUN: rm -rf %t && split-file %s %t
-;; Several requirements due to using raw profile inputs:
-;; PGO profile uses zlib compression
-; REQUIRES: zlib
-;; Avoid failures on big-endian systems that can't read the profile properly
-; REQUIRES: x86_64-linux
;; -stats requires asserts
; REQUIRES: asserts
-;; TODO: Use text profile inputs once that is available for memprof.
-;; # To update the Inputs below, run Inputs/update_memprof_inputs.sh.
-;; # To generate below LLVM IR for use in matching:
-;; $ clang++ -gmlt -fdebug-info-for-profiling -fno-omit-frame-pointer \
-;; -fno-optimize-sibling-calls memprof.cc -S -emit-llvm
-
;; Generate indexed profiles of all combinations:
-; RUN: llvm-profdata merge %S/Inputs/memprof.memprofraw --profiled-binary %S/Inputs/memprof.exe -o %t.memprofdata
-; RUN: llvm-profdata merge %S/Inputs/memprof_pgo.proftext %S/Inputs/memprof.memprofraw --profiled-binary %S/Inputs/memprof.exe -o %t.pgomemprofdata
-; RUN: llvm-profdata merge %S/Inputs/memprof_pgo.proftext -o %t.pgoprofdata
-; RUN: llvm-profdata merge %S/Inputs/memprof.nocolinfo.memprofraw --profiled-binary %S/Inputs/memprof.nocolinfo.exe -o %t.nocolinfo.memprofdata
-
-;; Check that the summary can be shown (and is identical) for both the raw and indexed profiles.
-; RUN: llvm-profdata show --memory %S/Inputs/memprof.memprofraw --profiled-binary %S/Inputs/memprof.exe | FileCheck %s --check-prefixes=SUMMARY
-; RUN: llvm-profdata show --memory %t.memprofdata | FileCheck %s --check-prefixes=SUMMARY
-; SUMMARY: # MemProfSummary:
-; SUMMARY: # Total contexts: 8
-; SUMMARY: # Total cold contexts: 5
-; SUMMARY: # Total hot contexts: 0
-; SUMMARY: # Maximum cold context total size: 10
-; SUMMARY: # Maximum warm context total size: 10
-; SUMMARY: # Maximum hot context total size: 0
----------------
ellishg wrote:
This output is already tested in `memprof_max_cold_threshold.test`
https://github.com/llvm/llvm-project/blob/f431b45638ecb29f838dd4c314aac36f8a30480b/llvm/test/Transforms/PGOProfile/memprof_max_cold_threshold.test#L11-L18
After removing the `.memprofraw` binary file, we can no longer test the output from that file, so I've removed it.
https://github.com/llvm/llvm-project/pull/216878
More information about the llvm-branch-commits
mailing list