[PATCH] Change order of tablegen generated fastisel instruction code to be based on instruction complexity

Bill Seurer seurer at linux.vnet.ibm.com
Tue Nov 11 13:06:21 PST 2014


Hi echristo, hfinkel, wschmidt,

The order that tablegen fastisel instruction code is generated is currently based on the text of the predicate (using string lessthan).  This patch changes this to instead use the instruction complexity.  Because the complexities are not unique a C++ multimap is used instead of a map.

This fixes the problem where code with no predicate always comes out first (the empty string always compares as less than all other strings) thus making the code with predicates dead code.  See the FMUL code in PPCFastISel.cpp for an example.  It also more closely matches the normal codegen ordering.  Some error checking in the tablegen fastisel code is fixed as well.

http://reviews.llvm.org/D6220

Files:
  /home/seurer/llvm/llvm-oneoff/utils/TableGen/FastISelEmitter.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6220.16057.patch
Type: text/x-patch
Size: 7769 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141111/e20abefa/attachment.bin>


More information about the llvm-commits mailing list