[llvm] [BOLT][AArch64] Speedup `computeInstructionSize` (PR #121106)
Alexey Moksyakov via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 25 04:20:35 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:
no, inside AArch64MCPlusBuilder.cpp
std::optional<uint32_t> getSize(const MCInst &Inst) const override {
return 4;
}
https://github.com/llvm/llvm-project/pull/121106
More information about the llvm-commits
mailing list