summaryrefslogtreecommitdiff
path: root/utils/TableGen/IntrinsicEmitter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utils/TableGen/IntrinsicEmitter.cpp')
-rw-r--r--utils/TableGen/IntrinsicEmitter.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/utils/TableGen/IntrinsicEmitter.cpp b/utils/TableGen/IntrinsicEmitter.cpp
index 79874b1629..1497e9029d 100644
--- a/utils/TableGen/IntrinsicEmitter.cpp
+++ b/utils/TableGen/IntrinsicEmitter.cpp
@@ -140,26 +140,26 @@ EmitIntrinsicToOverloadTable(const std::vector<CodeGenIntrinsic> &Ints,
OS << "#endif\n\n";
}
-static void EmitTypeForValueType(raw_ostream &OS, EVT::SimpleValueType VT) {
+static void EmitTypeForValueType(raw_ostream &OS, MVT::SimpleValueType VT) {
if (EVT(VT).isInteger()) {
unsigned BitWidth = EVT(VT).getSizeInBits();
OS << "IntegerType::get(" << BitWidth << ")";
- } else if (VT == EVT::Other) {
- // EVT::OtherVT is used to mean the empty struct type here.
+ } else if (VT == MVT::Other) {
+ // MVT::OtherVT is used to mean the empty struct type here.
OS << "StructType::get(Context)";
- } else if (VT == EVT::f32) {
+ } else if (VT == MVT::f32) {
OS << "Type::FloatTy";
- } else if (VT == EVT::f64) {
+ } else if (VT == MVT::f64) {
OS << "Type::DoubleTy";
- } else if (VT == EVT::f80) {
+ } else if (VT == MVT::f80) {
OS << "Type::X86_FP80Ty";
- } else if (VT == EVT::f128) {
+ } else if (VT == MVT::f128) {
OS << "Type::FP128Ty";
- } else if (VT == EVT::ppcf128) {
+ } else if (VT == MVT::ppcf128) {
OS << "Type::PPC_FP128Ty";
- } else if (VT == EVT::isVoid) {
+ } else if (VT == MVT::isVoid) {
OS << "Type::VoidTy";
- } else if (VT == EVT::Metadata) {
+ } else if (VT == MVT::Metadata) {
OS << "Type::MetadataTy";
} else {
assert(false && "Unsupported ValueType!");
@@ -190,7 +190,7 @@ static void EmitTypeGenerate(raw_ostream &OS,
static void EmitTypeGenerate(raw_ostream &OS, const Record *ArgType,
unsigned &ArgNo) {
- EVT::SimpleValueType VT = getValueType(ArgType->getValueAsDef("VT"));
+ MVT::SimpleValueType VT = getValueType(ArgType->getValueAsDef("VT"));
if (ArgType->isSubClassOf("LLVMMatchType")) {
unsigned Number = ArgType->getValueAsInt("Number");
@@ -203,7 +203,7 @@ static void EmitTypeGenerate(raw_ostream &OS, const Record *ArgType,
<< "(dyn_cast<VectorType>(Tys[" << Number << "]))";
else
OS << "Tys[" << Number << "]";
- } else if (VT == EVT::iAny || VT == EVT::fAny || VT == EVT::vAny) {
+ } else if (VT == MVT::iAny || VT == MVT::fAny || VT == MVT::vAny) {
// 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
@@ -213,13 +213,13 @@ static void EmitTypeGenerate(raw_ostream &OS, const Record *ArgType,
} else if (EVT(VT).isVector()) {
EVT VVT = VT;
OS << "VectorType::get(";
- EmitTypeForValueType(OS, VVT.getVectorElementType().getSimpleVT());
+ EmitTypeForValueType(OS, VVT.getVectorElementType().getSimpleVT().SimpleTy);
OS << ", " << VVT.getVectorNumElements() << ")";
- } else if (VT == EVT::iPTR) {
+ } else if (VT == MVT::iPTR) {
OS << "PointerType::getUnqual(";
EmitTypeGenerate(OS, ArgType->getValueAsDef("ElTy"), ArgNo);
OS << ")";
- } else if (VT == EVT::iPTRAny) {
+ } else if (VT == MVT::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 @@ static void EmitTypeGenerate(raw_ostream &OS, const Record *ArgType,
EmitTypeGenerate(OS, ArgType->getValueAsDef("ElTy"), ArgNo);
OS << ")";
++ArgNo;
- } else if (VT == EVT::isVoid) {
+ } else if (VT == MVT::isVoid) {
if (ArgNo == 0)
OS << "Type::VoidTy";
else
- // EVT::isVoid is used to mean varargs here.
+ // MVT::isVoid is used to mean varargs here.
OS << "...";
} else {
EmitTypeForValueType(OS, VT);
@@ -326,13 +326,13 @@ void IntrinsicEmitter::EmitVerifier(const std::vector<CodeGenIntrinsic> &Ints,
else
OS << "~" << Number;
} else {
- EVT::SimpleValueType VT = getValueType(ArgType->getValueAsDef("VT"));
+ MVT::SimpleValueType VT = getValueType(ArgType->getValueAsDef("VT"));
OS << getEnumName(VT);
if (EVT(VT).isOverloaded())
OverloadedTypeIndices.push_back(j);
- if (VT == EVT::isVoid && j != 0 && j != je - 1)
+ if (VT == MVT::isVoid && j != 0 && j != je - 1)
throw "Var arg type not last argument";
}
}
@@ -354,13 +354,13 @@ void IntrinsicEmitter::EmitVerifier(const std::vector<CodeGenIntrinsic> &Ints,
else
OS << "~" << Number;
} else {
- EVT::SimpleValueType VT = getValueType(ArgType->getValueAsDef("VT"));
+ MVT::SimpleValueType VT = getValueType(ArgType->getValueAsDef("VT"));
OS << getEnumName(VT);
if (EVT(VT).isOverloaded())
OverloadedTypeIndices.push_back(j + RetTys.size());
- if (VT == EVT::isVoid && j != 0 && j != je - 1)
+ if (VT == MVT::isVoid && j != 0 && j != je - 1)
throw "Var arg type not last argument";
}
}
@@ -405,7 +405,7 @@ void IntrinsicEmitter::EmitGenerator(const std::vector<CodeGenIntrinsic> &Ints,
unsigned N = ParamTys.size();
if (N > 1 &&
- getValueType(ParamTys[N - 1]->getValueAsDef("VT")) == EVT::isVoid) {
+ getValueType(ParamTys[N - 1]->getValueAsDef("VT")) == MVT::isVoid) {
OS << " IsVarArg = true;\n";
--N;
}