[llvm] [BOLT][AArch64] Enabling Inlining for Memcpy for AArch64 in BOLT (PR #154929)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 28 06:03:22 PDT 2025
================
@@ -1866,8 +1866,35 @@ Error InlineMemcpy::runOnFunctions(BinaryContext &BC) {
const bool IsMemcpy8 = (CalleeSymbol->getName() == "_memcpy8");
const bool IsTailCall = BC.MIB->isTailCall(Inst);
+ // Extract size from preceding instructions (AArch64 only).
----------------
yafet-a wrote:
The isAArch64 check isn't needed at all because of the fallback with the virtual method in MCPlusBuilder.h. I omitted it initally in the earlier commits (see https://github.com/llvm/llvm-project/pull/154929/commits/db353b759b298aed2e0ebf86f99d6049a5a62e12)
I then added the check post review because I had taken the discussion (https://github.com/llvm/llvm-project/pull/154929#discussion_r2294121978) on it being AArch64 specific to mean that I should have some self-documenting code to make the AArch64 specific logic in BinaryPasses clearer. I think I misunderstood what you were getting at.
To clarify: would you prefer I create the findMemcpySizeInBytes virtual method with the implementation moved to AArch64MCPlusBuilder.cpp, or keep the current logic in BinaryPasses.cpp and just drop the unnecessary isAArch64 check?
https://github.com/llvm/llvm-project/pull/154929
More information about the llvm-commits
mailing list