forked from OSchip/llvm-project
Rename DNVT_bool to DNVT_i1 to be consistent with type system
llvm-svn: 7768
This commit is contained in:
parent
a8ae6c570f
commit
58dc2187ac
|
@ -161,7 +161,7 @@ def DNVT_val : DagNodeValType; // A non-void type
|
||||||
def DNVT_arg0 : DagNodeValType; // Tree node returns same type as Arg0
|
def DNVT_arg0 : DagNodeValType; // Tree node returns same type as Arg0
|
||||||
def DNVT_arg1 : DagNodeValType; // Tree node returns same type as Arg1
|
def DNVT_arg1 : DagNodeValType; // Tree node returns same type as Arg1
|
||||||
def DNVT_ptr : DagNodeValType; // The target pointer type
|
def DNVT_ptr : DagNodeValType; // The target pointer type
|
||||||
def DNVT_bool : DagNodeValType; // Always returns bool
|
def DNVT_i8 : DagNodeValType; // Always have an i8 value
|
||||||
|
|
||||||
class DagNode<DagNodeValType ret, list<DagNodeValType> args> {
|
class DagNode<DagNodeValType ret, list<DagNodeValType> args> {
|
||||||
DagNodeValType RetType = ret;
|
DagNodeValType RetType = ret;
|
||||||
|
@ -197,12 +197,12 @@ def or : BuiltinDagNode<DNVT_arg0, [DNVT_arg1, DNVT_arg0], "Or">;
|
||||||
def xor : BuiltinDagNode<DNVT_arg0, [DNVT_arg1, DNVT_arg0], "Xor">;
|
def xor : BuiltinDagNode<DNVT_arg0, [DNVT_arg1, DNVT_arg0], "Xor">;
|
||||||
|
|
||||||
// Comparisons...
|
// Comparisons...
|
||||||
def seteq : BuiltinDagNode<DNVT_bool, [DNVT_arg1, DNVT_arg0], "SetEQ">;
|
def seteq : BuiltinDagNode<DNVT_i8 , [DNVT_arg1, DNVT_arg0], "SetEQ">;
|
||||||
def setne : BuiltinDagNode<DNVT_bool, [DNVT_arg1, DNVT_arg0], "SetNE">;
|
def setne : BuiltinDagNode<DNVT_i8 , [DNVT_arg1, DNVT_arg0], "SetNE">;
|
||||||
def setlt : BuiltinDagNode<DNVT_bool, [DNVT_arg1, DNVT_arg0], "SetLT">;
|
def setlt : BuiltinDagNode<DNVT_i8 , [DNVT_arg1, DNVT_arg0], "SetLT">;
|
||||||
def setle : BuiltinDagNode<DNVT_bool, [DNVT_arg1, DNVT_arg0], "SetLE">;
|
def setle : BuiltinDagNode<DNVT_i8 , [DNVT_arg1, DNVT_arg0], "SetLE">;
|
||||||
def setgt : BuiltinDagNode<DNVT_bool, [DNVT_arg1, DNVT_arg0], "SetGT">;
|
def setgt : BuiltinDagNode<DNVT_i8 , [DNVT_arg1, DNVT_arg0], "SetGT">;
|
||||||
def setge : BuiltinDagNode<DNVT_bool, [DNVT_arg1, DNVT_arg0], "SetGE">;
|
def setge : BuiltinDagNode<DNVT_i8 , [DNVT_arg1, DNVT_arg0], "SetGE">;
|
||||||
|
|
||||||
def load : BuiltinDagNode<DNVT_val, [DNVT_ptr], "Load">;
|
def load : BuiltinDagNode<DNVT_val, [DNVT_ptr], "Load">;
|
||||||
//def store : BuiltinDagNode<DNVT_Void, [DNVT_ptr, DNVT_val]>;
|
//def store : BuiltinDagNode<DNVT_Void, [DNVT_ptr, DNVT_val]>;
|
||||||
|
@ -211,7 +211,7 @@ def load : BuiltinDagNode<DNVT_val, [DNVT_ptr], "Load">;
|
||||||
def ret : BuiltinDagNode<DNVT_void, [DNVT_val], "Ret">;
|
def ret : BuiltinDagNode<DNVT_void, [DNVT_val], "Ret">;
|
||||||
def retvoid : BuiltinDagNode<DNVT_void, [], "RetVoid">;
|
def retvoid : BuiltinDagNode<DNVT_void, [], "RetVoid">;
|
||||||
def br : BuiltinDagNode<DNVT_void, [DNVT_ptr], "Br">;
|
def br : BuiltinDagNode<DNVT_void, [DNVT_ptr], "Br">;
|
||||||
def brcond : BuiltinDagNode<DNVT_void, [DNVT_bool, DNVT_ptr, DNVT_ptr],
|
def brcond : BuiltinDagNode<DNVT_void, [DNVT_i8, DNVT_ptr, DNVT_ptr],
|
||||||
"BrCond">;
|
"BrCond">;
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
|
@ -19,7 +19,7 @@ NodeType::ArgResultTypes NodeType::Translate(Record *R) {
|
||||||
if (Name == "DNVT_arg0") return Arg0;
|
if (Name == "DNVT_arg0") return Arg0;
|
||||||
if (Name == "DNVT_arg1") return Arg1;
|
if (Name == "DNVT_arg1") return Arg1;
|
||||||
if (Name == "DNVT_ptr" ) return Ptr;
|
if (Name == "DNVT_ptr" ) return Ptr;
|
||||||
if (Name == "DNVT_bool") return Bool;
|
if (Name == "DNVT_i8" ) return I8;
|
||||||
throw "Unknown DagNodeValType '" + Name + "'!";
|
throw "Unknown DagNodeValType '" + Name + "'!";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -276,7 +276,7 @@ bool Pattern::InferTypes(TreePatternNode *N, bool &MadeChange) {
|
||||||
AnyUnset |= InferTypes(Child, MadeChange);
|
AnyUnset |= InferTypes(Child, MadeChange);
|
||||||
|
|
||||||
switch (NT.ArgTypes[i]) {
|
switch (NT.ArgTypes[i]) {
|
||||||
case NodeType::Bool:
|
case NodeType::I8:
|
||||||
MadeChange |= Child->updateNodeType(MVT::i1, TheRecord->getName());
|
MadeChange |= Child->updateNodeType(MVT::i1, TheRecord->getName());
|
||||||
break;
|
break;
|
||||||
case NodeType::Arg0:
|
case NodeType::Arg0:
|
||||||
|
@ -304,7 +304,7 @@ bool Pattern::InferTypes(TreePatternNode *N, bool &MadeChange) {
|
||||||
case NodeType::Void:
|
case NodeType::Void:
|
||||||
MadeChange |= N->updateNodeType(MVT::isVoid, TheRecord->getName());
|
MadeChange |= N->updateNodeType(MVT::isVoid, TheRecord->getName());
|
||||||
break;
|
break;
|
||||||
case NodeType::Bool:
|
case NodeType::I8:
|
||||||
MadeChange |= N->updateNodeType(MVT::i1, TheRecord->getName());
|
MadeChange |= N->updateNodeType(MVT::i1, TheRecord->getName());
|
||||||
break;
|
break;
|
||||||
case NodeType::Arg0:
|
case NodeType::Arg0:
|
||||||
|
|
|
@ -25,7 +25,7 @@ struct NodeType {
|
||||||
Arg0, // Value matches the type of Arg0
|
Arg0, // Value matches the type of Arg0
|
||||||
Arg1, // Value matches the type of Arg1
|
Arg1, // Value matches the type of Arg1
|
||||||
Ptr, // Tree node is the type of the target pointer
|
Ptr, // Tree node is the type of the target pointer
|
||||||
Bool, // Always bool
|
I8, // Always bool
|
||||||
Void, // Tree node always returns void
|
Void, // Tree node always returns void
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue