[llvm] [NFC][BOLT] Remove dead code (SPTAllocatorsId) (PR #91477)

via llvm-commits llvm-commits at lists.llvm.org
Wed May 8 07:23:41 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-bolt

Author: Kristof Beyls (kbeyls)

<details>
<summary>Changes</summary>

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.

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


2 Files Affected:

- (modified) bolt/include/bolt/Passes/FrameAnalysis.h (-4) 
- (modified) bolt/lib/Passes/FrameAnalysis.cpp (-5) 


``````````diff
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);
   }
 }
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/91477


More information about the llvm-commits mailing list