[llvm] 273e463 - [memprof] Improve a comment (NFC) (#142002)
via llvm-commits
llvm-commits at lists.llvm.org
Thu May 29 12:22:41 PDT 2025
Author: Kazu Hirata
Date: 2025-05-29T12:22:38-07:00
New Revision: 273e463f4526691ede59dbda738a8b24d2d1d13c
URL: https://github.com/llvm/llvm-project/commit/273e463f4526691ede59dbda738a8b24d2d1d13c
DIFF: https://github.com/llvm/llvm-project/commit/273e463f4526691ede59dbda738a8b24d2d1d13c.diff
LOG: [memprof] Improve a comment (NFC) (#142002)
We can go one step further than "compare" and mention "prefix" to
succinctly describe the function.
Added:
Modified:
llvm/lib/Transforms/Instrumentation/MemProfiler.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Instrumentation/MemProfiler.cpp b/llvm/lib/Transforms/Instrumentation/MemProfiler.cpp
index 707226bed8516..c03aa5accc011 100644
--- a/llvm/lib/Transforms/Instrumentation/MemProfiler.cpp
+++ b/llvm/lib/Transforms/Instrumentation/MemProfiler.cpp
@@ -762,9 +762,9 @@ static AllocationType addCallStack(CallStackTrie &AllocTrie,
return AllocType;
}
-// Helper to compare the InlinedCallStack computed from an instruction's debug
-// info to a list of Frames from profile data (either the allocation data or a
-// callsite).
+// Return true if InlinedCallStack, computed from a call instruction's debug
+// info, is a prefix of ProfileCallStack, a list of Frames from profile data
+// (either the allocation data or a callsite).
static bool
stackFrameIncludesInlinedCallStack(ArrayRef<Frame> ProfileCallStack,
ArrayRef<uint64_t> InlinedCallStack) {
More information about the llvm-commits
mailing list