Skip to content

[BOLT] Remove unnecessary dependency. NFC#174645

Merged
maksfb merged 1 commit intollvm:mainfrom
maksfb:gh-refactor
Jan 6, 2026
Merged

[BOLT] Remove unnecessary dependency. NFC#174645
maksfb merged 1 commit intollvm:mainfrom
maksfb:gh-refactor

Conversation

@maksfb
Copy link
Contributor

@maksfb maksfb commented Jan 6, 2026

There's no need for a full definition of BinaryBasicBlock in MCPlusBuilder.h. Use InstructionListType::iterator instead of BinaryBasicBlock::iterator in findMemcpySizeInBytes().

There's no need for a full definition of BinaryBasicBlock in
MCPlusBuilder.h. Use InstructionListType::iterator instead of
BinaryBasicBlock::iterator in findMemcpySizeInBytes().
@llvmbot
Copy link
Member

llvmbot commented Jan 6, 2026

@llvm/pr-subscribers-bolt

Author: Maksim Panchenko (maksfb)

Changes

There's no need for a full definition of BinaryBasicBlock in MCPlusBuilder.h. Use InstructionListType::iterator instead of BinaryBasicBlock::iterator in findMemcpySizeInBytes().


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

2 Files Affected:

  • (modified) bolt/include/bolt/Core/MCPlusBuilder.h (+1-2)
  • (modified) bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp (+1-1)
diff --git a/bolt/include/bolt/Core/MCPlusBuilder.h b/bolt/include/bolt/Core/MCPlusBuilder.h
index 31bf73c839c3a..abb84a4ae2dab 100644
--- a/bolt/include/bolt/Core/MCPlusBuilder.h
+++ b/bolt/include/bolt/Core/MCPlusBuilder.h
@@ -14,7 +14,6 @@
 #ifndef BOLT_CORE_MCPLUSBUILDER_H
 #define BOLT_CORE_MCPLUSBUILDER_H
 
-#include "bolt/Core/BinaryBasicBlock.h"
 #include "bolt/Core/MCPlus.h"
 #include "bolt/Core/Relocation.h"
 #include "llvm/ADT/ArrayRef.h"
@@ -2042,7 +2041,7 @@ class MCPlusBuilder {
   /// targets).
   virtual std::optional<uint64_t>
   findMemcpySizeInBytes(const BinaryBasicBlock &BB,
-                        BinaryBasicBlock::iterator CallInst) const {
+                        InstructionListType::iterator CallInst) const {
     return std::nullopt;
   }
 
diff --git a/bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp b/bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp
index 03fb4ddc2f238..1837f7cfd8ca1 100644
--- a/bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp
+++ b/bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp
@@ -2971,7 +2971,7 @@ class AArch64MCPlusBuilder : public MCPlusBuilder {
 
   std::optional<uint64_t>
   findMemcpySizeInBytes(const BinaryBasicBlock &BB,
-                        BinaryBasicBlock::iterator CallInst) const override {
+                        InstructionListType::iterator CallInst) const override {
     MCPhysReg SizeReg = getIntArgRegister(2);
     if (SizeReg == getNoRegister())
       return std::nullopt;

@maksfb maksfb merged commit 3e840d2 into llvm:main Jan 6, 2026
12 checks passed
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