[PATCH] D78180: [X86][MC] Reduce the parameters of functions in X86MCCodeEmitter(Part I)
Kan Shengchen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 15 00:30:06 PDT 2020
skan created this revision.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
The function in X86MCCodeEmitter has too many parameters to make it look
messy, and some parameters are unnecessary. This is the first patch to
reduce their parameters.
The follwing operations are cheap
unsigned Opcode = MI.getOpcode();
const MCInstrDesc &Desc = MCII.get(Opcode);
uint64_t TSFlags = Desc.TSFlags;
So if we pass a `MCInst`, we don't need to pass `MCInstrDesc`;
if we pass a `MCInstrDesc`, we don't need to pass `TSFlags`.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D78180
Files:
llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78180.257608.patch
Type: text/x-patch
Size: 6442 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200415/80312cd7/attachment.bin>
More information about the llvm-commits
mailing list