mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Add support for a bool argty
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7766 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9d27514a21
commit
723915b13e
@ -19,6 +19,7 @@ NodeType::ArgResultTypes NodeType::Translate(Record *R) {
|
||||
if (Name == "DNVT_arg0") return Arg0;
|
||||
if (Name == "DNVT_arg1") return Arg1;
|
||||
if (Name == "DNVT_ptr" ) return Ptr;
|
||||
if (Name == "DNVT_bool") return Bool;
|
||||
throw "Unknown DagNodeValType '" + Name + "'!";
|
||||
}
|
||||
|
||||
@ -275,6 +276,9 @@ bool Pattern::InferTypes(TreePatternNode *N, bool &MadeChange) {
|
||||
AnyUnset |= InferTypes(Child, MadeChange);
|
||||
|
||||
switch (NT.ArgTypes[i]) {
|
||||
case NodeType::Bool:
|
||||
MadeChange |= Child->updateNodeType(MVT::i1, TheRecord->getName());
|
||||
break;
|
||||
case NodeType::Arg0:
|
||||
MadeChange |= Child->updateNodeType(N->getChild(0)->getType(),
|
||||
TheRecord->getName());
|
||||
@ -300,6 +304,9 @@ bool Pattern::InferTypes(TreePatternNode *N, bool &MadeChange) {
|
||||
case NodeType::Void:
|
||||
MadeChange |= N->updateNodeType(MVT::isVoid, TheRecord->getName());
|
||||
break;
|
||||
case NodeType::Bool:
|
||||
MadeChange |= N->updateNodeType(MVT::i1, TheRecord->getName());
|
||||
break;
|
||||
case NodeType::Arg0:
|
||||
MadeChange |= N->updateNodeType(N->getChild(0)->getType(),
|
||||
TheRecord->getName());
|
||||
|
@ -25,8 +25,7 @@ struct NodeType {
|
||||
Arg0, // Value matches the type of Arg0
|
||||
Arg1, // Value matches the type of Arg1
|
||||
Ptr, // Tree node is the type of the target pointer
|
||||
|
||||
// Return types
|
||||
Bool, // Always bool
|
||||
Void, // Tree node always returns void
|
||||
};
|
||||
|
||||
|
@ -19,6 +19,7 @@ NodeType::ArgResultTypes NodeType::Translate(Record *R) {
|
||||
if (Name == "DNVT_arg0") return Arg0;
|
||||
if (Name == "DNVT_arg1") return Arg1;
|
||||
if (Name == "DNVT_ptr" ) return Ptr;
|
||||
if (Name == "DNVT_bool") return Bool;
|
||||
throw "Unknown DagNodeValType '" + Name + "'!";
|
||||
}
|
||||
|
||||
@ -275,6 +276,9 @@ bool Pattern::InferTypes(TreePatternNode *N, bool &MadeChange) {
|
||||
AnyUnset |= InferTypes(Child, MadeChange);
|
||||
|
||||
switch (NT.ArgTypes[i]) {
|
||||
case NodeType::Bool:
|
||||
MadeChange |= Child->updateNodeType(MVT::i1, TheRecord->getName());
|
||||
break;
|
||||
case NodeType::Arg0:
|
||||
MadeChange |= Child->updateNodeType(N->getChild(0)->getType(),
|
||||
TheRecord->getName());
|
||||
@ -300,6 +304,9 @@ bool Pattern::InferTypes(TreePatternNode *N, bool &MadeChange) {
|
||||
case NodeType::Void:
|
||||
MadeChange |= N->updateNodeType(MVT::isVoid, TheRecord->getName());
|
||||
break;
|
||||
case NodeType::Bool:
|
||||
MadeChange |= N->updateNodeType(MVT::i1, TheRecord->getName());
|
||||
break;
|
||||
case NodeType::Arg0:
|
||||
MadeChange |= N->updateNodeType(N->getChild(0)->getType(),
|
||||
TheRecord->getName());
|
||||
|
@ -25,8 +25,7 @@ struct NodeType {
|
||||
Arg0, // Value matches the type of Arg0
|
||||
Arg1, // Value matches the type of Arg1
|
||||
Ptr, // Tree node is the type of the target pointer
|
||||
|
||||
// Return types
|
||||
Bool, // Always bool
|
||||
Void, // Tree node always returns void
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user