[llvm] [NFC][BOLT] Remove dead code (SPTAllocatorsId) (PR #91477)
Kristof Beyls via llvm-commits
llvm-commits at lists.llvm.org
Wed May 8 07:23:08 PDT 2024
https://github.com/kbeyls created https://github.com/llvm/llvm-project/pull/91477
It seems that SPTAllocatorsId is no longer used in FrameAnalysis, so let's remove it.
It seems the use of SPTAllocatorsId was removed back in 2019, in commit cc8415406c7.
>From b2a4115085a956d3c48007f0a43678818d04adad Mon Sep 17 00:00:00 2001
From: Kristof Beyls <kristof.beyls at arm.com>
Date: Wed, 8 May 2024 15:54:02 +0200
Subject: [PATCH] [NFC][BOLT] Remove dead code (SPTAllocatorsId)
It seems that SPTAllocatorsId is no longer used in FrameAnalysis, so
let's remove it.
It seems the use of SPTAllocatorsId was removed back in 2019, in
commit cc8415406c7.
---
bolt/include/bolt/Passes/FrameAnalysis.h | 4 ----
bolt/lib/Passes/FrameAnalysis.cpp | 5 -----
2 files changed, 9 deletions(-)
diff --git a/bolt/include/bolt/Passes/FrameAnalysis.h b/bolt/include/bolt/Passes/FrameAnalysis.h
index 66246bd6647bb..44b54d4ed45d4 100644
--- a/bolt/include/bolt/Passes/FrameAnalysis.h
+++ b/bolt/include/bolt/Passes/FrameAnalysis.h
@@ -170,10 +170,6 @@ class FrameAnalysis {
std::unique_ptr<StackPointerTracking>>
SPTMap;
- /// A vector that stores ids of the allocators that are used in SPT
- /// computation
- std::vector<MCPlusBuilder::AllocatorIdTy> SPTAllocatorsId;
-
public:
explicit FrameAnalysis(BinaryContext &BC, BinaryFunctionCallGraph &CG);
diff --git a/bolt/lib/Passes/FrameAnalysis.cpp b/bolt/lib/Passes/FrameAnalysis.cpp
index 7f1245e39f567..4ebfd8f158f7f 100644
--- a/bolt/lib/Passes/FrameAnalysis.cpp
+++ b/bolt/lib/Passes/FrameAnalysis.cpp
@@ -561,11 +561,6 @@ FrameAnalysis::FrameAnalysis(BinaryContext &BC, BinaryFunctionCallGraph &CG)
NamedRegionTimer T1("clearspt", "clear spt", "FA", "FA breakdown",
opts::TimeFA);
clearSPTMap();
-
- // Clean up memory allocated for annotation values
- if (!opts::NoThreads)
- for (MCPlusBuilder::AllocatorIdTy Id : SPTAllocatorsId)
- BC.MIB->freeValuesAllocator(Id);
}
}
More information about the llvm-commits
mailing list