[PATCH] D145791: [MC] Always encode instruction into SmallVector
Alexis Engelke via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 10 06:56:10 PST 2023
aengelke created this revision.
aengelke added reviewers: RKSimon, MaskRay, craig.topper.
Herald added subscribers: kosarev, pmatos, asb, ctetreau, foad, ThomasRaoux, kerbowa, pengfei, hiraditya, sbc100, jvesely, arsenm.
Herald added a project: All.
aengelke requested review of this revision.
Herald added subscribers: llvm-commits, aheejin.
Herald added a project: LLVM.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D145791
Files:
llvm/include/llvm/MC/MCCodeEmitter.h
llvm/include/llvm/MCA/CodeEmitter.h
llvm/lib/MC/MCAsmStreamer.cpp
llvm/lib/MC/MCAssembler.cpp
llvm/lib/MC/MCCodeEmitter.cpp
llvm/lib/MC/MCELFStreamer.cpp
llvm/lib/MC/MCMachOStreamer.cpp
llvm/lib/MC/MCObjectStreamer.cpp
llvm/lib/MC/MCSPIRVStreamer.cpp
llvm/lib/MC/MCWasmStreamer.cpp
llvm/lib/MC/MCWinCOFFStreamer.cpp
llvm/lib/MC/MCXCOFFStreamer.cpp
llvm/lib/MCA/CodeEmitter.cpp
llvm/lib/Target/AMDGPU/AMDGPUMCInstLower.cpp
llvm/lib/Target/Hexagon/MCTargetDesc/HexagonAsmBackend.cpp
llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
llvm/lib/Target/X86/X86MCInstLower.cpp
llvm/tools/llvm-exegesis/lib/LlvmState.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145791.504134.patch
Type: text/x-patch
Size: 13782 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230310/5a9c1e3d/attachment.bin>
More information about the llvm-commits
mailing list