Skip to content

[BOLT] Remove BinaryFunction::IsPatched. NFC #129461

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
Mar 3, 2025
Merged

Conversation

maksfb
Copy link
Contributor

@maksfb maksfb commented Mar 3, 2025

BinaryFunction::IsPatched is no longer used.

BinaryFunction::IsPatched is no longer used.
@llvmbot
Copy link
Member

llvmbot commented Mar 3, 2025

@llvm/pr-subscribers-bolt

Author: Maksim Panchenko (maksfb)

Changes

BinaryFunction::IsPatched is no longer used.


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

2 Files Affected:

  • (modified) bolt/include/bolt/Core/BinaryFunction.h (-8)
  • (modified) bolt/lib/Passes/PatchEntries.cpp (-2)
diff --git a/bolt/include/bolt/Core/BinaryFunction.h b/bolt/include/bolt/Core/BinaryFunction.h
index 942840a7621fd..c9ccb69ab52c1 100644
--- a/bolt/include/bolt/Core/BinaryFunction.h
+++ b/bolt/include/bolt/Core/BinaryFunction.h
@@ -343,9 +343,6 @@ class BinaryFunction {
   /// True if the function uses ORC format for stack unwinding.
   bool HasORC{false};
 
-  /// True if the original entry point was patched.
-  bool IsPatched{false};
-
   /// True if the function contains explicit or implicit indirect branch to its
   /// split fragments, e.g., split jump table, landing pad in split fragment
   bool HasIndirectTargetToSplitFragment{false};
@@ -1376,9 +1373,6 @@ class BinaryFunction {
   /// Return true if the function uses ORC format for stack unwinding.
   bool hasORC() const { return HasORC; }
 
-  /// Return true if the original entry point was patched.
-  bool isPatched() const { return IsPatched; }
-
   const JumpTable *getJumpTable(const MCInst &Inst) const {
     const uint64_t Address = BC.MIB->getJumpTable(Inst);
     return getJumpTableContainingAddress(Address);
@@ -1729,8 +1723,6 @@ class BinaryFunction {
   /// Mark function that should not be emitted.
   void setIgnored();
 
-  void setIsPatched(bool V) { IsPatched = V; }
-
   void setHasIndirectTargetToSplitFragment(bool V) {
     HasIndirectTargetToSplitFragment = V;
   }
diff --git a/bolt/lib/Passes/PatchEntries.cpp b/bolt/lib/Passes/PatchEntries.cpp
index a647dc16820ee..4ce9c09b311df 100644
--- a/bolt/lib/Passes/PatchEntries.cpp
+++ b/bolt/lib/Passes/PatchEntries.cpp
@@ -130,8 +130,6 @@ Error PatchEntries::runOnFunctions(BinaryContext &BC) {
       assert(!ColdSize && "unexpected cold code");
       assert(HotSize <= PatchSize && "max patch size exceeded");
     }
-
-    Function.setIsPatched(true);
   }
   return Error::success();
 }

@maksfb maksfb merged commit 6a161cb into llvm:main Mar 3, 2025
12 checks passed
@maksfb maksfb deleted the gh-rm-is-patched branch March 6, 2025 02:46
jph-13 pushed a commit to jph-13/llvm-project that referenced this pull request Mar 21, 2025
BinaryFunction::IsPatched is no longer used.
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