Implement *even more* factoring. In particular, if all of the instruction
authorChris Lattner <sabre@nondot.org>
Sat, 22 Jan 2005 19:22:23 +0000 (19:22 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 22 Jan 2005 19:22:23 +0000 (19:22 +0000)
commitf876668518097413a904537ce9d249953987508c
tree98bccaeedf0bd812fe7f6d7ce0025a14cf9215f1
parentd6488671736d0a5aaee1218748b94d8c68f33716
Implement *even more* factoring.  In particular, if all of the instruction
strings starts out with a constant string, we emit the string first, using
a table lookup (instead of a switch statement).

Because this is usually the opcode portion of the asm string, the differences
between the instructions have now been greatly reduced.  This allows many
more case statements to be grouped together.

This patch also allows instruction cases to be grouped together when the
instruction patterns are exactly identical (common after the opcode string
has been ripped off), and when the differing operand is a MachineInstr
operand that needs to be formatted.

The end result of this is a mean and lean generated AsmPrinter!

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