Rename MVT to EVT, in preparation for splitting SimpleValueType out into its own struct type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78610 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/utils/TableGen/CallingConvEmitter.cpp b/utils/TableGen/CallingConvEmitter.cpp
index 5879c41..df962c7 100644
--- a/utils/TableGen/CallingConvEmitter.cpp
+++ b/utils/TableGen/CallingConvEmitter.cpp
@@ -26,9 +26,9 @@
   // other.
   for (unsigned i = 0, e = CCs.size(); i != e; ++i) {
     O << "static bool " << CCs[i]->getName()
-      << "(unsigned ValNo, MVT ValVT,\n"
+      << "(unsigned ValNo, EVT ValVT,\n"
       << std::string(CCs[i]->getName().size()+13, ' ')
-      << "MVT LocVT, CCValAssign::LocInfo LocInfo,\n"
+      << "EVT LocVT, CCValAssign::LocInfo LocInfo,\n"
       << std::string(CCs[i]->getName().size()+13, ' ')
       << "ISD::ArgFlagsTy ArgFlags, CCState &State);\n";
   }
@@ -44,9 +44,9 @@
   Counter = 0;
 
   O << "\n\nstatic bool " << CC->getName()
-    << "(unsigned ValNo, MVT ValVT,\n"
+    << "(unsigned ValNo, EVT ValVT,\n"
     << std::string(CC->getName().size()+13, ' ')
-    << "MVT LocVT, CCValAssign::LocInfo LocInfo,\n"
+    << "EVT LocVT, CCValAssign::LocInfo LocInfo,\n"
     << std::string(CC->getName().size()+13, ' ')
     << "ISD::ArgFlagsTy ArgFlags, CCState &State) {\n";
   // Emit all of the actions, in order.
@@ -163,12 +163,12 @@
         O << Size << ", ";
       else
         O << "\n" << IndentStr << "  State.getTarget().getTargetData()"
-          "->getTypeAllocSize(LocVT.getTypeForMVT()), ";
+          "->getTypeAllocSize(LocVT.getTypeForEVT()), ";
       if (Align)
         O << Align;
       else
         O << "\n" << IndentStr << "  State.getTarget().getTargetData()"
-          "->getABITypeAlignment(LocVT.getTypeForMVT())";
+          "->getABITypeAlignment(LocVT.getTypeForEVT())";
       O << ");\n" << IndentStr
         << "State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset"
         << Counter << ", LocVT, LocInfo));\n";
diff --git a/utils/TableGen/CodeGenDAGPatterns.cpp b/utils/TableGen/CodeGenDAGPatterns.cpp
index 2423ff9..05ede6c 100644
--- a/utils/TableGen/CodeGenDAGPatterns.cpp
+++ b/utils/TableGen/CodeGenDAGPatterns.cpp
@@ -27,9 +27,9 @@
 /// FilterVTs - Filter a list of VT's according to a predicate.
 ///
 template<typename T>
-static std::vector<MVT::SimpleValueType>
-FilterVTs(const std::vector<MVT::SimpleValueType> &InVTs, T Filter) {
-  std::vector<MVT::SimpleValueType> Result;
+static std::vector<EVT::SimpleValueType>
+FilterVTs(const std::vector<EVT::SimpleValueType> &InVTs, T Filter) {
+  std::vector<EVT::SimpleValueType> Result;
   for (unsigned i = 0, e = InVTs.size(); i != e; ++i)
     if (Filter(InVTs[i]))
       Result.push_back(InVTs[i]);
@@ -41,29 +41,29 @@
 FilterEVTs(const std::vector<unsigned char> &InVTs, T Filter) {
   std::vector<unsigned char> Result;
   for (unsigned i = 0, e = InVTs.size(); i != e; ++i)
-    if (Filter((MVT::SimpleValueType)InVTs[i]))
+    if (Filter((EVT::SimpleValueType)InVTs[i]))
       Result.push_back(InVTs[i]);
   return Result;
 }
 
 static std::vector<unsigned char>
-ConvertVTs(const std::vector<MVT::SimpleValueType> &InVTs) {
+ConvertVTs(const std::vector<EVT::SimpleValueType> &InVTs) {
   std::vector<unsigned char> Result;
   for (unsigned i = 0, e = InVTs.size(); i != e; ++i)
     Result.push_back(InVTs[i]);
   return Result;
 }
 
-static inline bool isInteger(MVT::SimpleValueType VT) {
-  return MVT(VT).isInteger();
+static inline bool isInteger(EVT::SimpleValueType VT) {
+  return EVT(VT).isInteger();
 }
 
-static inline bool isFloatingPoint(MVT::SimpleValueType VT) {
-  return MVT(VT).isFloatingPoint();
+static inline bool isFloatingPoint(EVT::SimpleValueType VT) {
+  return EVT(VT).isFloatingPoint();
 }
 
-static inline bool isVector(MVT::SimpleValueType VT) {
-  return MVT(VT).isVector();
+static inline bool isVector(EVT::SimpleValueType VT) {
+  return EVT(VT).isVector();
 }
 
 static bool LHSIsSubsetOfRHS(const std::vector<unsigned char> &LHS,
@@ -76,7 +76,7 @@
 }
 
 namespace llvm {
-namespace EMVT {
+namespace EEVT {
 /// isExtIntegerInVTs - Return true if the specified extended value type vector
 /// contains isInt or an integer value type.
 bool isExtIntegerInVTs(const std::vector<unsigned char> &EVTs) {
@@ -90,7 +90,7 @@
   assert(!EVTs.empty() && "Cannot check for integer in empty ExtVT list!");
   return EVTs[0] == isFP || !(FilterEVTs(EVTs, isFloatingPoint).empty());
 }
-} // end namespace EMVT.
+} // end namespace EEVT.
 } // end namespace llvm.
 
 
@@ -254,27 +254,27 @@
     return NodeToApply->UpdateNodeType(x.SDTCisVT_Info.VT, TP);
   case SDTCisPtrTy: {
     // Operand must be same as target pointer type.
-    return NodeToApply->UpdateNodeType(MVT::iPTR, TP);
+    return NodeToApply->UpdateNodeType(EVT::iPTR, TP);
   }
   case SDTCisInt: {
     // If there is only one integer type supported, this must be it.
-    std::vector<MVT::SimpleValueType> IntVTs =
+    std::vector<EVT::SimpleValueType> IntVTs =
       FilterVTs(CGT.getLegalValueTypes(), isInteger);
 
     // If we found exactly one supported integer type, apply it.
     if (IntVTs.size() == 1)
       return NodeToApply->UpdateNodeType(IntVTs[0], TP);
-    return NodeToApply->UpdateNodeType(EMVT::isInt, TP);
+    return NodeToApply->UpdateNodeType(EEVT::isInt, TP);
   }
   case SDTCisFP: {
     // If there is only one FP type supported, this must be it.
-    std::vector<MVT::SimpleValueType> FPVTs =
+    std::vector<EVT::SimpleValueType> FPVTs =
       FilterVTs(CGT.getLegalValueTypes(), isFloatingPoint);
         
     // If we found exactly one supported FP type, apply it.
     if (FPVTs.size() == 1)
       return NodeToApply->UpdateNodeType(FPVTs[0], TP);
-    return NodeToApply->UpdateNodeType(EMVT::isFP, TP);
+    return NodeToApply->UpdateNodeType(EEVT::isFP, TP);
   }
   case SDTCisSameAs: {
     TreePatternNode *OtherNode =
@@ -290,7 +290,7 @@
         !static_cast<DefInit*>(NodeToApply->getLeafValue())->getDef()
                ->isSubClassOf("ValueType"))
       TP.error(N->getOperator()->getName() + " expects a VT operand!");
-    MVT::SimpleValueType VT =
+    EVT::SimpleValueType VT =
      getValueType(static_cast<DefInit*>(NodeToApply->getLeafValue())->getDef());
     if (!isInteger(VT))
       TP.error(N->getOperator()->getName() + " VT operand must be integer!");
@@ -300,14 +300,14 @@
     
     // It must be integer.
     bool MadeChange = false;
-    MadeChange |= OtherNode->UpdateNodeType(EMVT::isInt, TP);
+    MadeChange |= OtherNode->UpdateNodeType(EEVT::isInt, TP);
     
     // This code only handles nodes that have one type set.  Assert here so
     // that we can change this if we ever need to deal with multiple value
     // types at this point.
     assert(OtherNode->getExtTypes().size() == 1 && "Node has too many types!");
     if (OtherNode->hasTypeSet() && OtherNode->getTypeNum(0) <= VT)
-      OtherNode->UpdateNodeType(MVT::Other, TP);  // Throw an error.
+      OtherNode->UpdateNodeType(EVT::Other, TP);  // Throw an error.
     return false;
   }
   case SDTCisOpSmallerThanOp: {
@@ -320,25 +320,25 @@
     // This code does not currently handle nodes which have multiple types,
     // where some types are integer, and some are fp.  Assert that this is not
     // the case.
-    assert(!(EMVT::isExtIntegerInVTs(NodeToApply->getExtTypes()) &&
-             EMVT::isExtFloatingPointInVTs(NodeToApply->getExtTypes())) &&
-           !(EMVT::isExtIntegerInVTs(BigOperand->getExtTypes()) &&
-             EMVT::isExtFloatingPointInVTs(BigOperand->getExtTypes())) &&
+    assert(!(EEVT::isExtIntegerInVTs(NodeToApply->getExtTypes()) &&
+             EEVT::isExtFloatingPointInVTs(NodeToApply->getExtTypes())) &&
+           !(EEVT::isExtIntegerInVTs(BigOperand->getExtTypes()) &&
+             EEVT::isExtFloatingPointInVTs(BigOperand->getExtTypes())) &&
            "SDTCisOpSmallerThanOp does not handle mixed int/fp types!");
-    if (EMVT::isExtIntegerInVTs(NodeToApply->getExtTypes()))
-      MadeChange |= BigOperand->UpdateNodeType(EMVT::isInt, TP);
-    else if (EMVT::isExtFloatingPointInVTs(NodeToApply->getExtTypes()))
-      MadeChange |= BigOperand->UpdateNodeType(EMVT::isFP, TP);
-    if (EMVT::isExtIntegerInVTs(BigOperand->getExtTypes()))
-      MadeChange |= NodeToApply->UpdateNodeType(EMVT::isInt, TP);
-    else if (EMVT::isExtFloatingPointInVTs(BigOperand->getExtTypes()))
-      MadeChange |= NodeToApply->UpdateNodeType(EMVT::isFP, TP);
+    if (EEVT::isExtIntegerInVTs(NodeToApply->getExtTypes()))
+      MadeChange |= BigOperand->UpdateNodeType(EEVT::isInt, TP);
+    else if (EEVT::isExtFloatingPointInVTs(NodeToApply->getExtTypes()))
+      MadeChange |= BigOperand->UpdateNodeType(EEVT::isFP, TP);
+    if (EEVT::isExtIntegerInVTs(BigOperand->getExtTypes()))
+      MadeChange |= NodeToApply->UpdateNodeType(EEVT::isInt, TP);
+    else if (EEVT::isExtFloatingPointInVTs(BigOperand->getExtTypes()))
+      MadeChange |= NodeToApply->UpdateNodeType(EEVT::isFP, TP);
 
-    std::vector<MVT::SimpleValueType> VTs = CGT.getLegalValueTypes();
+    std::vector<EVT::SimpleValueType> VTs = CGT.getLegalValueTypes();
 
-    if (EMVT::isExtIntegerInVTs(NodeToApply->getExtTypes())) {
+    if (EEVT::isExtIntegerInVTs(NodeToApply->getExtTypes())) {
       VTs = FilterVTs(VTs, isInteger);
-    } else if (EMVT::isExtFloatingPointInVTs(NodeToApply->getExtTypes())) {
+    } else if (EEVT::isExtFloatingPointInVTs(NodeToApply->getExtTypes())) {
       VTs = FilterVTs(VTs, isFloatingPoint);
     } else {
       VTs.clear();
@@ -349,7 +349,7 @@
     case 0: break;   // No info yet.
     case 1: 
       // Only one VT of this flavor.  Cannot ever satisfy the constraints.
-      return NodeToApply->UpdateNodeType(MVT::Other, TP);  // throw
+      return NodeToApply->UpdateNodeType(EVT::Other, TP);  // throw
     case 2:
       // If we have exactly two possible types, the little operand must be the
       // small one, the big operand should be the big one.  Common with 
@@ -368,7 +368,7 @@
     if (OtherOperand->hasTypeSet()) {
       if (!isVector(OtherOperand->getTypeNum(0)))
         TP.error(N->getOperator()->getName() + " VT operand must be a vector!");
-      MVT IVT = OtherOperand->getTypeNum(0);
+      EVT IVT = OtherOperand->getTypeNum(0);
       IVT = IVT.getVectorElementType();
       return NodeToApply->UpdateNodeType(IVT.getSimpleVT(), TP);
     }
@@ -445,18 +445,18 @@
                                      TreePattern &TP) {
   assert(!ExtVTs.empty() && "Cannot update node type with empty type vector!");
   
-  if (ExtVTs[0] == EMVT::isUnknown || LHSIsSubsetOfRHS(getExtTypes(), ExtVTs))
+  if (ExtVTs[0] == EEVT::isUnknown || LHSIsSubsetOfRHS(getExtTypes(), ExtVTs))
     return false;
   if (isTypeCompletelyUnknown() || LHSIsSubsetOfRHS(ExtVTs, getExtTypes())) {
     setTypes(ExtVTs);
     return true;
   }
 
-  if (getExtTypeNum(0) == MVT::iPTR || getExtTypeNum(0) == MVT::iPTRAny) {
-    if (ExtVTs[0] == MVT::iPTR || ExtVTs[0] == MVT::iPTRAny ||
-        ExtVTs[0] == EMVT::isInt)
+  if (getExtTypeNum(0) == EVT::iPTR || getExtTypeNum(0) == EVT::iPTRAny) {
+    if (ExtVTs[0] == EVT::iPTR || ExtVTs[0] == EVT::iPTRAny ||
+        ExtVTs[0] == EEVT::isInt)
       return false;
-    if (EMVT::isExtIntegerInVTs(ExtVTs)) {
+    if (EEVT::isExtIntegerInVTs(ExtVTs)) {
       std::vector<unsigned char> FVTs = FilterEVTs(ExtVTs, isInteger);
       if (FVTs.size()) {
         setTypes(ExtVTs);
@@ -465,8 +465,8 @@
     }
   }
 
-  if ((ExtVTs[0] == EMVT::isInt || ExtVTs[0] == MVT::iAny) &&
-      EMVT::isExtIntegerInVTs(getExtTypes())) {
+  if ((ExtVTs[0] == EEVT::isInt || ExtVTs[0] == EVT::iAny) &&
+      EEVT::isExtIntegerInVTs(getExtTypes())) {
     assert(hasTypeSet() && "should be handled above!");
     std::vector<unsigned char> FVTs = FilterEVTs(getExtTypes(), isInteger);
     if (getExtTypes() == FVTs)
@@ -474,8 +474,8 @@
     setTypes(FVTs);
     return true;
   }
-  if ((ExtVTs[0] == MVT::iPTR || ExtVTs[0] == MVT::iPTRAny) &&
-      EMVT::isExtIntegerInVTs(getExtTypes())) {
+  if ((ExtVTs[0] == EVT::iPTR || ExtVTs[0] == EVT::iPTRAny) &&
+      EEVT::isExtIntegerInVTs(getExtTypes())) {
     //assert(hasTypeSet() && "should be handled above!");
     std::vector<unsigned char> FVTs = FilterEVTs(getExtTypes(), isInteger);
     if (getExtTypes() == FVTs)
@@ -485,8 +485,8 @@
       return true;
     }
   }      
-  if ((ExtVTs[0] == EMVT::isFP || ExtVTs[0] == MVT::fAny) &&
-      EMVT::isExtFloatingPointInVTs(getExtTypes())) {
+  if ((ExtVTs[0] == EEVT::isFP || ExtVTs[0] == EVT::fAny) &&
+      EEVT::isExtFloatingPointInVTs(getExtTypes())) {
     assert(hasTypeSet() && "should be handled above!");
     std::vector<unsigned char> FVTs =
       FilterEVTs(getExtTypes(), isFloatingPoint);
@@ -501,15 +501,15 @@
   //
   // Similarly, we should probably set the type here to the intersection of
   // {isInt|isFP} and ExtVTs
-  if (((getExtTypeNum(0) == EMVT::isInt || getExtTypeNum(0) == MVT::iAny) &&
-       EMVT::isExtIntegerInVTs(ExtVTs)) ||
-      ((getExtTypeNum(0) == EMVT::isFP || getExtTypeNum(0) == MVT::fAny) &&
-       EMVT::isExtFloatingPointInVTs(ExtVTs))) {
+  if (((getExtTypeNum(0) == EEVT::isInt || getExtTypeNum(0) == EVT::iAny) &&
+       EEVT::isExtIntegerInVTs(ExtVTs)) ||
+      ((getExtTypeNum(0) == EEVT::isFP || getExtTypeNum(0) == EVT::fAny) &&
+       EEVT::isExtFloatingPointInVTs(ExtVTs))) {
     setTypes(ExtVTs);
     return true;
   }
-  if (getExtTypeNum(0) == EMVT::isInt &&
-      (ExtVTs[0] == MVT::iPTR || ExtVTs[0] == MVT::iPTRAny)) {
+  if (getExtTypeNum(0) == EEVT::isInt &&
+      (ExtVTs[0] == EVT::iPTR || ExtVTs[0] == EVT::iPTRAny)) {
     setTypes(ExtVTs);
     return true;
   }
@@ -536,16 +536,16 @@
   // FIXME: At some point we should handle printing all the value types for 
   // nodes that are multiply typed.
   switch (getExtTypeNum(0)) {
-  case MVT::Other: OS << ":Other"; break;
-  case EMVT::isInt: OS << ":isInt"; break;
-  case EMVT::isFP : OS << ":isFP"; break;
-  case EMVT::isUnknown: ; /*OS << ":?";*/ break;
-  case MVT::iPTR:  OS << ":iPTR"; break;
-  case MVT::iPTRAny:  OS << ":iPTRAny"; break;
+  case EVT::Other: OS << ":Other"; break;
+  case EEVT::isInt: OS << ":isInt"; break;
+  case EEVT::isFP : OS << ":isFP"; break;
+  case EEVT::isUnknown: ; /*OS << ":?";*/ break;
+  case EVT::iPTR:  OS << ":iPTR"; break;
+  case EVT::iPTRAny:  OS << ":iPTRAny"; break;
   default: {
     std::string VTName = llvm::getName(getTypeNum(0));
-    // Strip off MVT:: prefix if present.
-    if (VTName.substr(0,5) == "MVT::")
+    // Strip off EVT:: prefix if present.
+    if (VTName.substr(0,5) == "EVT::")
       VTName = VTName.substr(5);
     OS << ":" << VTName;
     break;
@@ -726,8 +726,8 @@
 static std::vector<unsigned char> getImplicitType(Record *R, bool NotRegisters,
                                       TreePattern &TP) {
   // Some common return values
-  std::vector<unsigned char> Unknown(1, EMVT::isUnknown);
-  std::vector<unsigned char> Other(1, MVT::Other);
+  std::vector<unsigned char> Unknown(1, EEVT::isUnknown);
+  std::vector<unsigned char> Other(1, EVT::Other);
 
   // Check to see if this is a register or a register class...
   if (R->isSubClassOf("RegisterClass")) {
@@ -754,7 +754,7 @@
     ComplexPat(1, TP.getDAGPatterns().getComplexPattern(R).getValueType());
     return ComplexPat;
   } else if (R->isSubClassOf("PointerLikeRegClass")) {
-    Other[0] = MVT::iPTR;
+    Other[0] = EVT::iPTR;
     return Other;
   } else if (R->getName() == "node" || R->getName() == "srcvalue" ||
              R->getName() == "zero_reg") {
@@ -803,20 +803,20 @@
       return UpdateNodeType(getImplicitType(DI->getDef(), NotRegisters, TP),TP);
     } else if (IntInit *II = dynamic_cast<IntInit*>(getLeafValue())) {
       // Int inits are always integers. :)
-      bool MadeChange = UpdateNodeType(EMVT::isInt, TP);
+      bool MadeChange = UpdateNodeType(EEVT::isInt, TP);
       
       if (hasTypeSet()) {
         // At some point, it may make sense for this tree pattern to have
         // multiple types.  Assert here that it does not, so we revisit this
         // code when appropriate.
         assert(getExtTypes().size() >= 1 && "TreePattern doesn't have a type!");
-        MVT::SimpleValueType VT = getTypeNum(0);
+        EVT::SimpleValueType VT = getTypeNum(0);
         for (unsigned i = 1, e = getExtTypes().size(); i != e; ++i)
           assert(getTypeNum(i) == VT && "TreePattern has too many types!");
         
         VT = getTypeNum(0);
-        if (VT != MVT::iPTR && VT != MVT::iPTRAny) {
-          unsigned Size = MVT(VT).getSizeInBits();
+        if (VT != EVT::iPTR && VT != EVT::iPTRAny) {
+          unsigned Size = EVT(VT).getSizeInBits();
           // Make sure that the value is representable for this type.
           if (Size < 32) {
             int Val = (II->getValue() << (32-Size)) >> (32-Size);
@@ -856,7 +856,7 @@
                                                 TP);
       MadeChange |= getChild(NC-1)->UpdateNodeType(getChild(i)->getExtTypes(),
                                                    TP);
-      MadeChange |= UpdateNodeType(MVT::isVoid, TP);
+      MadeChange |= UpdateNodeType(EVT::isVoid, TP);
     }
     return MadeChange;
   } else if (getOperator()->getName() == "implicit" ||
@@ -864,7 +864,7 @@
     bool MadeChange = false;
     for (unsigned i = 0; i < getNumChildren(); ++i)
       MadeChange = getChild(i)->ApplyTypeConstraints(TP, NotRegisters);
-    MadeChange |= UpdateNodeType(MVT::isVoid, TP);
+    MadeChange |= UpdateNodeType(EVT::isVoid, TP);
     return MadeChange;
   } else if (getOperator()->getName() == "COPY_TO_REGCLASS") {
     bool MadeChange = false;
@@ -888,10 +888,10 @@
                utostr(getNumChildren() - 1) + " operands!");
 
     // Apply type info to the intrinsic ID.
-    MadeChange |= getChild(0)->UpdateNodeType(MVT::iPTR, TP);
+    MadeChange |= getChild(0)->UpdateNodeType(EVT::iPTR, TP);
     
     for (unsigned i = NumRetVTs, e = getNumChildren(); i != e; ++i) {
-      MVT::SimpleValueType OpVT = Int->IS.ParamVTs[i - NumRetVTs];
+      EVT::SimpleValueType OpVT = Int->IS.ParamVTs[i - NumRetVTs];
       MadeChange |= getChild(i)->UpdateNodeType(OpVT, TP);
       MadeChange |= getChild(i)->ApplyTypeConstraints(TP, NotRegisters);
     }
@@ -905,7 +905,7 @@
     // Branch, etc. do not produce results and top-level forms in instr pattern
     // must have void types.
     if (NI.getNumResults() == 0)
-      MadeChange |= UpdateNodeType(MVT::isVoid, TP);
+      MadeChange |= UpdateNodeType(EVT::isVoid, TP);
     
     return MadeChange;  
   } else if (getOperator()->isSubClassOf("Instruction")) {
@@ -920,17 +920,17 @@
       CDP.getTargetInfo().getInstruction(getOperator()->getName());
     // Apply the result type to the node
     if (NumResults == 0 || InstInfo.NumDefs == 0) {
-      MadeChange = UpdateNodeType(MVT::isVoid, TP);
+      MadeChange = UpdateNodeType(EVT::isVoid, TP);
     } else {
       Record *ResultNode = Inst.getResult(0);
       
       if (ResultNode->isSubClassOf("PointerLikeRegClass")) {
         std::vector<unsigned char> VT;
-        VT.push_back(MVT::iPTR);
+        VT.push_back(EVT::iPTR);
         MadeChange = UpdateNodeType(VT, TP);
       } else if (ResultNode->getName() == "unknown") {
         std::vector<unsigned char> VT;
-        VT.push_back(EMVT::isUnknown);
+        VT.push_back(EEVT::isUnknown);
         MadeChange = UpdateNodeType(VT, TP);
       } else {
         assert(ResultNode->isSubClassOf("RegisterClass") &&
@@ -959,7 +959,7 @@
         TP.error("Instruction '" + getOperator()->getName() +
                  "' expects more operands than were provided.");
       
-      MVT::SimpleValueType VT;
+      EVT::SimpleValueType VT;
       TreePatternNode *Child = getChild(ChildNo++);
       if (OperandNode->isSubClassOf("RegisterClass")) {
         const CodeGenRegisterClass &RC = 
@@ -969,9 +969,9 @@
         VT = getValueType(OperandNode->getValueAsDef("Type"));
         MadeChange |= Child->UpdateNodeType(VT, TP);
       } else if (OperandNode->isSubClassOf("PointerLikeRegClass")) {
-        MadeChange |= Child->UpdateNodeType(MVT::iPTR, TP);
+        MadeChange |= Child->UpdateNodeType(EVT::iPTR, TP);
       } else if (OperandNode->getName() == "unknown") {
-        MadeChange |= Child->UpdateNodeType(EMVT::isUnknown, TP);
+        MadeChange |= Child->UpdateNodeType(EEVT::isUnknown, TP);
       } else {
         assert(0 && "Unknown operand type!");
         abort();
@@ -1210,7 +1210,7 @@
 
     // If this intrinsic returns void, it must have side-effects and thus a
     // chain.
-    if (Int.IS.RetVTs[0] == MVT::isVoid) {
+    if (Int.IS.RetVTs[0] == EVT::isVoid) {
       Operator = getDAGPatterns().get_intrinsic_void_sdnode();
     } else if (Int.ModRef != CodeGenIntrinsic::NoMem) {
       // Has side-effects, requires chain.
@@ -1568,7 +1568,7 @@
     // If this is not a set, verify that the children nodes are not void typed,
     // and recurse.
     for (unsigned i = 0, e = Pat->getNumChildren(); i != e; ++i) {
-      if (Pat->getChild(i)->getExtTypeNum(0) == MVT::isVoid)
+      if (Pat->getChild(i)->getExtTypeNum(0) == EVT::isVoid)
         I->error("Cannot have void nodes inside of patterns!");
       FindPatternInputsAndOutputs(I, Pat->getChild(i), InstInputs, InstResults,
                                   InstImpInputs, InstImpResults);
@@ -1816,7 +1816,7 @@
     // fill in the InstResults map.
     for (unsigned j = 0, e = I->getNumTrees(); j != e; ++j) {
       TreePatternNode *Pat = I->getTree(j);
-      if (Pat->getExtTypeNum(0) != MVT::isVoid)
+      if (Pat->getExtTypeNum(0) != EVT::isVoid)
         I->error("Top-level forms in instruction pattern should have"
                  " void types");
 
diff --git a/utils/TableGen/CodeGenDAGPatterns.h b/utils/TableGen/CodeGenDAGPatterns.h
index d398006..6dbc759 100644
--- a/utils/TableGen/CodeGenDAGPatterns.h
+++ b/utils/TableGen/CodeGenDAGPatterns.h
@@ -33,11 +33,11 @@
   class CodeGenDAGPatterns;
   class ComplexPattern;
 
-/// EMVT::DAGISelGenValueType - These are some extended forms of
-/// MVT::SimpleValueType that we use as lattice values during type inference.
-namespace EMVT {
+/// EEVT::DAGISelGenValueType - These are some extended forms of
+/// EVT::SimpleValueType that we use as lattice values during type inference.
+namespace EEVT {
   enum DAGISelGenValueType {
-    isFP  = MVT::LAST_VALUETYPE,
+    isFP  = EVT::LAST_VALUETYPE,
     isInt,
     isUnknown
   };
@@ -140,7 +140,7 @@
 /// patterns), and as such should be ref counted.  We currently just leak all
 /// TreePatternNode objects!
 class TreePatternNode {
-  /// The inferred type for this node, or EMVT::isUnknown if it hasn't
+  /// The inferred type for this node, or EEVT::isUnknown if it hasn't
   /// been determined yet. This is a std::vector because during inference
   /// there may be multiple possible types.
   std::vector<unsigned char> Types;
@@ -169,10 +169,10 @@
 public:
   TreePatternNode(Record *Op, const std::vector<TreePatternNode*> &Ch) 
     : Types(), Operator(Op), Val(0), TransformFn(0),
-    Children(Ch) { Types.push_back(EMVT::isUnknown); }
+    Children(Ch) { Types.push_back(EEVT::isUnknown); }
   TreePatternNode(Init *val)    // leaf ctor
     : Types(), Operator(0), Val(val), TransformFn(0) {
-    Types.push_back(EMVT::isUnknown);
+    Types.push_back(EEVT::isUnknown);
   }
   ~TreePatternNode();
   
@@ -181,19 +181,19 @@
   
   bool isLeaf() const { return Val != 0; }
   bool hasTypeSet() const {
-    return (Types[0] < MVT::LAST_VALUETYPE) || (Types[0] == MVT::iPTR) || 
-          (Types[0] == MVT::iPTRAny);
+    return (Types[0] < EVT::LAST_VALUETYPE) || (Types[0] == EVT::iPTR) || 
+          (Types[0] == EVT::iPTRAny);
   }
   bool isTypeCompletelyUnknown() const {
-    return Types[0] == EMVT::isUnknown;
+    return Types[0] == EEVT::isUnknown;
   }
   bool isTypeDynamicallyResolved() const {
-    return (Types[0] == MVT::iPTR) || (Types[0] == MVT::iPTRAny);
+    return (Types[0] == EVT::iPTR) || (Types[0] == EVT::iPTRAny);
   }
-  MVT::SimpleValueType getTypeNum(unsigned Num) const {
+  EVT::SimpleValueType getTypeNum(unsigned Num) const {
     assert(hasTypeSet() && "Doesn't have a type yet!");
     assert(Types.size() > Num && "Type num out of range!");
-    return (MVT::SimpleValueType)Types[Num];
+    return (EVT::SimpleValueType)Types[Num];
   }
   unsigned char getExtTypeNum(unsigned Num) const { 
     assert(Types.size() > Num && "Extended type num out of range!");
@@ -201,7 +201,7 @@
   }
   const std::vector<unsigned char> &getExtTypes() const { return Types; }
   void setTypes(const std::vector<unsigned char> &T) { Types = T; }
-  void removeTypes() { Types = std::vector<unsigned char>(1, EMVT::isUnknown); }
+  void removeTypes() { Types = std::vector<unsigned char>(1, EEVT::isUnknown); }
   
   Init *getLeafValue() const { assert(isLeaf()); return Val; }
   Record *getOperator() const { assert(!isLeaf()); return Operator; }
diff --git a/utils/TableGen/CodeGenIntrinsics.h b/utils/TableGen/CodeGenIntrinsics.h
index 7e7bdf9..685e141 100644
--- a/utils/TableGen/CodeGenIntrinsics.h
+++ b/utils/TableGen/CodeGenIntrinsics.h
@@ -37,20 +37,20 @@
     /// continues from there through the parameter list. This is useful for
     /// "matching" types.
     struct IntrinsicSignature {
-      /// RetVTs - The MVT::SimpleValueType for each return type. Note that this
+      /// RetVTs - The EVT::SimpleValueType for each return type. Note that this
       /// list is only populated when in the context of a target .td file. When
       /// building Intrinsics.td, this isn't available, because we don't know
       /// the target pointer size.
-      std::vector<MVT::SimpleValueType> RetVTs;
+      std::vector<EVT::SimpleValueType> RetVTs;
 
       /// RetTypeDefs - The records for each return type.
       std::vector<Record*> RetTypeDefs;
 
-      /// ParamVTs - The MVT::SimpleValueType for each parameter type. Note that
+      /// ParamVTs - The EVT::SimpleValueType for each parameter type. Note that
       /// this list is only populated when in the context of a target .td file.
       /// When building Intrinsics.td, this isn't available, because we don't
       /// know the target pointer size.
-      std::vector<MVT::SimpleValueType> ParamVTs;
+      std::vector<EVT::SimpleValueType> ParamVTs;
 
       /// ParamTypeDefs - The records for each parameter type.
       std::vector<Record*> ParamTypeDefs;
diff --git a/utils/TableGen/CodeGenRegisters.h b/utils/TableGen/CodeGenRegisters.h
index 6f8682b..a52da6e 100644
--- a/utils/TableGen/CodeGenRegisters.h
+++ b/utils/TableGen/CodeGenRegisters.h
@@ -36,7 +36,7 @@
     Record *TheDef;
     std::string Namespace;
     std::vector<Record*> Elements;
-    std::vector<MVT::SimpleValueType> VTs;
+    std::vector<EVT::SimpleValueType> VTs;
     unsigned SpillSize;
     unsigned SpillAlignment;
     int CopyCost;
@@ -44,10 +44,10 @@
     std::string MethodProtos, MethodBodies;
 
     const std::string &getName() const;
-    const std::vector<MVT::SimpleValueType> &getValueTypes() const {return VTs;}
+    const std::vector<EVT::SimpleValueType> &getValueTypes() const {return VTs;}
     unsigned getNumValueTypes() const { return VTs.size(); }
     
-    MVT::SimpleValueType getValueTypeNum(unsigned VTNum) const {
+    EVT::SimpleValueType getValueTypeNum(unsigned VTNum) const {
       if (VTNum < VTs.size())
         return VTs[VTNum];
       assert(0 && "VTNum greater than number of ValueTypes in RegClass!");
diff --git a/utils/TableGen/CodeGenTarget.cpp b/utils/TableGen/CodeGenTarget.cpp
index 0849d4f..15aa2de 100644
--- a/utils/TableGen/CodeGenTarget.cpp
+++ b/utils/TableGen/CodeGenTarget.cpp
@@ -30,62 +30,62 @@
 AsmWriterNum("asmwriternum", cl::init(0),
              cl::desc("Make -gen-asm-writer emit assembly writer #N"));
 
-/// getValueType - Return the MVT::SimpleValueType that the specified TableGen
+/// getValueType - Return the EVT::SimpleValueType that the specified TableGen
 /// record corresponds to.
-MVT::SimpleValueType llvm::getValueType(Record *Rec) {
-  return (MVT::SimpleValueType)Rec->getValueAsInt("Value");
+EVT::SimpleValueType llvm::getValueType(Record *Rec) {
+  return (EVT::SimpleValueType)Rec->getValueAsInt("Value");
 }
 
-std::string llvm::getName(MVT::SimpleValueType T) {
+std::string llvm::getName(EVT::SimpleValueType T) {
   switch (T) {
-  case MVT::Other:   return "UNKNOWN";
-  case MVT::iPTR:    return "TLI.getPointerTy()";
-  case MVT::iPTRAny: return "TLI.getPointerTy()";
+  case EVT::Other:   return "UNKNOWN";
+  case EVT::iPTR:    return "TLI.getPointerTy()";
+  case EVT::iPTRAny: return "TLI.getPointerTy()";
   default: return getEnumName(T);
   }
 }
 
-std::string llvm::getEnumName(MVT::SimpleValueType T) {
+std::string llvm::getEnumName(EVT::SimpleValueType T) {
   switch (T) {
-  case MVT::Other: return "MVT::Other";
-  case MVT::i1:    return "MVT::i1";
-  case MVT::i8:    return "MVT::i8";
-  case MVT::i16:   return "MVT::i16";
-  case MVT::i32:   return "MVT::i32";
-  case MVT::i64:   return "MVT::i64";
-  case MVT::i128:  return "MVT::i128";
-  case MVT::iAny:  return "MVT::iAny";
-  case MVT::fAny:  return "MVT::fAny";
-  case MVT::f32:   return "MVT::f32";
-  case MVT::f64:   return "MVT::f64";
-  case MVT::f80:   return "MVT::f80";
-  case MVT::f128:  return "MVT::f128";
-  case MVT::ppcf128:  return "MVT::ppcf128";
-  case MVT::Flag:  return "MVT::Flag";
-  case MVT::isVoid:return "MVT::isVoid";
-  case MVT::v2i8:  return "MVT::v2i8";
-  case MVT::v4i8:  return "MVT::v4i8";
-  case MVT::v8i8:  return "MVT::v8i8";
-  case MVT::v16i8: return "MVT::v16i8";
-  case MVT::v32i8: return "MVT::v32i8";
-  case MVT::v2i16: return "MVT::v2i16";
-  case MVT::v4i16: return "MVT::v4i16";
-  case MVT::v8i16: return "MVT::v8i16";
-  case MVT::v16i16: return "MVT::v16i16";
-  case MVT::v2i32: return "MVT::v2i32";
-  case MVT::v4i32: return "MVT::v4i32";
-  case MVT::v8i32: return "MVT::v8i32";
-  case MVT::v1i64: return "MVT::v1i64";
-  case MVT::v2i64: return "MVT::v2i64";
-  case MVT::v4i64: return "MVT::v4i64";
-  case MVT::v2f32: return "MVT::v2f32";
-  case MVT::v4f32: return "MVT::v4f32";
-  case MVT::v8f32: return "MVT::v8f32";
-  case MVT::v2f64: return "MVT::v2f64";
-  case MVT::v4f64: return "MVT::v4f64";
-  case MVT::Metadata: return "MVT::Metadata";
-  case MVT::iPTR:  return "MVT::iPTR";
-  case MVT::iPTRAny:  return "MVT::iPTRAny";
+  case EVT::Other: return "EVT::Other";
+  case EVT::i1:    return "EVT::i1";
+  case EVT::i8:    return "EVT::i8";
+  case EVT::i16:   return "EVT::i16";
+  case EVT::i32:   return "EVT::i32";
+  case EVT::i64:   return "EVT::i64";
+  case EVT::i128:  return "EVT::i128";
+  case EVT::iAny:  return "EVT::iAny";
+  case EVT::fAny:  return "EVT::fAny";
+  case EVT::f32:   return "EVT::f32";
+  case EVT::f64:   return "EVT::f64";
+  case EVT::f80:   return "EVT::f80";
+  case EVT::f128:  return "EVT::f128";
+  case EVT::ppcf128:  return "EVT::ppcf128";
+  case EVT::Flag:  return "EVT::Flag";
+  case EVT::isVoid:return "EVT::isVoid";
+  case EVT::v2i8:  return "EVT::v2i8";
+  case EVT::v4i8:  return "EVT::v4i8";
+  case EVT::v8i8:  return "EVT::v8i8";
+  case EVT::v16i8: return "EVT::v16i8";
+  case EVT::v32i8: return "EVT::v32i8";
+  case EVT::v2i16: return "EVT::v2i16";
+  case EVT::v4i16: return "EVT::v4i16";
+  case EVT::v8i16: return "EVT::v8i16";
+  case EVT::v16i16: return "EVT::v16i16";
+  case EVT::v2i32: return "EVT::v2i32";
+  case EVT::v4i32: return "EVT::v4i32";
+  case EVT::v8i32: return "EVT::v8i32";
+  case EVT::v1i64: return "EVT::v1i64";
+  case EVT::v2i64: return "EVT::v2i64";
+  case EVT::v4i64: return "EVT::v4i64";
+  case EVT::v2f32: return "EVT::v2f32";
+  case EVT::v4f32: return "EVT::v4f32";
+  case EVT::v8f32: return "EVT::v8f32";
+  case EVT::v2f64: return "EVT::v2f64";
+  case EVT::v4f64: return "EVT::v4f64";
+  case EVT::Metadata: return "EVT::Metadata";
+  case EVT::iPTR:  return "EVT::iPTR";
+  case EVT::iPTRAny:  return "EVT::iPTRAny";
   default: assert(0 && "ILLEGAL VALUE TYPE!"); return "";
   }
 }
@@ -190,7 +190,7 @@
     const CodeGenRegisterClass &RC = RegisterClasses[i];
     for (unsigned ei = 0, ee = RC.Elements.size(); ei != ee; ++ei) {
       if (R == RC.Elements[ei]) {
-        const std::vector<MVT::SimpleValueType> &InVTs = RC.getValueTypes();
+        const std::vector<EVT::SimpleValueType> &InVTs = RC.getValueTypes();
         for (unsigned i = 0, e = InVTs.size(); i != e; ++i)
           Result.push_back(InVTs[i]);
       }
@@ -240,7 +240,7 @@
   unsigned Size = R->getValueAsInt("Size");
 
   Namespace = R->getValueAsString("Namespace");
-  SpillSize = Size ? Size : MVT(VTs[0]).getSizeInBits();
+  SpillSize = Size ? Size : EVT(VTs[0]).getSizeInBits();
   SpillAlignment = R->getValueAsInt("Alignment");
   CopyCost = R->getValueAsInt("CopyCost");
   MethodBodies = R->getValueAsCode("MethodBodies");
@@ -476,12 +476,12 @@
   }
   
   // Parse the list of return types.
-  std::vector<MVT::SimpleValueType> OverloadedVTs;
+  std::vector<EVT::SimpleValueType> OverloadedVTs;
   ListInit *TypeList = R->getValueAsListInit("RetTypes");
   for (unsigned i = 0, e = TypeList->getSize(); i != e; ++i) {
     Record *TyEl = TypeList->getElementAsRecord(i);
     assert(TyEl->isSubClassOf("LLVMType") && "Expected a type!");
-    MVT::SimpleValueType VT;
+    EVT::SimpleValueType VT;
     if (TyEl->isSubClassOf("LLVMMatchType")) {
       unsigned MatchTy = TyEl->getValueAsInt("Number");
       assert(MatchTy < OverloadedVTs.size() &&
@@ -492,11 +492,11 @@
       // overloaded, all the types can be specified directly.
       assert(((!TyEl->isSubClassOf("LLVMExtendedElementVectorType") &&
                !TyEl->isSubClassOf("LLVMTruncatedElementVectorType")) ||
-              VT == MVT::iAny) && "Expected iAny type");
+              VT == EVT::iAny) && "Expected iAny type");
     } else {
       VT = getValueType(TyEl->getValueAsDef("VT"));
     }
-    if (VT == MVT::iAny || VT == MVT::fAny || VT == MVT::iPTRAny) {
+    if (VT == EVT::iAny || VT == EVT::fAny || VT == EVT::iPTRAny) {
       OverloadedVTs.push_back(VT);
       isOverloaded |= true;
     }
@@ -512,7 +512,7 @@
   for (unsigned i = 0, e = TypeList->getSize(); i != e; ++i) {
     Record *TyEl = TypeList->getElementAsRecord(i);
     assert(TyEl->isSubClassOf("LLVMType") && "Expected a type!");
-    MVT::SimpleValueType VT;
+    EVT::SimpleValueType VT;
     if (TyEl->isSubClassOf("LLVMMatchType")) {
       unsigned MatchTy = TyEl->getValueAsInt("Number");
       assert(MatchTy < OverloadedVTs.size() &&
@@ -523,10 +523,10 @@
       // overloaded, all the types can be specified directly.
       assert(((!TyEl->isSubClassOf("LLVMExtendedElementVectorType") &&
                !TyEl->isSubClassOf("LLVMTruncatedElementVectorType")) ||
-              VT == MVT::iAny) && "Expected iAny type");
+              VT == EVT::iAny) && "Expected iAny type");
     } else
       VT = getValueType(TyEl->getValueAsDef("VT"));
-    if (VT == MVT::iAny || VT == MVT::fAny || VT == MVT::iPTRAny) {
+    if (VT == EVT::iAny || VT == EVT::fAny || VT == EVT::iPTRAny) {
       OverloadedVTs.push_back(VT);
       isOverloaded |= true;
     }
diff --git a/utils/TableGen/CodeGenTarget.h b/utils/TableGen/CodeGenTarget.h
index e763795..d18df4f 100644
--- a/utils/TableGen/CodeGenTarget.h
+++ b/utils/TableGen/CodeGenTarget.h
@@ -49,12 +49,12 @@
 // ComplexPattern attributes.
 enum CPAttr { CPAttrParentAsRoot };
 
-/// getValueType - Return the MVT::SimpleValueType that the specified TableGen
+/// getValueType - Return the EVT::SimpleValueType that the specified TableGen
 /// record corresponds to.
-MVT::SimpleValueType getValueType(Record *Rec);
+EVT::SimpleValueType getValueType(Record *Rec);
 
-std::string getName(MVT::SimpleValueType T);
-std::string getEnumName(MVT::SimpleValueType T);
+std::string getName(EVT::SimpleValueType T);
+std::string getEnumName(EVT::SimpleValueType T);
 
 /// getQualifiedName - Return the name of the specified record, with a
 /// namespace qualifier if the record contains one.
@@ -68,7 +68,7 @@
   mutable std::map<std::string, CodeGenInstruction> Instructions;
   mutable std::vector<CodeGenRegister> Registers;
   mutable std::vector<CodeGenRegisterClass> RegisterClasses;
-  mutable std::vector<MVT::SimpleValueType> LegalValueTypes;
+  mutable std::vector<EVT::SimpleValueType> LegalValueTypes;
   void ReadRegisters() const;
   void ReadRegisterClasses() const;
   void ReadInstructions() const;
@@ -172,15 +172,15 @@
   /// specified physical register.
   std::vector<unsigned char> getRegisterVTs(Record *R) const;
   
-  const std::vector<MVT::SimpleValueType> &getLegalValueTypes() const {
+  const std::vector<EVT::SimpleValueType> &getLegalValueTypes() const {
     if (LegalValueTypes.empty()) ReadLegalValueTypes();
     return LegalValueTypes;
   }
   
   /// isLegalValueType - Return true if the specified value type is natively
   /// supported by the target (i.e. there are registers that directly hold it).
-  bool isLegalValueType(MVT::SimpleValueType VT) const {
-    const std::vector<MVT::SimpleValueType> &LegalVTs = getLegalValueTypes();
+  bool isLegalValueType(EVT::SimpleValueType VT) const {
+    const std::vector<EVT::SimpleValueType> &LegalVTs = getLegalValueTypes();
     for (unsigned i = 0, e = LegalVTs.size(); i != e; ++i)
       if (LegalVTs[i] == VT) return true;
     return false;    
@@ -222,7 +222,7 @@
 /// ComplexPattern - ComplexPattern info, corresponding to the ComplexPattern
 /// tablegen class in TargetSelectionDAG.td
 class ComplexPattern {
-  MVT::SimpleValueType Ty;
+  EVT::SimpleValueType Ty;
   unsigned NumOperands;
   std::string SelectFunc;
   std::vector<Record*> RootNodes;
@@ -232,7 +232,7 @@
   ComplexPattern() : NumOperands(0) {};
   ComplexPattern(Record *R);
 
-  MVT::SimpleValueType getValueType() const { return Ty; }
+  EVT::SimpleValueType getValueType() const { return Ty; }
   unsigned getNumOperands() const { return NumOperands; }
   const std::string &getSelectFunc() const { return SelectFunc; }
   const std::vector<Record*> &getRootNodes() const {
diff --git a/utils/TableGen/DAGISelEmitter.cpp b/utils/TableGen/DAGISelEmitter.cpp
index 72c9510..4bdb4d9 100644
--- a/utils/TableGen/DAGISelEmitter.cpp
+++ b/utils/TableGen/DAGISelEmitter.cpp
@@ -57,12 +57,12 @@
 /// patterns before small ones.  This is used to determine the size of a
 /// pattern.
 static unsigned getPatternSize(TreePatternNode *P, CodeGenDAGPatterns &CGP) {
-  assert((EMVT::isExtIntegerInVTs(P->getExtTypes()) ||
-          EMVT::isExtFloatingPointInVTs(P->getExtTypes()) ||
-          P->getExtTypeNum(0) == MVT::isVoid ||
-          P->getExtTypeNum(0) == MVT::Flag ||
-          P->getExtTypeNum(0) == MVT::iPTR ||
-          P->getExtTypeNum(0) == MVT::iPTRAny) && 
+  assert((EEVT::isExtIntegerInVTs(P->getExtTypes()) ||
+          EEVT::isExtFloatingPointInVTs(P->getExtTypes()) ||
+          P->getExtTypeNum(0) == EVT::isVoid ||
+          P->getExtTypeNum(0) == EVT::Flag ||
+          P->getExtTypeNum(0) == EVT::iPTR ||
+          P->getExtTypeNum(0) == EVT::iPTRAny) && 
          "Not a valid pattern node to size!");
   unsigned Size = 3;  // The node itself.
   // If the root node is a ConstantSDNode, increases its size.
@@ -87,7 +87,7 @@
   // Count children in the count if they are also nodes.
   for (unsigned i = 0, e = P->getNumChildren(); i != e; ++i) {
     TreePatternNode *Child = P->getChild(i);
-    if (!Child->isLeaf() && Child->getExtTypeNum(0) != MVT::Other)
+    if (!Child->isLeaf() && Child->getExtTypeNum(0) != EVT::Other)
       Size += getPatternSize(Child, CGP);
     else if (Child->isLeaf()) {
       if (dynamic_cast<IntInit*>(Child->getLeafValue())) 
@@ -174,10 +174,10 @@
 
 /// getRegisterValueType - Look up and return the ValueType of the specified
 /// register. If the register is a member of multiple register classes which
-/// have different associated types, return MVT::Other.
-static MVT::SimpleValueType getRegisterValueType(Record *R, const CodeGenTarget &T) {
+/// have different associated types, return EVT::Other.
+static EVT::SimpleValueType getRegisterValueType(Record *R, const CodeGenTarget &T) {
   bool FoundRC = false;
-  MVT::SimpleValueType VT = MVT::Other;
+  EVT::SimpleValueType VT = EVT::Other;
   const std::vector<CodeGenRegisterClass> &RCs = T.getRegisterClasses();
   std::vector<CodeGenRegisterClass>::const_iterator RC;
   std::vector<Record*>::const_iterator Element;
@@ -191,9 +191,9 @@
       } else {
         // In multiple RC's
         if (VT != (*RC).getValueTypeNum(0)) {
-          // Types of the RC's do not agree. Return MVT::Other. The
+          // Types of the RC's do not agree. Return EVT::Other. The
           // target is responsible for handling this.
-          return MVT::Other;
+          return EVT::Other;
         }
       }
     }
@@ -740,7 +740,7 @@
         } else if (LeafRec->isSubClassOf("ValueType")) {
           // Make sure this is the specified value type.
           emitCheck("cast<VTSDNode>(" + RootName +
-                    ")->getVT() == MVT::" + LeafRec->getName());
+                    ")->getVT() == EVT::" + LeafRec->getName());
         } else if (LeafRec->isSubClassOf("CondCode")) {
           // Make sure this is the specified cond code.
           emitCheck("cast<CondCodeSDNode>(" + RootName +
@@ -813,11 +813,11 @@
           errs() << "Cannot handle " << getEnumName(N->getTypeNum(0))
                << " type as an immediate constant. Aborting\n";
           abort();
-        case MVT::i1:  CastType = "bool"; break;
-        case MVT::i8:  CastType = "unsigned char"; break;
-        case MVT::i16: CastType = "unsigned short"; break;
-        case MVT::i32: CastType = "unsigned"; break;
-        case MVT::i64: CastType = "uint64_t"; break;
+        case EVT::i1:  CastType = "bool"; break;
+        case EVT::i8:  CastType = "unsigned char"; break;
+        case EVT::i16: CastType = "unsigned short"; break;
+        case EVT::i32: CastType = "unsigned"; break;
+        case EVT::i64: CastType = "uint64_t"; break;
         }
         emitCode("SDValue " + TmpVar + 
                  " = CurDAG->getTargetConstant(((" + CastType +
@@ -921,7 +921,7 @@
           emitCode("SDValue Tmp" + utostr(ResNo) +
                    " = CurDAG->getTargetConstant(" +
                    getQualifiedName(DI->getDef()) + "RegClassID, " +
-                   "MVT::i32);");
+                   "EVT::i32);");
           NodeOps.push_back("Tmp" + utostr(ResNo));
           return NodeOps;
         }
@@ -979,7 +979,7 @@
 
       if (NodeHasOptInFlag) {
         emitCode("bool HasInFlag = "
-           "(N.getOperand(N.getNumOperands()-1).getValueType() == MVT::Flag);");
+           "(N.getOperand(N.getNumOperands()-1).getValueType() == EVT::Flag);");
       }
       if (IsVariadic)
         emitCode("SmallVector<SDValue, 8> Ops" + utostr(OpcNo) + ";");
@@ -987,8 +987,8 @@
       // How many results is this pattern expected to produce?
       unsigned NumPatResults = 0;
       for (unsigned i = 0, e = Pattern->getExtTypes().size(); i != e; i++) {
-        MVT::SimpleValueType VT = Pattern->getTypeNum(i);
-        if (VT != MVT::isVoid && VT != MVT::Flag)
+        EVT::SimpleValueType VT = Pattern->getTypeNum(i);
+        if (VT != EVT::isVoid && VT != EVT::Flag)
           NumPatResults++;
       }
 
@@ -1007,7 +1007,7 @@
         }
         emitCode("InChains.push_back(" + ChainName + ");");
         emitCode(ChainName + " = CurDAG->getNode(ISD::TokenFactor, "
-                 "N.getDebugLoc(), MVT::Other, "
+                 "N.getDebugLoc(), EVT::Other, "
                  "&InChains[0], InChains.size());");
         if (GenDebug) {
           emitCode("CurDAG->setSubgraphColor(" + ChainName +".getNode(), \"yellow\");");
@@ -1096,7 +1096,7 @@
 
       // Output order: results, chain, flags
       // Result types.
-      if (NumResults > 0 && N->getTypeNum(0) != MVT::isVoid) {
+      if (NumResults > 0 && N->getTypeNum(0) != EVT::isVoid) {
         Code += ", VT" + utostr(VTNo);
         emitVT(getEnumName(N->getTypeNum(0)));
       }
@@ -1105,14 +1105,14 @@
       for (unsigned i = 0; i < NumDstRegs; i++) {
         Record *RR = DstRegs[i];
         if (RR->isSubClassOf("Register")) {
-          MVT::SimpleValueType RVT = getRegisterValueType(RR, CGT);
+          EVT::SimpleValueType RVT = getRegisterValueType(RR, CGT);
           Code += ", " + getEnumName(RVT);
         }
       }
       if (NodeHasChain)
-        Code += ", MVT::Other";
+        Code += ", EVT::Other";
       if (NodeHasOutFlag)
-        Code += ", MVT::Flag";
+        Code += ", EVT::Flag";
 
       // Inputs.
       if (IsVariadic) {
@@ -1405,8 +1405,8 @@
 
           Record *RR = DI->getDef();
           if (RR->isSubClassOf("Register")) {
-            MVT::SimpleValueType RVT = getRegisterValueType(RR, T);
-            if (RVT == MVT::Flag) {
+            EVT::SimpleValueType RVT = getRegisterValueType(RR, T);
+            if (RVT == EVT::Flag) {
               if (!InFlagDecled) {
                 emitCode("SDValue InFlag = " + RootName + utostr(OpNo) + ";");
                 InFlagDecled = true;
@@ -1707,7 +1707,7 @@
     assert(!PatternsOfOp.empty() && "No patterns but map has entry?");
 
     // Split them into groups by type.
-    std::map<MVT::SimpleValueType,
+    std::map<EVT::SimpleValueType,
              std::vector<const PatternToMatch*> > PatternsByType;
     for (unsigned i = 0, e = PatternsOfOp.size(); i != e; ++i) {
       const PatternToMatch *Pat = PatternsOfOp[i];
@@ -1715,11 +1715,11 @@
       PatternsByType[SrcPat->getTypeNum(0)].push_back(Pat);
     }
 
-    for (std::map<MVT::SimpleValueType,
+    for (std::map<EVT::SimpleValueType,
                   std::vector<const PatternToMatch*> >::iterator
            II = PatternsByType.begin(), EE = PatternsByType.end(); II != EE;
          ++II) {
-      MVT::SimpleValueType OpVT = II->first;
+      EVT::SimpleValueType OpVT = II->first;
       std::vector<const PatternToMatch*> &Patterns = II->second;
       typedef std::pair<unsigned, std::string> CodeLine;
       typedef std::vector<CodeLine> CodeList;
@@ -1776,7 +1776,7 @@
           CallerCode += ", " + TargetOpcodes[j];
         }
         for (unsigned j = 0, e = TargetVTs.size(); j != e; ++j) {
-          CalleeCode += ", MVT VT" + utostr(j);
+          CalleeCode += ", EVT VT" + utostr(j);
           CallerCode += ", " + TargetVTs[j];
         }
         for (std::set<std::string>::iterator
@@ -1839,16 +1839,16 @@
 
       // Print function.
       std::string OpVTStr;
-      if (OpVT == MVT::iPTR) {
+      if (OpVT == EVT::iPTR) {
         OpVTStr = "_iPTR";
-      } else if (OpVT == MVT::iPTRAny) {
+      } else if (OpVT == EVT::iPTRAny) {
         OpVTStr = "_iPTRAny";
-      } else if (OpVT == MVT::isVoid) {
+      } else if (OpVT == EVT::isVoid) {
         // Nodes with a void result actually have a first result type of either
         // Other (a chain) or Flag.  Since there is no one-to-one mapping from
         // void to this case, we handle it specially here.
       } else {
-        OpVTStr = "_" + getEnumName(OpVT).substr(5);  // Skip 'MVT::'
+        OpVTStr = "_" + getEnumName(OpVT).substr(5);  // Skip 'EVT::'
       }
       std::map<std::string, std::vector<std::string> >::iterator OpVTI =
         OpcodeVTMap.find(OpName);
@@ -1928,9 +1928,9 @@
      << "  std::vector<SDValue> Ops(N.getNode()->op_begin(), N.getNode()->op_end());\n"
      << "  SelectInlineAsmMemoryOperands(Ops);\n\n"
     
-     << "  std::vector<MVT> VTs;\n"
-     << "  VTs.push_back(MVT::Other);\n"
-     << "  VTs.push_back(MVT::Flag);\n"
+     << "  std::vector<EVT> VTs;\n"
+     << "  VTs.push_back(EVT::Other);\n"
+     << "  VTs.push_back(EVT::Flag);\n"
      << "  SDValue New = CurDAG->getNode(ISD::INLINEASM, N.getDebugLoc(), "
                  "VTs, &Ops[0], Ops.size());\n"
      << "  return New.getNode();\n"
@@ -1944,17 +1944,17 @@
   OS << "SDNode *Select_DBG_LABEL(const SDValue &N) {\n"
      << "  SDValue Chain = N.getOperand(0);\n"
      << "  unsigned C = cast<LabelSDNode>(N)->getLabelID();\n"
-     << "  SDValue Tmp = CurDAG->getTargetConstant(C, MVT::i32);\n"
+     << "  SDValue Tmp = CurDAG->getTargetConstant(C, EVT::i32);\n"
      << "  return CurDAG->SelectNodeTo(N.getNode(), TargetInstrInfo::DBG_LABEL,\n"
-     << "                              MVT::Other, Tmp, Chain);\n"
+     << "                              EVT::Other, Tmp, Chain);\n"
      << "}\n\n";
 
   OS << "SDNode *Select_EH_LABEL(const SDValue &N) {\n"
      << "  SDValue Chain = N.getOperand(0);\n"
      << "  unsigned C = cast<LabelSDNode>(N)->getLabelID();\n"
-     << "  SDValue Tmp = CurDAG->getTargetConstant(C, MVT::i32);\n"
+     << "  SDValue Tmp = CurDAG->getTargetConstant(C, EVT::i32);\n"
      << "  return CurDAG->SelectNodeTo(N.getNode(), TargetInstrInfo::EH_LABEL,\n"
-     << "                              MVT::Other, Tmp, Chain);\n"
+     << "                              EVT::Other, Tmp, Chain);\n"
      << "}\n\n";
 
   OS << "SDNode *Select_DECLARE(const SDValue &N) {\n"
@@ -1971,12 +1971,12 @@
      << "  SDValue Tmp2 = "
      << "CurDAG->getTargetGlobalAddress(GV, TLI.getPointerTy());\n"
      << "  return CurDAG->SelectNodeTo(N.getNode(), TargetInstrInfo::DECLARE,\n"
-     << "                              MVT::Other, Tmp1, Tmp2, Chain);\n"
+     << "                              EVT::Other, Tmp1, Tmp2, Chain);\n"
      << "}\n\n";
 
   OS << "// The main instruction selector code.\n"
      << "SDNode *SelectCode(SDValue N) {\n"
-     << "  MVT::SimpleValueType NVT = N.getNode()->getValueType(0).getSimpleVT();\n"
+     << "  EVT::SimpleValueType NVT = N.getNode()->getValueType(0).getSimpleVT();\n"
      << "  switch (N.getOpcode()) {\n"
      << "  default:\n"
      << "    assert(!N.isMachineOpcode() && \"Node already selected!\");\n"
@@ -2049,7 +2049,7 @@
         HasPtrPattern = true;
         continue;
       }
-      OS << "    case MVT::" << VTStr.substr(1) << ":\n"
+      OS << "    case EVT::" << VTStr.substr(1) << ":\n"
          << "      return Select_" << getLegalCName(OpName)
          << VTStr << "(N);\n";
     }
@@ -2091,7 +2091,7 @@
   OS << "void CannotYetSelectIntrinsic(SDValue N) DISABLE_INLINE {\n"
      << "  cerr << \"Cannot yet select: \";\n"
      << "  unsigned iid = cast<ConstantSDNode>(N.getOperand("
-     << "N.getOperand(0).getValueType() == MVT::Other))->getZExtValue();\n"
+     << "N.getOperand(0).getValueType() == EVT::Other))->getZExtValue();\n"
      << " llvm_report_error(\"Cannot yet select: intrinsic %\" +\n"
      << "Intrinsic::getName((Intrinsic::ID)iid));\n"
      << "}\n\n";
diff --git a/utils/TableGen/FastISelEmitter.cpp b/utils/TableGen/FastISelEmitter.cpp
index 0a43f02..e955675 100644
--- a/utils/TableGen/FastISelEmitter.cpp
+++ b/utils/TableGen/FastISelEmitter.cpp
@@ -53,7 +53,7 @@
   ///
   bool initialize(TreePatternNode *InstPatNode,
                   const CodeGenTarget &Target,
-                  MVT::SimpleValueType VT) {
+                  EVT::SimpleValueType VT) {
     if (!InstPatNode->isLeaf() &&
         InstPatNode->getOperator()->getName() == "imm") {
       Operands.push_back("i");
@@ -203,8 +203,8 @@
 
 class FastISelMap {
   typedef std::map<std::string, InstructionMemo> PredMap;
-  typedef std::map<MVT::SimpleValueType, PredMap> RetPredMap;
-  typedef std::map<MVT::SimpleValueType, RetPredMap> TypeRetPredMap;
+  typedef std::map<EVT::SimpleValueType, PredMap> RetPredMap;
+  typedef std::map<EVT::SimpleValueType, RetPredMap> TypeRetPredMap;
   typedef std::map<std::string, TypeRetPredMap> OpcodeTypeRetPredMap;
   typedef std::map<OperandsSignature, OpcodeTypeRetPredMap> OperandsOpcodeTypeRetPredMap;
 
@@ -297,8 +297,8 @@
 
     Record *InstPatOp = InstPatNode->getOperator();
     std::string OpcodeName = getOpcodeName(InstPatOp, CGP);
-    MVT::SimpleValueType RetVT = InstPatNode->getTypeNum(0);
-    MVT::SimpleValueType VT = RetVT;
+    EVT::SimpleValueType RetVT = InstPatNode->getTypeNum(0);
+    EVT::SimpleValueType VT = RetVT;
     if (InstPatNode->getNumChildren())
       VT = InstPatNode->getChild(0)->getTypeNum(0);
 
@@ -385,12 +385,12 @@
       // Emit one function for each opcode,type pair.
       for (TypeRetPredMap::const_iterator TI = TM.begin(), TE = TM.end();
            TI != TE; ++TI) {
-        MVT::SimpleValueType VT = TI->first;
+        EVT::SimpleValueType VT = TI->first;
         const RetPredMap &RM = TI->second;
         if (RM.size() != 1) {
           for (RetPredMap::const_iterator RI = RM.begin(), RE = RM.end();
                RI != RE; ++RI) {
-            MVT::SimpleValueType RetVT = RI->first;
+            EVT::SimpleValueType RetVT = RI->first;
             const PredMap &PM = RI->second;
             bool HasPred = false;
 
@@ -461,14 +461,14 @@
              << getLegalCName(Opcode) << "_"
              << getLegalCName(getName(VT)) << "_";
           Operands.PrintManglingSuffix(OS);
-          OS << "(MVT::SimpleValueType RetVT";
+          OS << "(EVT::SimpleValueType RetVT";
           if (!Operands.empty())
             OS << ", ";
           Operands.PrintParameters(OS);
           OS << ") {\nswitch (RetVT) {\n";
           for (RetPredMap::const_iterator RI = RM.begin(), RE = RM.end();
                RI != RE; ++RI) {
-            MVT::SimpleValueType RetVT = RI->first;
+            EVT::SimpleValueType RetVT = RI->first;
             OS << "  case " << getName(RetVT) << ": return FastEmit_"
                << getLegalCName(Opcode) << "_" << getLegalCName(getName(VT))
                << "_" << getLegalCName(getName(RetVT)) << "_";
@@ -485,7 +485,7 @@
              << getLegalCName(Opcode) << "_"
              << getLegalCName(getName(VT)) << "_";
           Operands.PrintManglingSuffix(OS);
-          OS << "(MVT::SimpleValueType RetVT";
+          OS << "(EVT::SimpleValueType RetVT";
           if (!Operands.empty())
             OS << ", ";
           Operands.PrintParameters(OS);
@@ -555,7 +555,7 @@
       OS << "unsigned FastEmit_"
          << getLegalCName(Opcode) << "_";
       Operands.PrintManglingSuffix(OS);
-      OS << "(MVT::SimpleValueType VT, MVT::SimpleValueType RetVT";
+      OS << "(EVT::SimpleValueType VT, EVT::SimpleValueType RetVT";
       if (!Operands.empty())
         OS << ", ";
       Operands.PrintParameters(OS);
@@ -563,7 +563,7 @@
       OS << "  switch (VT) {\n";
       for (TypeRetPredMap::const_iterator TI = TM.begin(), TE = TM.end();
            TI != TE; ++TI) {
-        MVT::SimpleValueType VT = TI->first;
+        EVT::SimpleValueType VT = TI->first;
         std::string TypeName = getName(VT);
         OS << "  case " << TypeName << ": return FastEmit_"
            << getLegalCName(Opcode) << "_" << getLegalCName(TypeName) << "_";
@@ -587,7 +587,7 @@
     // on opcode and type.
     OS << "unsigned FastEmit_";
     Operands.PrintManglingSuffix(OS);
-    OS << "(MVT::SimpleValueType VT, MVT::SimpleValueType RetVT, ISD::NodeType Opcode";
+    OS << "(EVT::SimpleValueType VT, EVT::SimpleValueType RetVT, ISD::NodeType Opcode";
     if (!Operands.empty())
       OS << ", ";
     Operands.PrintParameters(OS);
diff --git a/utils/TableGen/IntrinsicEmitter.cpp b/utils/TableGen/IntrinsicEmitter.cpp
index 502aee6..94d381d 100644
--- a/utils/TableGen/IntrinsicEmitter.cpp
+++ b/utils/TableGen/IntrinsicEmitter.cpp
@@ -140,26 +140,26 @@
   OS << "#endif\n\n";
 }
 
-static void EmitTypeForValueType(raw_ostream &OS, MVT::SimpleValueType VT) {
-  if (MVT(VT).isInteger()) {
-    unsigned BitWidth = MVT(VT).getSizeInBits();
+static void EmitTypeForValueType(raw_ostream &OS, EVT::SimpleValueType VT) {
+  if (EVT(VT).isInteger()) {
+    unsigned BitWidth = EVT(VT).getSizeInBits();
     OS << "IntegerType::get(" << BitWidth << ")";
-  } else if (VT == MVT::Other) {
-    // MVT::OtherVT is used to mean the empty struct type here.
+  } else if (VT == EVT::Other) {
+    // EVT::OtherVT is used to mean the empty struct type here.
     OS << "StructType::get(Context)";
-  } else if (VT == MVT::f32) {
+  } else if (VT == EVT::f32) {
     OS << "Type::FloatTy";
-  } else if (VT == MVT::f64) {
+  } else if (VT == EVT::f64) {
     OS << "Type::DoubleTy";
-  } else if (VT == MVT::f80) {
+  } else if (VT == EVT::f80) {
     OS << "Type::X86_FP80Ty";
-  } else if (VT == MVT::f128) {
+  } else if (VT == EVT::f128) {
     OS << "Type::FP128Ty";
-  } else if (VT == MVT::ppcf128) {
+  } else if (VT == EVT::ppcf128) {
     OS << "Type::PPC_FP128Ty";
-  } else if (VT == MVT::isVoid) {
+  } else if (VT == EVT::isVoid) {
     OS << "Type::VoidTy";
-  } else if (VT == MVT::Metadata) {
+  } else if (VT == EVT::Metadata) {
     OS << "Type::MetadataTy";
   } else {
     assert(false && "Unsupported ValueType!");
@@ -190,7 +190,7 @@
 
 static void EmitTypeGenerate(raw_ostream &OS, const Record *ArgType,
                              unsigned &ArgNo) {
-  MVT::SimpleValueType VT = getValueType(ArgType->getValueAsDef("VT"));
+  EVT::SimpleValueType VT = getValueType(ArgType->getValueAsDef("VT"));
 
   if (ArgType->isSubClassOf("LLVMMatchType")) {
     unsigned Number = ArgType->getValueAsInt("Number");
@@ -203,23 +203,23 @@
          << "(dyn_cast<VectorType>(Tys[" << Number << "]))";
     else
       OS << "Tys[" << Number << "]";
-  } else if (VT == MVT::iAny || VT == MVT::fAny) {
+  } else if (VT == EVT::iAny || VT == EVT::fAny) {
     // NOTE: The ArgNo variable here is not the absolute argument number, it is
     // the index of the "arbitrary" type in the Tys array passed to the
     // Intrinsic::getDeclaration function. Consequently, we only want to
     // increment it when we actually hit an overloaded type. Getting this wrong
     // leads to very subtle bugs!
     OS << "Tys[" << ArgNo++ << "]";
-  } else if (MVT(VT).isVector()) {
-    MVT VVT = VT;
+  } else if (EVT(VT).isVector()) {
+    EVT VVT = VT;
     OS << "VectorType::get(";
     EmitTypeForValueType(OS, VVT.getVectorElementType().getSimpleVT());
     OS << ", " << VVT.getVectorNumElements() << ")";
-  } else if (VT == MVT::iPTR) {
+  } else if (VT == EVT::iPTR) {
     OS << "PointerType::getUnqual(";
     EmitTypeGenerate(OS, ArgType->getValueAsDef("ElTy"), ArgNo);
     OS << ")";
-  } else if (VT == MVT::iPTRAny) {
+  } else if (VT == EVT::iPTRAny) {
     // Make sure the user has passed us an argument type to overload. If not,
     // treat it as an ordinary (not overloaded) intrinsic.
     OS << "(" << ArgNo << " < numTys) ? Tys[" << ArgNo 
@@ -227,11 +227,11 @@
     EmitTypeGenerate(OS, ArgType->getValueAsDef("ElTy"), ArgNo);
     OS << ")";
     ++ArgNo;
-  } else if (VT == MVT::isVoid) {
+  } else if (VT == EVT::isVoid) {
     if (ArgNo == 0)
       OS << "Type::VoidTy";
     else
-      // MVT::isVoid is used to mean varargs here.
+      // EVT::isVoid is used to mean varargs here.
       OS << "...";
   } else {
     EmitTypeForValueType(OS, VT);
@@ -326,13 +326,13 @@
         else
           OS << "~" << Number;
       } else {
-        MVT::SimpleValueType VT = getValueType(ArgType->getValueAsDef("VT"));
+        EVT::SimpleValueType VT = getValueType(ArgType->getValueAsDef("VT"));
         OS << getEnumName(VT);
 
-        if (VT == MVT::iAny || VT == MVT::fAny || VT == MVT::iPTRAny)
+        if (VT == EVT::iAny || VT == EVT::fAny || VT == EVT::iPTRAny)
           OverloadedTypeIndices.push_back(j);
 
-        if (VT == MVT::isVoid && j != 0 && j != je - 1)
+        if (VT == EVT::isVoid && j != 0 && j != je - 1)
           throw "Var arg type not last argument";
       }
     }
@@ -354,13 +354,13 @@
         else
           OS << "~" << Number;
       } else {
-        MVT::SimpleValueType VT = getValueType(ArgType->getValueAsDef("VT"));
+        EVT::SimpleValueType VT = getValueType(ArgType->getValueAsDef("VT"));
         OS << getEnumName(VT);
 
-        if (VT == MVT::iAny || VT == MVT::fAny || VT == MVT::iPTRAny)
+        if (VT == EVT::iAny || VT == EVT::fAny || VT == EVT::iPTRAny)
           OverloadedTypeIndices.push_back(j + RetTys.size());
 
-        if (VT == MVT::isVoid && j != 0 && j != je - 1)
+        if (VT == EVT::isVoid && j != 0 && j != je - 1)
           throw "Var arg type not last argument";
       }
     }
@@ -405,7 +405,7 @@
     unsigned N = ParamTys.size();
 
     if (N > 1 &&
-        getValueType(ParamTys[N - 1]->getValueAsDef("VT")) == MVT::isVoid) {
+        getValueType(ParamTys[N - 1]->getValueAsDef("VT")) == EVT::isVoid) {
       OS << "    IsVarArg = true;\n";
       --N;
     }
diff --git a/utils/TableGen/RegisterInfoEmitter.cpp b/utils/TableGen/RegisterInfoEmitter.cpp
index b278951..41ed56b 100644
--- a/utils/TableGen/RegisterInfoEmitter.cpp
+++ b/utils/TableGen/RegisterInfoEmitter.cpp
@@ -222,11 +222,11 @@
     // Emit the register list now.
     OS << "  // " << Name 
        << " Register Class Value Types...\n"
-       << "  static const MVT " << Name
+       << "  static const EVT " << Name
        << "[] = {\n    ";
     for (unsigned i = 0, e = RC.VTs.size(); i != e; ++i)
       OS << getEnumName(RC.VTs[i]) << ", ";
-    OS << "MVT::Other\n  };\n\n";
+    OS << "EVT::Other\n  };\n\n";
   }
   OS << "}  // end anonymous namespace\n\n";
   
diff --git a/utils/TableGen/TGValueTypes.cpp b/utils/TableGen/TGValueTypes.cpp
index e4edca6..a50c984 100644
--- a/utils/TableGen/TGValueTypes.cpp
+++ b/utils/TableGen/TGValueTypes.cpp
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// The MVT type is used by tablegen as well as in LLVM. In order to handle
-// extended types, the MVT type uses support functions that call into
+// The EVT type is used by tablegen as well as in LLVM. In order to handle
+// extended types, the EVT type uses support functions that call into
 // LLVM's type system code. These aren't accessible in tablegen, so this
 // file provides simple replacements.
 //
@@ -43,15 +43,15 @@
 };
 
 class ExtendedVectorType : public Type {
-  MVT ElementType;
+  EVT ElementType;
   unsigned NumElements;
 public:
-  ExtendedVectorType(MVT elty, unsigned num)
+  ExtendedVectorType(EVT elty, unsigned num)
     : ElementType(elty), NumElements(num) {}
   unsigned getSizeInBits() const {
     return getNumElements() * getElementType().getSizeInBits();
   }
-  MVT getElementType() const {
+  EVT getElementType() const {
     return ElementType;
   }
   unsigned getNumElements() const {
@@ -64,62 +64,62 @@
 static std::map<std::pair<uintptr_t, uintptr_t>, const Type *>
   ExtendedVectorTypeMap;
 
-MVT MVT::getExtendedIntegerVT(unsigned BitWidth) {
+EVT EVT::getExtendedIntegerVT(unsigned BitWidth) {
   const Type *&ET = ExtendedIntegerTypeMap[BitWidth];
   if (!ET) ET = new ExtendedIntegerType(BitWidth);
-  MVT VT;
+  EVT VT;
   VT.LLVMTy = ET;
   assert(VT.isExtended() && "Type is not extended!");
   return VT;
 }
 
-MVT MVT::getExtendedVectorVT(MVT VT, unsigned NumElements) {
+EVT EVT::getExtendedVectorVT(EVT VT, unsigned NumElements) {
   const Type *&ET = ExtendedVectorTypeMap[std::make_pair(VT.getRawBits(),
                                                          NumElements)];
   if (!ET) ET = new ExtendedVectorType(VT, NumElements);
-  MVT ResultVT;
+  EVT ResultVT;
   ResultVT.LLVMTy = ET;
   assert(ResultVT.isExtended() && "Type is not extended!");
   return ResultVT;
 }
 
-bool MVT::isExtendedFloatingPoint() const {
+bool EVT::isExtendedFloatingPoint() const {
   assert(isExtended() && "Type is not extended!");
   // Extended floating-point types are not supported yet.
   return false;
 }
 
-bool MVT::isExtendedInteger() const {
+bool EVT::isExtendedInteger() const {
   assert(isExtended() && "Type is not extended!");
   return dynamic_cast<const ExtendedIntegerType *>(LLVMTy) != 0;
 }
 
-bool MVT::isExtendedVector() const {
+bool EVT::isExtendedVector() const {
   assert(isExtended() && "Type is not extended!");
   return dynamic_cast<const ExtendedVectorType *>(LLVMTy) != 0;
 }
 
-bool MVT::isExtended64BitVector() const {
+bool EVT::isExtended64BitVector() const {
   assert(isExtended() && "Type is not extended!");
   return isExtendedVector() && getSizeInBits() == 64;
 }
 
-bool MVT::isExtended128BitVector() const {
+bool EVT::isExtended128BitVector() const {
   assert(isExtended() && "Type is not extended!");
   return isExtendedVector() && getSizeInBits() == 128;
 }
 
-MVT MVT::getExtendedVectorElementType() const {
+EVT EVT::getExtendedVectorElementType() const {
   assert(isExtendedVector() && "Type is not an extended vector!");
   return static_cast<const ExtendedVectorType *>(LLVMTy)->getElementType();
 }
 
-unsigned MVT::getExtendedVectorNumElements() const {
+unsigned EVT::getExtendedVectorNumElements() const {
   assert(isExtendedVector() && "Type is not an extended vector!");
   return static_cast<const ExtendedVectorType *>(LLVMTy)->getNumElements();
 }
 
-unsigned MVT::getExtendedSizeInBits() const {
+unsigned EVT::getExtendedSizeInBits() const {
   assert(isExtended() && "Type is not extended!");
   return LLVMTy->getSizeInBits();
 }