[BOLT] Remove unnecessary dependency. NFC#174645
Merged
Conversation
There's no need for a full definition of BinaryBasicBlock in MCPlusBuilder.h. Use InstructionListType::iterator instead of BinaryBasicBlock::iterator in findMemcpySizeInBytes().
Member
|
@llvm/pr-subscribers-bolt Author: Maksim Panchenko (maksfb) ChangesThere's no need for a full definition of Full diff: https://github.com/llvm/llvm-project/pull/174645.diff 2 Files Affected:
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;
|
aaupov
approved these changes
Jan 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There's no need for a full definition of
BinaryBasicBlockinMCPlusBuilder.h. UseInstructionListType::iteratorinstead ofBinaryBasicBlock::iteratorinfindMemcpySizeInBytes().