[PATCH] D142216: [MC] Store number of implicit operands in MCInstrDesc. NFC.
Sergei Barannikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 23 12:41:47 PST 2023
barannikov88 added inline comments.
================
Comment at: llvm/utils/TableGen/InstrInfoEmitter.cpp:120
OS << "static const MCPhysReg ImplicitList" << Num << "[] = { ";
- for (Record *U : Uses)
- OS << getQualifiedName(U) << ", ";
- OS << "0 };\n";
+ for (auto &U : enumerate(Uses))
+ OS << (U.index() ? ", " : "") << getQualifiedName(U.value());
----------------
(Nit) could also use structured bindings: `for (auto [Idx, Op] : enumerate(Ops))`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142216/new/
https://reviews.llvm.org/D142216
More information about the llvm-commits
mailing list