Teach TableGen to evaluate DAG expressions as set operations.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Sat, 4 Jun 2011 04:11:37 +0000 (04:11 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Sat, 4 Jun 2011 04:11:37 +0000 (04:11 +0000)
commit1de99829b6bebe3310682efac8be2a9a95323220
tree3c7002ad1d2f0b8dd9c00a9280063415bb5f42b3
parent404b53e38ca7a77c6e86596ace68f3167cd33922
Teach TableGen to evaluate DAG expressions as set operations.

A TableGen backend can define how certain classes can be expanded into
ordered sets of defs, typically by evaluating a specific field in the
record. The SetTheory class can then evaluate DAG expressions that refer
to these named sets.

A number of standard set and list operations are predefined, and the
backend can add more specialized operators if needed. The -print-sets
backend is used by SetTheory.td to provide examples.

This is intended to simplify how register classes are defined:

  def GR32_NOSP : RegisterClass<"X86", [i32], 32, (sub GR32, ESP)>;

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132621 91177308-0d34-0410-b5e6-96231b3b80d8
test/TableGen/SetTheory.td [new file with mode: 0644]
utils/TableGen/CMakeLists.txt
utils/TableGen/SetTheory.cpp [new file with mode: 0644]
utils/TableGen/SetTheory.h [new file with mode: 0644]
utils/TableGen/TableGen.cpp