Skip to content

[memprof] Deprecate MemProfReader::getFrameMapping and its friends (NFC) #116919

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

Merged

Conversation

kazutakahirata
Copy link
Contributor

All the consumers of the data from MemProfReader have switched to
MemProfReader::takeMemProfData. This patch deprecates
MemProfReader::getFrameMapping and its friends.

All the consumers of the data from MemProfReader have switched to
MemProfReader::takeMemProfData.  This patch deprecates
MemProfReader::getFrameMapping and its friends.
@llvmbot llvmbot added the PGO Profile Guided Optimizations label Nov 20, 2024
@llvmbot
Copy link
Member

llvmbot commented Nov 20, 2024

@llvm/pr-subscribers-pgo

Author: Kazu Hirata (kazutakahirata)

Changes

All the consumers of the data from MemProfReader have switched to
MemProfReader::takeMemProfData. This patch deprecates
MemProfReader::getFrameMapping and its friends.


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

1 Files Affected:

  • (modified) llvm/include/llvm/ProfileData/MemProfReader.h (+3)
diff --git a/llvm/include/llvm/ProfileData/MemProfReader.h b/llvm/include/llvm/ProfileData/MemProfReader.h
index de2167f97b0dc8..6e35bb1d39c63a 100644
--- a/llvm/include/llvm/ProfileData/MemProfReader.h
+++ b/llvm/include/llvm/ProfileData/MemProfReader.h
@@ -47,17 +47,20 @@ class MemProfReader {
   }
 
   // Return a const reference to the internal Id to Frame mappings.
+  LLVM_DEPRECATED("Use takeMemProfData instead", "takeMemProfData")
   const llvm::DenseMap<FrameId, Frame> &getFrameMapping() const {
     return IdToFrame;
   }
 
   // Return a const reference to the internal Id to call stacks.
+  LLVM_DEPRECATED("Use takeMemProfData instead", "takeMemProfData")
   const llvm::DenseMap<CallStackId, llvm::SmallVector<FrameId>> &
   getCallStacks() const {
     return CSIdToCallStack;
   }
 
   // Return a const reference to the internal function profile data.
+  LLVM_DEPRECATED("Use takeMemProfData instead", "takeMemProfData")
   const llvm::MapVector<GlobalValue::GUID, IndexedMemProfRecord> &
   getProfileData() const {
     return FunctionProfileData;

@kazutakahirata kazutakahirata merged commit ab7201a into llvm:main Nov 20, 2024
8 of 10 checks passed
@kazutakahirata kazutakahirata deleted the memprof_cleanup_deprecate_get branch November 20, 2024 16:36
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