diff options
author | Chris Lattner <sabre@nondot.org> | 2003-08-15 04:35:14 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-08-15 04:35:14 +0000 |
commit | b6ef5c860c6f4b85a38f32657d1a646be4c1bd9d (patch) | |
tree | 202e0cf3b877650e462b54d2b22a50c03093a9e9 | |
parent | 673537e5c000f37963a41b15079162984f9208c9 (diff) |
Add a bunch of new node types, including a new Void dummy register class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7870 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/Target.td | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/lib/Target/Target.td b/lib/Target/Target.td index b55f174314..fa040efb8a 100644 --- a/lib/Target/Target.td +++ b/lib/Target/Target.td @@ -86,6 +86,10 @@ class RegisterClass<ValueType regType, int alignment, list<Register> regList> { // Methods - This member can be used to insert arbitrary code into a generated // register class. The normal usage of this is to overload virtual methods. code Methods = [{}]; + + // isDummyClass - If this is set to true, this register class is not really + // part of the target, it is just used for other purposes. + bit isDummyClass = 0; } @@ -156,6 +160,7 @@ class Target { // DAG node definitions used by the instruction selector... // class DagNodeValType; +def DNVT_any : DagNodeValType; // No constraint on tree node def DNVT_void : DagNodeValType; // Tree node always returns void def DNVT_val : DagNodeValType; // A non-void type def DNVT_arg0 : DagNodeValType; // Tree node returns same type as Arg0 @@ -177,7 +182,14 @@ class BuiltinDagNode<DagNodeValType Ret, list<DagNodeValType> Args, } // Magic nodes... -def set : DagNode<DNVT_void, [DNVT_val, DNVT_arg0]>; +def Void : RegisterClass<isVoid,0,[]> { let isDummyClass = 1; } +def set : DagNode<DNVT_void, [DNVT_val, DNVT_arg0]>; +def chain : BuiltinDagNode<DNVT_void, [DNVT_void, DNVT_void], "ChainNode">; +def blockchain : BuiltinDagNode<DNVT_void, [DNVT_void, DNVT_void], + "BlockChainNode">; +def ChainExpander : Expander<(chain Void, Void), []>; +def BlockChainExpander : Expander<(blockchain Void, Void), []>; + // Terminals... def imm : BuiltinDagNode<DNVT_val, [], "Constant">; @@ -214,6 +226,9 @@ def br : BuiltinDagNode<DNVT_void, [DNVT_ptr], "Br">; def brcond : BuiltinDagNode<DNVT_void, [DNVT_i8, DNVT_ptr, DNVT_ptr], "BrCond">; +def unspec1 : BuiltinDagNode<DNVT_any , [DNVT_val], "Unspec1">; +def unspec2 : BuiltinDagNode<DNVT_any , [DNVT_val, DNVT_val], "Unspec2">; + //===----------------------------------------------------------------------===// // DAG nonterminals definitions used by the instruction selector... // |