[llvm] [memprof] Remove a dead constructor in AllocationInfo (NFC) (PR #117427)

via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 23 01:00:51 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-pgo

Author: Kazu Hirata (kazutakahirata)

<details>
<summary>Changes</summary>

This patch removes a dead constructor in AllocationInfo.  We used to
use it for MemProf Version 1 deserialization purposes via
MemProfRecord::MemProfRecord.


---
Full diff: https://github.com/llvm/llvm-project/pull/117427.diff


1 Files Affected:

- (modified) llvm/include/llvm/ProfileData/MemProf.h (-8) 


``````````diff
diff --git a/llvm/include/llvm/ProfileData/MemProf.h b/llvm/include/llvm/ProfileData/MemProf.h
index a56ad1e0dbbceb..73a9586aaa6448 100644
--- a/llvm/include/llvm/ProfileData/MemProf.h
+++ b/llvm/include/llvm/ProfileData/MemProf.h
@@ -389,14 +389,6 @@ struct AllocationInfo {
   PortableMemInfoBlock Info;
 
   AllocationInfo() = default;
-  AllocationInfo(
-      const IndexedAllocationInfo &IndexedAI,
-      llvm::function_ref<const Frame(const FrameId)> IdToFrameCallback) {
-    for (const FrameId &Id : IndexedAI.CallStack) {
-      CallStack.push_back(IdToFrameCallback(Id));
-    }
-    Info = IndexedAI.Info;
-  }
 
   void printYAML(raw_ostream &OS) const {
     OS << "    -\n";

``````````

</details>


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


More information about the llvm-commits mailing list