aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ProfileData/SampleProfReader.cpp
diff options
context:
space:
mode:
authorMingming Liu <mingmingl@google.com>2025-05-27 09:41:54 -0700
committerGitHub <noreply@github.com>2025-05-27 09:41:54 -0700
commiteb79e340a10fd0292c7fa2e3ca05895b8402f29e (patch)
tree64a25f51bc0c7d91ad76b9432a6cc7ecaab8763d /llvm/lib/ProfileData/SampleProfReader.cpp
parent15c3adee9f96c09add3bd5bcca4bef434ffec810 (diff)
downloadllvm-eb79e340a10fd0292c7fa2e3ca05895b8402f29e.zip
llvm-eb79e340a10fd0292c7fa2e3ca05895b8402f29e.tar.gz
llvm-eb79e340a10fd0292c7fa2e3ca05895b8402f29e.tar.bz2
[NFCI] Clean up idempotent stack pop for inline context (#141544)
In the top-of-tree, the stack pops at L414-416 [1] are no-op since there are prior stack pops at L400-402. [1] https://github.com/llvm/llvm-project/blame/e015626f189dc76f8df9fdc25a47638c6a2f3feb/llvm/lib/ProfileData/SampleProfReader.cpp#L414-L416 [2] https://github.com/llvm/llvm-project/blame/e015626f189dc76f8df9fdc25a47638c6a2f3feb/llvm/lib/ProfileData/SampleProfReader.cpp#L400-L402
Diffstat (limited to 'llvm/lib/ProfileData/SampleProfReader.cpp')
-rw-r--r--llvm/lib/ProfileData/SampleProfReader.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/llvm/lib/ProfileData/SampleProfReader.cpp b/llvm/lib/ProfileData/SampleProfReader.cpp
index 343104e..6466618 100644
--- a/llvm/lib/ProfileData/SampleProfReader.cpp
+++ b/llvm/lib/ProfileData/SampleProfReader.cpp
@@ -411,9 +411,6 @@ std::error_code SampleProfileReaderText::readImpl() {
break;
}
case LineType::BodyProfile: {
- while (InlineStack.size() > Depth) {
- InlineStack.pop_back();
- }
FunctionSamples &FProfile = *InlineStack.back();
for (const auto &name_count : TargetCountMap) {
mergeSampleProfErrors(Result, FProfile.addCalledTargetSamples(