diff options
author | Chris Lattner <sabre@nondot.org> | 2010-10-07 00:01:00 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-10-07 00:01:00 +0000 |
commit | 82df5096eabeef337d691f97974ba32631106088 (patch) | |
tree | 0de6863a1bdec9e16b4c0f71714b36481cfb29bd | |
parent | 8f42a19fb0793e1af465e9cf315524fa81396c76 (diff) |
add a common SDPatternOperator base class to SDNode and PatFrag for
stuff that wants to take one or the other. These can both be used
as the operation of a dag in a pattern match.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115877 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Target/TargetSelectionDAG.td | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/llvm/Target/TargetSelectionDAG.td b/include/llvm/Target/TargetSelectionDAG.td index 9b996b255b2..61769560998 100644 --- a/include/llvm/Target/TargetSelectionDAG.td +++ b/include/llvm/Target/TargetSelectionDAG.td @@ -228,10 +228,15 @@ def SDNPWantRoot : SDNodeProperty; // ComplexPattern gets the root of match def SDNPWantParent : SDNodeProperty; // ComplexPattern gets the parent //===----------------------------------------------------------------------===// +// Selection DAG Pattern Operations +class SDPatternOperator; + +//===----------------------------------------------------------------------===// // Selection DAG Node definitions. // class SDNode<string opcode, SDTypeProfile typeprof, - list<SDNodeProperty> props = [], string sdclass = "SDNode"> { + list<SDNodeProperty> props = [], string sdclass = "SDNode"> + : SDPatternOperator { string Opcode = opcode; string SDClass = sdclass; list<SDNodeProperty> Properties = props; @@ -474,7 +479,7 @@ def NOOP_SDNodeXForm : SDNodeXForm<imm, [{}]>; /// DAG, frame a single node to multiply nested other fragments. /// class PatFrag<dag ops, dag frag, code pred = [{}], - SDNodeXForm xform = NOOP_SDNodeXForm> { + SDNodeXForm xform = NOOP_SDNodeXForm> : SDPatternOperator { dag Operands = ops; dag Fragment = frag; code Predicate = pred; |