[PATCH] D142216: [MC] Store number of implicit operands in MCInstrDesc. NFC.

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 20 07:15:39 PST 2023


foad created this revision.
Herald added subscribers: StephenFan, qcolombet, MatzeB.
Herald added a project: All.
foad requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Combine the implicit uses and defs lists into a single list of uses
followed by defs. Instead of 0-terminating the list, store the number
of uses and defs. This avoids having to scan the whole list to find the
length and removes one pointer from MCInstrDesc (although it does not
get any smaller due to alignment issues).

Remove the old accessor methods getImplicitUses, getNumImplicitUses,
getImplicitDefs and getNumImplicitDefs as all clients are using the new
implicit_uses and implicit_defs.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D142216

Files:
  llvm/include/llvm/MC/MCInstrDesc.h
  llvm/unittests/CodeGen/MachineInstrTest.cpp
  llvm/unittests/CodeGen/RegAllocScoreTest.cpp
  llvm/utils/TableGen/InstrInfoEmitter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142216.490834.patch
Type: text/x-patch
Size: 10666 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230120/8ffe1726/attachment.bin>


More information about the llvm-commits mailing list