[PATCH] D60695: [TableGen] AsmMatcher: allow repeated input operands.
Sjoerd Meijer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 30 00:35:52 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL362066: [TableGen] AsmMatcher: allow repeated input operands (authored by SjoerdMeijer, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D60695?vs=195153&id=202129#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60695/new/
https://reviews.llvm.org/D60695
Files:
llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp
Index: llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp
===================================================================
--- llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp
+++ llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp
@@ -1072,8 +1072,9 @@
// handle, the target should be refactored to use operands instead of
// modifiers.
//
- // Also, check for instructions which reference the operand multiple times;
- // this implies a constraint we would not honor.
+ // Also, check for instructions which reference the operand multiple times,
+ // if they don't define a custom AsmMatcher: this implies a constraint that
+ // the built-in matching code would not honor.
std::set<std::string> OperandNames;
for (const AsmOperand &Op : AsmOperands) {
StringRef Tok = Op.Token;
@@ -1083,7 +1084,8 @@
"' not supported by asm matcher. Mark isCodeGenOnly!");
// Verify that any operand is only mentioned once.
// We reject aliases and ignore instructions for now.
- if (!IsAlias && Tok[0] == '$' && !OperandNames.insert(Tok).second) {
+ if (!IsAlias && TheDef->getValueAsString("AsmMatchConverter").empty() &&
+ Tok[0] == '$' && !OperandNames.insert(Tok).second) {
LLVM_DEBUG({
errs() << "warning: '" << TheDef->getName() << "': "
<< "ignoring instruction with tied operand '"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60695.202129.patch
Type: text/x-patch
Size: 1375 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190530/307ae3e2/attachment.bin>
More information about the llvm-commits
mailing list