Improve the AsmMatcher's ability to handle suboperands.
authorBob Wilson <bob.wilson@apple.com>
Wed, 26 Jan 2011 19:44:55 +0000 (19:44 +0000)
committerBob Wilson <bob.wilson@apple.com>
Wed, 26 Jan 2011 19:44:55 +0000 (19:44 +0000)
commita49c7dfb360154070c08b8eb94ad31711d1babae
treea6d5a0f9b3ed95e98b7a809d93f766116e3aa51f
parenteabde0cf0798e36934ffd03b071f2bd490ac1f11
Improve the AsmMatcher's ability to handle suboperands.

When an operand class is defined with MIOperandInfo set to a list of
suboperands, the AsmMatcher has so far required that operand to also define
a custom ParserMatchClass, and InstAlias patterns have not been able to
set the individual suboperands separately.  This patch removes both of those
restrictions.  If a "compound" operand does not override the default
ParserMatchClass, then the AsmMatcher will now parse its suboperands
separately.  If an InstAlias operand has the same class as the corresponding
compound operand, then it will be handled as before; but if that check fails,
TableGen will now try to match up a sequence of InstAlias operands with the
corresponding suboperands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124314 91177308-0d34-0410-b5e6-96231b3b80d8
utils/TableGen/AsmMatcherEmitter.cpp
utils/TableGen/CodeGenInstruction.cpp
utils/TableGen/CodeGenInstruction.h