//===- TargetGlobalISel.td - Common code for GlobalISel ----*- tablegen -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This file defines the target-independent interfaces used to support // SelectionDAG instruction selection patterns (specified in // TargetSelectionDAG.td) when generating GlobalISel instruction selectors. // // This is intended as a compatibility layer, to enable reuse of target // descriptions written for SelectionDAG without requiring explicit GlobalISel // support. It will eventually supersede SelectionDAG patterns. // //===----------------------------------------------------------------------===// // Declare that a generic Instruction is 'equivalent' to an SDNode, that is, // SelectionDAG patterns involving the SDNode can be transformed to match the // Instruction instead. class GINodeEquiv { Instruction I = i; SDNode Node = node; } def : GINodeEquiv; def : GINodeEquiv; def : GINodeEquiv; def : GINodeEquiv; def : GINodeEquiv; def : GINodeEquiv; def : GINodeEquiv; def : GINodeEquiv; def : GINodeEquiv; def : GINodeEquiv; def : GINodeEquiv; def : GINodeEquiv; def : GINodeEquiv; def : GINodeEquiv; def : GINodeEquiv; def : GINodeEquiv; // Specifies the GlobalISel equivalents for SelectionDAG's ComplexPattern. // Should be used on defs that subclass GIComplexOperandMatcher<>. class GIComplexPatternEquiv { ComplexPattern SelDAGEquivalent = seldag; }