[all-commits] [llvm/llvm-project] fc6e97: [MC][X86] Avoid copying MCInst in emitInstrEnd (#9...
aengelke via All-commits
all-commits at lists.llvm.org
Tue Jun 11 04:10:57 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: fc6e97cf2f28a9c7a73b97488ec6b90fc0d34a4a
https://github.com/llvm/llvm-project/commit/fc6e97cf2f28a9c7a73b97488ec6b90fc0d34a4a
Author: aengelke <engelke at in.tum.de>
Date: 2024-06-11 (Tue, 11 Jun 2024)
Changed paths:
M llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
Log Message:
-----------
[MC][X86] Avoid copying MCInst in emitInstrEnd (#94947)
Copying an MCInst isn't cheap (copies all operands) and the whole
instruction is only used for the Intel erratum mitigation, which is off
by default. In all other cases, the opcode alone suffices.
This slightly pessimizes code that uses moves to segment registers --
but that's uncommon and not performance-sensitive anyway.
As a related change, also call canPadInst() only when the result is
actually used, which is typically only the case in emitInstrEnd.
This gives a minor performance improvement.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list