[all-commits] [llvm/llvm-project] 0c049e: [MC] Always encode instruction into SmallVector
aengelke via All-commits
all-commits at lists.llvm.org
Thu Apr 6 07:22:04 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0c049ea60a9f214911eef7901b94bd6343c04409
https://github.com/llvm/llvm-project/commit/0c049ea60a9f214911eef7901b94bd6343c04409
Author: Alexis Engelke <engelke at in.tum.de>
Date: 2023-04-06 (Thu, 06 Apr 2023)
Changed paths:
M bolt/include/bolt/Core/BinaryContext.h
M bolt/lib/Core/BinaryContext.cpp
M bolt/lib/Core/BinaryFunction.cpp
M llvm/include/llvm/MC/MCCodeEmitter.h
M llvm/include/llvm/MCA/CodeEmitter.h
M llvm/lib/MC/MCAsmStreamer.cpp
M llvm/lib/MC/MCAssembler.cpp
M llvm/lib/MC/MCCodeEmitter.cpp
M llvm/lib/MC/MCELFStreamer.cpp
M llvm/lib/MC/MCMachOStreamer.cpp
M llvm/lib/MC/MCObjectStreamer.cpp
M llvm/lib/MC/MCSPIRVStreamer.cpp
M llvm/lib/MC/MCWasmStreamer.cpp
M llvm/lib/MC/MCWinCOFFStreamer.cpp
M llvm/lib/MC/MCXCOFFStreamer.cpp
M llvm/lib/MCA/CodeEmitter.cpp
M llvm/lib/Target/AMDGPU/AMDGPUMCInstLower.cpp
M llvm/lib/Target/Hexagon/MCTargetDesc/HexagonAsmBackend.cpp
M llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
M llvm/lib/Target/X86/X86MCInstLower.cpp
M llvm/tools/llvm-exegesis/lib/LlvmState.cpp
Log Message:
-----------
[MC] Always encode instruction into SmallVector
All users of MCCodeEmitter::encodeInstruction use a raw_svector_ostream
to encode the instruction into a SmallVector. The raw_ostream however
incurs some overhead for the actual encoding.
This change allows an MCCodeEmitter to directly emit an instruction into
a SmallVector without using a raw_ostream and therefore allow for
performance improvments in encoding. A default path that uses existing
raw_ostream implementations is provided.
Reviewed By: MaskRay, Amir
Differential Revision: https://reviews.llvm.org/D145791
More information about the All-commits
mailing list