mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-09 11:25:55 +00:00
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
This commit is contained in:
@@ -227,11 +227,16 @@ def SDNPVariadic : SDNodeProperty; // Node has variable arguments.
|
|||||||
def SDNPWantRoot : SDNodeProperty; // ComplexPattern gets the root of match
|
def SDNPWantRoot : SDNodeProperty; // ComplexPattern gets the root of match
|
||||||
def SDNPWantParent : SDNodeProperty; // ComplexPattern gets the parent
|
def SDNPWantParent : SDNodeProperty; // ComplexPattern gets the parent
|
||||||
|
|
||||||
|
//===----------------------------------------------------------------------===//
|
||||||
|
// Selection DAG Pattern Operations
|
||||||
|
class SDPatternOperator;
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// Selection DAG Node definitions.
|
// Selection DAG Node definitions.
|
||||||
//
|
//
|
||||||
class SDNode<string opcode, SDTypeProfile typeprof,
|
class SDNode<string opcode, SDTypeProfile typeprof,
|
||||||
list<SDNodeProperty> props = [], string sdclass = "SDNode"> {
|
list<SDNodeProperty> props = [], string sdclass = "SDNode">
|
||||||
|
: SDPatternOperator {
|
||||||
string Opcode = opcode;
|
string Opcode = opcode;
|
||||||
string SDClass = sdclass;
|
string SDClass = sdclass;
|
||||||
list<SDNodeProperty> Properties = props;
|
list<SDNodeProperty> Properties = props;
|
||||||
@@ -474,7 +479,7 @@ def NOOP_SDNodeXForm : SDNodeXForm<imm, [{}]>;
|
|||||||
/// DAG, frame a single node to multiply nested other fragments.
|
/// DAG, frame a single node to multiply nested other fragments.
|
||||||
///
|
///
|
||||||
class PatFrag<dag ops, dag frag, code pred = [{}],
|
class PatFrag<dag ops, dag frag, code pred = [{}],
|
||||||
SDNodeXForm xform = NOOP_SDNodeXForm> {
|
SDNodeXForm xform = NOOP_SDNodeXForm> : SDPatternOperator {
|
||||||
dag Operands = ops;
|
dag Operands = ops;
|
||||||
dag Fragment = frag;
|
dag Fragment = frag;
|
||||||
code Predicate = pred;
|
code Predicate = pred;
|
||||||
|
Reference in New Issue
Block a user