[PATCH] D137549: [AsmParser] Match mandatory operands following optional operands.
Ivan Kosarev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 8 05:57:57 PST 2022
kosarev marked 4 inline comments as done.
kosarev added a comment.
Regarding how useful it might be for other backends, feels like matching all operands may actually be that least confusing default behaviour to be expected by default?
The generated code now reads:
if (ActualIdx >= Operands.size()) {
DEBUG_WITH_TYPE("asm-matcher", dbgs() << "actual operand index out of range\n");
if (Formal == InvalidMatchClass) {
OptionalOperandsMask.set(FormalIdx, 26);
break;
}
if (isSubclass(Formal, OptionalMatchClass)) {
OptionalOperandsMask.set(FormalIdx);
continue;
}
OperandsValid = false;
ErrorInfo = ActualIdx;
break;
}
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137549/new/
https://reviews.llvm.org/D137549
More information about the llvm-commits
mailing list