Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged

Conversation

kazutakahirata
Copy link
Contributor

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

This patch removes a dead constructor in AllocationInfo.  We used to
use it for MemProf Version 1 deserialization purposes via
MemProfRecord::MemProfRecord.
@llvmbot llvmbot added the PGO Profile Guided Optimizations label Nov 23, 2024
@llvmbot
Copy link
Member

llvmbot commented Nov 23, 2024

@llvm/pr-subscribers-pgo

Author: Kazu Hirata (kazutakahirata)

Changes

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 --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";

Copy link
Contributor

@snehasish snehasish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@kazutakahirata kazutakahirata merged commit d6e6478 into llvm:main Nov 23, 2024
10 checks passed
@kazutakahirata kazutakahirata deleted the memprof_AllocationInfo_ctor branch November 23, 2024 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PGO Profile Guided Optimizations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants