[llvm-commits] [llvm] r98918 - in /llvm/trunk/utils/TableGen: CodeGenDAGPatterns.cpp CodeGenDAGPatterns.h DAGISelMatcher.cpp

Chris Lattner sabre at nondot.org
Thu Mar 18 18:14:27 PDT 2010


Author: lattner
Date: Thu Mar 18 20:14:27 2010
New Revision: 98918

URL: http://llvm.org/viewvc/llvm-project?rev=98918&view=rev
Log:
eliminate the last use of EEVT::isUnknown


Modified:
    llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
    llvm/trunk/utils/TableGen/CodeGenDAGPatterns.h
    llvm/trunk/utils/TableGen/DAGISelMatcher.cpp

Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp?rev=98918&r1=98917&r2=98918&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp (original)
+++ llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp Thu Mar 18 20:14:27 2010
@@ -25,8 +25,6 @@
 //  EEVT::TypeSet Implementation
 //===----------------------------------------------------------------------===//
 
-// FIXME: Remove EEVT::isUnknown!
-
 static inline bool isInteger(MVT::SimpleValueType VT) {
   return EVT(VT).isInteger();
 }
@@ -97,7 +95,7 @@
 
 
 std::string EEVT::TypeSet::getName() const {
-  if (TypeVec.empty()) return "isUnknown";
+  if (TypeVec.empty()) return "<empty>";
   
   std::string Result;
     
@@ -678,8 +676,8 @@
 
 /// getKnownType - If the type constraints on this node imply a fixed type
 /// (e.g. all stores return void, etc), then return it as an
-/// MVT::SimpleValueType.  Otherwise, return EEVT::isUnknown.
-unsigned SDNodeInfo::getKnownType() const {
+/// MVT::SimpleValueType.  Otherwise, return EEVT::Other.
+MVT::SimpleValueType SDNodeInfo::getKnownType() const {
   unsigned NumResults = getNumResults();
   assert(NumResults <= 1 &&
          "We only work with nodes with zero or one result so far!");
@@ -697,7 +695,7 @@
       return MVT::iPTR;
     }
   }
-  return EEVT::isUnknown;
+  return MVT::Other;
 }
 
 //===----------------------------------------------------------------------===//
@@ -1185,7 +1183,6 @@
       MadeChange |= UpdateNodeType(getChild(0)->getExtType(), TP);
       MadeChange |= getChild(0)->UpdateNodeType(getExtType(), TP);
     }
-    
 
     unsigned ChildNo = 0;
     for (unsigned i = 0, e = Inst.getNumOperands(); i != e; ++i) {

Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenDAGPatterns.h?rev=98918&r1=98917&r2=98918&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenDAGPatterns.h (original)
+++ llvm/trunk/utils/TableGen/CodeGenDAGPatterns.h Thu Mar 18 20:14:27 2010
@@ -41,11 +41,6 @@
 /// arbitrary integer, floating-point, and vector types, so only an unknown
 /// value is needed.
 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
   /// 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
@@ -212,8 +207,8 @@
   
   /// getKnownType - If the type constraints on this node imply a fixed type
   /// (e.g. all stores return void, etc), then return it as an
-  /// MVT::SimpleValueType.  Otherwise, return EEVT::isUnknown.
-  unsigned getKnownType() const;
+  /// MVT::SimpleValueType.  Otherwise, return MVT::Other.
+  MVT::SimpleValueType getKnownType() const;
   
   /// hasProperty - Return true if this node has the specified property.
   ///

Modified: llvm/trunk/utils/TableGen/DAGISelMatcher.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcher.cpp?rev=98918&r1=98917&r2=98918&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/DAGISelMatcher.cpp (original)
+++ llvm/trunk/utils/TableGen/DAGISelMatcher.cpp Thu Mar 18 20:14:27 2010
@@ -357,14 +357,13 @@
   // ISD::STORE will never be true at the same time a check for Type i32 is.
   if (const CheckTypeMatcher *CT = dyn_cast<CheckTypeMatcher>(M)) {
     // FIXME: What result is this referring to?
-    unsigned NodeType;
+    MVT::SimpleValueType NodeType;
     if (getOpcode().getNumResults() == 0)
       NodeType = MVT::isVoid;
     else
       NodeType = getOpcode().getKnownType();
-    if (NodeType != EEVT::isUnknown)
-      return TypesAreContradictory((MVT::SimpleValueType)NodeType,
-                                   CT->getType());
+    if (NodeType != MVT::Other)
+      return TypesAreContradictory(NodeType, CT->getType());
   }
   
   return false;





More information about the llvm-commits mailing list