[PATCH] D139882: [NFC][MC] `MCInst`: `Operands` small size optimization: store 10, not 8, inline `MCOperand`

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 13 05:56:57 PST 2022


lebedev.ri updated this revision to Diff 482443.
lebedev.ri retitled this revision from "[NFC][MC] `MCInst`: `Operands` small size optimization: store 16, not 8, inline `MCOperand`" to "[NFC][MC] `MCInst`: `Operands` small size optimization: store 10, not 8, inline `MCOperand`".
lebedev.ri edited the summary of this revision.
lebedev.ri added a comment.

@craig.topper good point!
`10` is still a win, and even decreases total memory footprint.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139882/new/

https://reviews.llvm.org/D139882

Files:
  llvm/include/llvm/MC/MCInst.h


Index: llvm/include/llvm/MC/MCInst.h
===================================================================
--- llvm/include/llvm/MC/MCInst.h
+++ llvm/include/llvm/MC/MCInst.h
@@ -189,7 +189,7 @@
   unsigned Flags = 0;
 
   SMLoc Loc;
-  SmallVector<MCOperand, 8> Operands;
+  SmallVector<MCOperand, 10> Operands;
 
 public:
   MCInst() = default;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139882.482443.patch
Type: text/x-patch
Size: 345 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221213/0af1aa60/attachment.bin>


More information about the llvm-commits mailing list