[llvm] [memprof] Add Version2 of the indexed MemProf format (PR #89100)

Snehasish Kumar via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 17 11:55:46 PDT 2024


================
@@ -297,6 +297,23 @@ bool InstrProfWriter::addMemProfFrame(const memprof::FrameId Id,
   return true;
 }
 
+bool InstrProfWriter::addMemProfCallStack(
+    const memprof::CallStackId CSId,
+    const llvm::SmallVector<memprof::FrameId> &CallStack,
+    function_ref<void(Error)> Warn) {
+  auto Result = MemProfCallStackData.insert({CSId, CallStack});
----------------
snehasish wrote:

nit: looks like a good place to use a structured binding.

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


More information about the llvm-commits mailing list