A new TableGen feature! (Not turned on just yet.)
authorBill Wendling <isanbard@gmail.com>
Sat, 26 Feb 2011 03:09:12 +0000 (03:09 +0000)
committerBill Wendling <isanbard@gmail.com>
Sat, 26 Feb 2011 03:09:12 +0000 (03:09 +0000)
commit7520e3a2b54aee466b458675542db692a7f31ac1
tree87a3003af063ddbe28db5b9797741c7a659db392
parente1b5aa7d86235bfdb9efa386c006efbd7ce72757
A new TableGen feature! (Not turned on just yet.)

   InstAlias<{alias}, {aliasee}>;

The InstAlias instruction should be able to go from the MCInst to the
{alias}. All of the information is there to match the MCInst with the
{aliasee}. From there, it's a simple matter to emit the {alias}, with the
correct operands from the {aliasee}.

The code this patch generates can be used by the InstPrinter to automatically
print out the alias without having to write special C++ code to handle the
situation.

This is a WIP, and therefore are several limitations. For instance, it cannot
handle AsmOperands at the moment. It also doesn't know what to do when two
{alias}es match the same {aliasee}. (Currently, it just ignores those two cases
and allows the printInstruction method to handle them.)

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