diff options
author | aengelke <engelke@in.tum.de> | 2024-06-11 13:10:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-11 13:10:36 +0200 |
commit | fc6e97cf2f28a9c7a73b97488ec6b90fc0d34a4a (patch) | |
tree | a94c753eba4cf22710f034e3bdf2d18c8580192a /llvm/lib/IR/Module.cpp | |
parent | 214ff5036cb407222e6ff34ef2c1eeef55c70b4a (diff) | |
download | llvm-fc6e97cf2f28a9c7a73b97488ec6b90fc0d34a4a.zip llvm-fc6e97cf2f28a9c7a73b97488ec6b90fc0d34a4a.tar.gz llvm-fc6e97cf2f28a9c7a73b97488ec6b90fc0d34a4a.tar.bz2 |
[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.
Diffstat (limited to 'llvm/lib/IR/Module.cpp')
0 files changed, 0 insertions, 0 deletions