[llvm] [MemProf] Disable alloc context in combined summary for ndebug builds (PR #139161)

Snehasish Kumar via llvm-commits llvm-commits at lists.llvm.org
Fri May 9 13:38:13 PDT 2025


================
@@ -99,6 +99,21 @@ static cl::opt<bool> WriteRelBFToSummary(
     "write-relbf-to-summary", cl::Hidden, cl::init(false),
     cl::desc("Write relative block frequency to function summary "));
 
+// Since we only use the context information in the memprof summary records in
+// the LTO backends to do assertion checking, save time and space by only
+// serializing the context for non-NDEBUG builds.
+// TODO: Currently this controls writing context of the allocation info records,
+// which are larger and more expensive, but we should do this for the callsite
+// records as well.
+static cl::opt<bool>
+    CombinedIndexMemProfContext("combined-index-memprof-context", cl::Hidden,
+#ifndef NDEBUG
----------------
snehasish wrote:

Sounds good to me.

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


More information about the llvm-commits mailing list