[PATCH] D68453: TableGen: Allow 'a+b' in TableGen language
Hal Finkel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 4 08:56:17 PDT 2019
hfinkel added a comment.
How far down this road can we go? I would like to see infix operators in TableGen because I believe that it will make it easier to use. However, I'm concerned about just adding add as a special case. Of the other similar operators:
case ADD: Result = "!add"; break;
case MUL: Result = "!mul"; break;
case AND: Result = "!and"; break;
case OR: Result = "!or"; break;
case SHL: Result = "!shl"; break;
case SRA: Result = "!sra"; break;
case SRL: Result = "!srl"; break;
case EQ: Result = "!eq"; break;
case NE: Result = "!ne"; break;
case LE: Result = "!le"; break;
case LT: Result = "!lt"; break;
case GE: Result = "!ge"; break;
case GT: Result = "!gt"; break;
how many can we add as infix operators without ambiguities or other difficulties?
================
Comment at: llvm/lib/TableGen/TGParser.cpp:2103
/// ValueSuffix ::= '.' ID
///
Init *TGParser::ParseValue(Record *CurRec, RecTy *ItemType, IDParseMode Mode) {
----------------
This syntax comment here needs to be updated.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68453/new/
https://reviews.llvm.org/D68453
More information about the llvm-commits
mailing list