[TableGen][DAGISel] Dedup predicates with same code to run. NFCI.
authorAhmed Bougacha <ahmed.bougacha@gmail.com>
Thu, 27 Aug 2015 20:43:34 +0000 (20:43 +0000)
committerAhmed Bougacha <ahmed.bougacha@gmail.com>
Thu, 27 Aug 2015 20:43:34 +0000 (20:43 +0000)
commitbfe0f6957bccfcde83f323aec4d3a164bc0c3c7d
treedff016c4759602feacad06b8a021410688e55eb7
parentaa08d66b7b7acf750a6e78a34256b272d8060f61
[TableGen][DAGISel] Dedup predicates with same code to run. NFCI.

I locally hit the 255 limit, but a lot of these are redundant: each
predicate coming from a different record was allocated a new number,
even when we already emitted the same code for another predicate.

Instead, re-use numbers and emit the predicate code only once.
This reduces the total text size of *DAGISel.cpp.o by ~1%.

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