Skip to content

Conversation

@kazutakahirata
Copy link
Contributor

LLVM Programmer's Manual prefers ArrayRef over actual sequential
container types for read accesses.

LLVM Programmer's Manual prefers ArrayRef over actual sequential
container types for read accesses.
@llvmbot llvmbot added the PGO Profile Guided Optimizations label Nov 14, 2024
@llvmbot
Copy link
Member

llvmbot commented Nov 14, 2024

@llvm/pr-subscribers-pgo

Author: Kazu Hirata (kazutakahirata)

Changes

LLVM Programmer's Manual prefers ArrayRef over actual sequential
container types for read accesses.


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

1 Files Affected:

  • (modified) llvm/include/llvm/ProfileData/MemProf.h (+1-1)
diff --git a/llvm/include/llvm/ProfileData/MemProf.h b/llvm/include/llvm/ProfileData/MemProf.h
index ff05bb7da2f799..bfd91407769bb3 100644
--- a/llvm/include/llvm/ProfileData/MemProf.h
+++ b/llvm/include/llvm/ProfileData/MemProf.h
@@ -1134,7 +1134,7 @@ class CallStackRadixTreeBuilder {
              const llvm::DenseMap<FrameId, LinearFrameId> &MemProfFrameIndexes,
              llvm::DenseMap<FrameId, FrameStat> &FrameHistogram);
 
-  const std::vector<LinearFrameId> &getRadixArray() const { return RadixArray; }
+  ArrayRef<LinearFrameId> getRadixArray() const { return RadixArray; }
 
   llvm::DenseMap<CallStackId, LinearCallStackId> takeCallStackPos() {
     return std::move(CallStackPos);

@kazutakahirata kazutakahirata merged commit 44adc24 into llvm:main Nov 14, 2024
10 checks passed
@kazutakahirata kazutakahirata deleted the memprof_ArrayRef branch December 13, 2024 22:33
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