[llvm] [MemProf] Add basic summary section support (PR #141805)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Wed May 28 10:48:04 PDT 2025


================
@@ -0,0 +1,47 @@
+//===- MemProfSummaryBuilder.h - MemProf summary building -------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This file contains MemProf summary builder.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_PROFILEDATA_MEMPROFSUMMARYBUILDER_H
+#define LLVM_PROFILEDATA_MEMPROFSUMMARYBUILDER_H
+
+#include "llvm/ProfileData/MemProf.h"
+#include "llvm/ProfileData/MemProfSummary.h"
+
+namespace llvm {
+namespace memprof {
+
+class MemProfSummaryBuilder {
+private:
+  DenseSet<uint64_t> Contexts;
----------------
kazutakahirata wrote:

May I suggest some comment here?  Something like:

```
// The set of full stack IDs that we've processed so far.
```


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


More information about the llvm-commits mailing list