[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:39:20 PST 2023
barannikov88 added inline comments.
================
Comment at: llvm/utils/TableGen/InstrInfoEmitter.cpp:117
static void PrintDefList(const std::vector<Record*> &Uses,
unsigned Num, raw_ostream &OS) {
----------------
This is confusing.
The name suggests it prints defs, the parameter name is `Uses`, but it really prints both.
================
Comment at: llvm/utils/TableGen/InstrInfoEmitter.cpp:1190
+ // Emit the implicit use/def list...
+ llvm::append_range(UseList, DefList);
if (UseList.empty())
----------------
barannikov88 wrote:
> I understand that the intent is to reduce code duplication, but appending Defs to Uses looks awkward.
> Can it use `llvm::concat_range`?
Never mind, the suggestion won't work since `EmittedLists` is keyed by `std::vector`, i.e. it has to be constructed anyway.
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