Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 8, 2024

Conversation

kbeyls
Copy link
Collaborator

@kbeyls kbeyls commented May 8, 2024

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.

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.
@llvmbot
Copy link
Member

llvmbot commented May 8, 2024

@llvm/pr-subscribers-bolt

Author: Kristof Beyls (kbeyls)

Changes

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.


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

@kbeyls kbeyls merged commit 46435ac into llvm:main May 8, 2024
@kbeyls kbeyls deleted the DeleteDeadFrameAnalysisCode branch May 8, 2024 17:20
kbeyls added a commit to kbeyls/llvm-project that referenced this pull request Jun 5, 2024
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants