[PATCH] D48013: TableGen/SearchableTables: Support more generic enums and tables
Nicolai Hähnle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 11 05:44:43 PDT 2018
nhaehnle created this revision.
nhaehnle added reviewers: arsenm, tra, t.p.northover.
Herald added a subscriber: wdng.
This is essentially a rewrite of the backend which introduces TableGen
base classes GenericEnum, GenericTable, and SearchIndex. They allow
generating custom enums and tables with lookup functions using
separately defined records as the underlying database.
Also added as part of this change:
- Lookup functions may use indices composed of multiple fields.
- Instruction fields are supported similar to Intrinsic fields.
- When the lookup key has contiguous numeric values, the lookup function will directly index into the table instead of using a binary search.
The existing SearchableTable functionality is internally mapped to the
new primitives.
Change-Id: I444f3490fa1dbfb262d7286a1660a2c4308e9932
Repository:
rL LLVM
https://reviews.llvm.org/D48013
Files:
docs/TableGen/BackEnds.rst
include/llvm/TableGen/SearchableTable.td
test/TableGen/generic-tables-instruction.td
test/TableGen/generic-tables.td
test/TableGen/searchabletables-intrinsic.td
utils/TableGen/SearchableTableEmitter.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48013.150720.patch
Type: text/x-patch
Size: 48935 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180611/e4d7f636/attachment.bin>
More information about the llvm-commits
mailing list