[llvm] [BOLT][AArch64] Speedup `computeInstructionSize` (PR #121106)
Alexey Moksyakov via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 25 04:06:46 PST 2024
================
@@ -1363,6 +1363,17 @@ class BinaryContext {
if (std::optional<uint32_t> Size = MIB->getSize(Inst))
return *Size;
+ // Pseudo instrs will not be emiitted and have no size.
+ if (MIB->isPseudo(Inst)) {
+ return 0;
+ }
+
+ // Directly return 4 because AArch64 instructions always have a
+ // fixed size of 4 bytes.
+ if (isAArch64()) {
----------------
yavtuk wrote:
What if we define this method in AArch64MCPBuilder.cpp ?
https://github.com/llvm/llvm-project/pull/121106
More information about the llvm-commits
mailing list