[PATCH] D81095: [TableGen] Handle (outs variable_ops)
Denis Antrushin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 4 06:31:33 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rGf2c97656644e: [TableGen] Handle (outs variable_ops) (authored by dantrushin).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81095/new/
https://reviews.llvm.org/D81095
Files:
llvm/utils/TableGen/CodeGenInstruction.cpp
Index: llvm/utils/TableGen/CodeGenInstruction.cpp
===================================================================
--- llvm/utils/TableGen/CodeGenInstruction.cpp
+++ llvm/utils/TableGen/CodeGenInstruction.cpp
@@ -56,6 +56,7 @@
std::set<std::string> OperandNames;
unsigned e = InDI->getNumArgs() + OutDI->getNumArgs();
OperandList.reserve(e);
+ bool VariadicOuts = false;
for (unsigned i = 0; i != e; ++i){
Init *ArgInit;
StringRef ArgName;
@@ -109,6 +110,8 @@
else if (Rec->isSubClassOf("OptionalDefOperand"))
hasOptionalDef = true;
} else if (Rec->getName() == "variable_ops") {
+ if (i < NumDefs)
+ VariadicOuts = true;
isVariadic = true;
continue;
} else if (Rec->isSubClassOf("RegisterClass")) {
@@ -137,6 +140,8 @@
MIOperandNo += NumOps;
}
+ if (VariadicOuts)
+ --NumDefs;
// Make sure the constraints list for each operand is large enough to hold
// constraint info, even if none is present.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81095.268453.patch
Type: text/x-patch
Size: 998 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200604/53a63833/attachment.bin>
More information about the llvm-commits
mailing list