[llvm] [MemProf] Extend MemProfUse pass to make use of data access profiles to partition data (PR #151238)

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 25 11:52:39 PDT 2025


================
@@ -0,0 +1,87 @@
+; RUN: rm -rf %t && split-file %s %t && cd %t
+
+;; Read a text profile and merge it into indexed profile.
+; RUN: llvm-profdata merge --memprof-version=4 memprof.yaml -o memprof.profdata
+
+;; Run optimizer pass on the IR, and check the section prefix.
+; RUN: opt -passes='memprof-use<profile-filename=memprof.profdata>' -annotate-static-data-prefix \
+; RUN: -S input.ll -o - 2>&1 | FileCheck %s
+
+;; Repeat the command line above and enable -print-static-data-prefix. Test both IR and log.
----------------
teresajohnson wrote:

Probably can combine this with the above opt invocation?

https://github.com/llvm/llvm-project/pull/151238


More information about the llvm-commits mailing list