forked from OSchip/llvm-project
eliminate the last use of EEVT::isUnknown
llvm-svn: 98918
This commit is contained in:
parent
fbd0109ca4
commit
da5b4ad03e
|
@ -25,8 +25,6 @@ using namespace llvm;
|
||||||
// EEVT::TypeSet Implementation
|
// EEVT::TypeSet Implementation
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
// FIXME: Remove EEVT::isUnknown!
|
|
||||||
|
|
||||||
static inline bool isInteger(MVT::SimpleValueType VT) {
|
static inline bool isInteger(MVT::SimpleValueType VT) {
|
||||||
return EVT(VT).isInteger();
|
return EVT(VT).isInteger();
|
||||||
}
|
}
|
||||||
|
@ -97,7 +95,7 @@ bool EEVT::TypeSet::hasVectorTypes() const {
|
||||||
|
|
||||||
|
|
||||||
std::string EEVT::TypeSet::getName() const {
|
std::string EEVT::TypeSet::getName() const {
|
||||||
if (TypeVec.empty()) return "isUnknown";
|
if (TypeVec.empty()) return "<empty>";
|
||||||
|
|
||||||
std::string Result;
|
std::string Result;
|
||||||
|
|
||||||
|
@ -678,8 +676,8 @@ SDNodeInfo::SDNodeInfo(Record *R) : Def(R) {
|
||||||
|
|
||||||
/// getKnownType - If the type constraints on this node imply a fixed type
|
/// getKnownType - If the type constraints on this node imply a fixed type
|
||||||
/// (e.g. all stores return void, etc), then return it as an
|
/// (e.g. all stores return void, etc), then return it as an
|
||||||
/// MVT::SimpleValueType. Otherwise, return EEVT::isUnknown.
|
/// MVT::SimpleValueType. Otherwise, return EEVT::Other.
|
||||||
unsigned SDNodeInfo::getKnownType() const {
|
MVT::SimpleValueType SDNodeInfo::getKnownType() const {
|
||||||
unsigned NumResults = getNumResults();
|
unsigned NumResults = getNumResults();
|
||||||
assert(NumResults <= 1 &&
|
assert(NumResults <= 1 &&
|
||||||
"We only work with nodes with zero or one result so far!");
|
"We only work with nodes with zero or one result so far!");
|
||||||
|
@ -697,7 +695,7 @@ unsigned SDNodeInfo::getKnownType() const {
|
||||||
return MVT::iPTR;
|
return MVT::iPTR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return EEVT::isUnknown;
|
return MVT::Other;
|
||||||
}
|
}
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
@ -1185,7 +1183,6 @@ bool TreePatternNode::ApplyTypeConstraints(TreePattern &TP, bool NotRegisters) {
|
||||||
MadeChange |= UpdateNodeType(getChild(0)->getExtType(), TP);
|
MadeChange |= UpdateNodeType(getChild(0)->getExtType(), TP);
|
||||||
MadeChange |= getChild(0)->UpdateNodeType(getExtType(), TP);
|
MadeChange |= getChild(0)->UpdateNodeType(getExtType(), TP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
unsigned ChildNo = 0;
|
unsigned ChildNo = 0;
|
||||||
for (unsigned i = 0, e = Inst.getNumOperands(); i != e; ++i) {
|
for (unsigned i = 0, e = Inst.getNumOperands(); i != e; ++i) {
|
||||||
|
|
|
@ -41,11 +41,6 @@ namespace llvm {
|
||||||
/// arbitrary integer, floating-point, and vector types, so only an unknown
|
/// arbitrary integer, floating-point, and vector types, so only an unknown
|
||||||
/// value is needed.
|
/// value is needed.
|
||||||
namespace EEVT {
|
namespace EEVT {
|
||||||
enum DAGISelGenValueType {
|
|
||||||
// FIXME: Remove EEVT::isUnknown!
|
|
||||||
isUnknown = MVT::LAST_VALUETYPE
|
|
||||||
};
|
|
||||||
|
|
||||||
/// TypeSet - This is either empty if it's completely unknown, or holds a set
|
/// TypeSet - This is either empty if it's completely unknown, or holds a set
|
||||||
/// of types. It is used during type inference because register classes can
|
/// of types. It is used during type inference because register classes can
|
||||||
/// have multiple possible types and we don't know which one they get until
|
/// have multiple possible types and we don't know which one they get until
|
||||||
|
@ -212,8 +207,8 @@ public:
|
||||||
|
|
||||||
/// getKnownType - If the type constraints on this node imply a fixed type
|
/// getKnownType - If the type constraints on this node imply a fixed type
|
||||||
/// (e.g. all stores return void, etc), then return it as an
|
/// (e.g. all stores return void, etc), then return it as an
|
||||||
/// MVT::SimpleValueType. Otherwise, return EEVT::isUnknown.
|
/// MVT::SimpleValueType. Otherwise, return MVT::Other.
|
||||||
unsigned getKnownType() const;
|
MVT::SimpleValueType getKnownType() const;
|
||||||
|
|
||||||
/// hasProperty - Return true if this node has the specified property.
|
/// hasProperty - Return true if this node has the specified property.
|
||||||
///
|
///
|
||||||
|
|
|
@ -357,14 +357,13 @@ bool CheckOpcodeMatcher::isContradictoryImpl(const Matcher *M) const {
|
||||||
// ISD::STORE will never be true at the same time a check for Type i32 is.
|
// ISD::STORE will never be true at the same time a check for Type i32 is.
|
||||||
if (const CheckTypeMatcher *CT = dyn_cast<CheckTypeMatcher>(M)) {
|
if (const CheckTypeMatcher *CT = dyn_cast<CheckTypeMatcher>(M)) {
|
||||||
// FIXME: What result is this referring to?
|
// FIXME: What result is this referring to?
|
||||||
unsigned NodeType;
|
MVT::SimpleValueType NodeType;
|
||||||
if (getOpcode().getNumResults() == 0)
|
if (getOpcode().getNumResults() == 0)
|
||||||
NodeType = MVT::isVoid;
|
NodeType = MVT::isVoid;
|
||||||
else
|
else
|
||||||
NodeType = getOpcode().getKnownType();
|
NodeType = getOpcode().getKnownType();
|
||||||
if (NodeType != EEVT::isUnknown)
|
if (NodeType != MVT::Other)
|
||||||
return TypesAreContradictory((MVT::SimpleValueType)NodeType,
|
return TypesAreContradictory(NodeType, CT->getType());
|
||||||
CT->getType());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue