Teach the grouper some simple tricks about looking contradictory
authorChris Lattner <sabre@nondot.org>
Sat, 27 Feb 2010 07:49:13 +0000 (07:49 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 27 Feb 2010 07:49:13 +0000 (07:49 +0000)
commit82781b938af4057df90b5fa4035781ddc4aa681a
tree7e741bb5cf98cf25ac5ffa32d1467eb16642277f
parent2c755ba12a79e0bb2899c0bde00b2f7ea2c975a0
Teach the grouper some simple tricks about looking contradictory
predicates.  For example if we have:

Scope:
  CheckType i32
    ABC
  CheckType f32
    DEF
  CheckType i32
    GHI

Then we know that we can transform this into:
Scope:
  CheckType i32
    Scope
      ABC
      GHI
  CheckType f32
    DEF

This reorders the check for the 'GHI' predicate above
the check for the 'DEF' predidate.  However it is safe to do this
in this situation because we know that a node cannot have both an
i32 and f32 type.

We're now doing more factoring that the old isel did.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97312 91177308-0d34-0410-b5e6-96231b3b80d8
utils/TableGen/DAGISelMatcher.cpp
utils/TableGen/DAGISelMatcher.h
utils/TableGen/DAGISelMatcherOpt.cpp