[PATCH] D40030: [AArch64][TableGen] Skip tied result operands for InstAlias
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 16 06:53:27 PST 2017
fhahn added a comment.
just 2 nits that might be worth considering. Otherwise LGTM as a fix for the reverted https://reviews.llvm.org/D29219
================
Comment at: utils/TableGen/AsmWriterEmitter.cpp:823
unsigned NumMIOps = 0;
- for (auto &Operand : CGA.ResultOperands)
- NumMIOps += Operand.getMINumOperands();
+ for (unsigned i = 0, e = CGA.ResultInst->Operands.size(); i != e; ++i)
+ NumMIOps += CGA.ResultInst->Operands[i].MINumOperands;
----------------
SjoerdMeijer wrote:
> Nit: do we need to set/use 'e' here?
How about
for (auto &OpInfo : CGA.ResultInst->Operands)
NumMIOps += OpInfo.MINumOperands;
:)
================
Comment at: utils/TableGen/AsmWriterEmitter.cpp:836
+ unsigned OpNum =
+ CGA.ResultInst->Operands.getSubOperandNumber(MIOpNum).first;
+ if (CGA.ResultInst->Operands[OpNum].MINumOperands == 1 &&
----------------
nit: maybe it would be worth adding a variable for `CGA.ResultInst->Operands` and using that instead the longer explicit access
https://reviews.llvm.org/D40030
More information about the llvm-commits
mailing list