Skip to content

Commit 46435ac

Browse files
authored
[NFC][BOLT] Remove dead code (SPTAllocatorsId) (#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 cc84154.
1 parent 08011cf commit 46435ac

File tree

2 files changed

+0
-9
lines changed

2 files changed

+0
-9
lines changed

bolt/include/bolt/Passes/FrameAnalysis.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,6 @@ class FrameAnalysis {
170170
std::unique_ptr<StackPointerTracking>>
171171
SPTMap;
172172

173-
/// A vector that stores ids of the allocators that are used in SPT
174-
/// computation
175-
std::vector<MCPlusBuilder::AllocatorIdTy> SPTAllocatorsId;
176-
177173
public:
178174
explicit FrameAnalysis(BinaryContext &BC, BinaryFunctionCallGraph &CG);
179175

bolt/lib/Passes/FrameAnalysis.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -561,11 +561,6 @@ FrameAnalysis::FrameAnalysis(BinaryContext &BC, BinaryFunctionCallGraph &CG)
561561
NamedRegionTimer T1("clearspt", "clear spt", "FA", "FA breakdown",
562562
opts::TimeFA);
563563
clearSPTMap();
564-
565-
// Clean up memory allocated for annotation values
566-
if (!opts::NoThreads)
567-
for (MCPlusBuilder::AllocatorIdTy Id : SPTAllocatorsId)
568-
BC.MIB->freeValuesAllocator(Id);
569564
}
570565
}
571566

0 commit comments

Comments
 (0)