[llvm-commits] [llvm] r115877 - /llvm/trunk/include/llvm/Target/TargetSelectionDAG.td
Chris Lattner
sabre at nondot.org
Wed Oct 6 17:01:00 PDT 2010
Author: lattner
Date: Wed Oct 6 19:01:00 2010
New Revision: 115877
URL: http://llvm.org/viewvc/llvm-project?rev=115877&view=rev
Log:
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.
Modified:
llvm/trunk/include/llvm/Target/TargetSelectionDAG.td
Modified: llvm/trunk/include/llvm/Target/TargetSelectionDAG.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetSelectionDAG.td?rev=115877&r1=115876&r2=115877&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/TargetSelectionDAG.td (original)
+++ llvm/trunk/include/llvm/Target/TargetSelectionDAG.td Wed Oct 6 19:01:00 2010
@@ -228,10 +228,15 @@
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 @@
/// 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;
More information about the llvm-commits
mailing list