summaryrefslogtreecommitdiff
path: root/utils/TableGen/IntrinsicEmitter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2012-05-17 04:07:48 +0000
committerChris Lattner <sabre@nondot.org>2012-05-17 04:07:48 +0000
commit15706cbf8520f7c372e1c2e441e3b5d18f24aafd (patch)
treed8c0c23f63b36e202fd5b80aadd2242355aa02ea /utils/TableGen/IntrinsicEmitter.cpp
parente4807c1ba1233c717efa63c7ed405aeec8e792ac (diff)
downloadllvm-15706cbf8520f7c372e1c2e441e3b5d18f24aafd.tar.gz
llvm-15706cbf8520f7c372e1c2e441e3b5d18f24aafd.tar.bz2
llvm-15706cbf8520f7c372e1c2e441e3b5d18f24aafd.tar.xz
simplify code generated by tblgen that is not necessary since we dropped
compatibility with LLVM 2.x bitcode files. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156976 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/IntrinsicEmitter.cpp')
-rw-r--r--utils/TableGen/IntrinsicEmitter.cpp24
1 files changed, 4 insertions, 20 deletions
diff --git a/utils/TableGen/IntrinsicEmitter.cpp b/utils/TableGen/IntrinsicEmitter.cpp
index 9630c926ac..bd4798235c 100644
--- a/utils/TableGen/IntrinsicEmitter.cpp
+++ b/utils/TableGen/IntrinsicEmitter.cpp
@@ -376,7 +376,8 @@ static void EmitTypeGenerate(raw_ostream &OS, const Record *ArgType,
<< "(cast<VectorType>(Tys[" << Number << "]))";
else
OS << "Tys[" << Number << "]";
- } else if (VT == MVT::iAny || VT == MVT::fAny || VT == MVT::vAny) {
+ } else if (VT == MVT::iAny || VT == MVT::fAny || VT == MVT::vAny ||
+ VT == MVT::iPTRAny) {
// 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
@@ -392,14 +393,6 @@ static void EmitTypeGenerate(raw_ostream &OS, const Record *ArgType,
OS << "PointerType::getUnqual(";
EmitTypeGenerate(OS, ArgType->getValueAsDef("ElTy"), ArgNo);
OS << ")";
- } 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 << " < Tys.size()) ? Tys[" << ArgNo
- << "] : PointerType::getUnqual(";
- EmitTypeGenerate(OS, ArgType->getValueAsDef("ElTy"), ArgNo);
- OS << ")";
- ++ArgNo;
} else if (VT == MVT::isVoid) {
assert(ArgNo == 0);
OS << "Type::getVoidTy(Context)";
@@ -490,7 +483,8 @@ static void EncodeFixedType(Record *R, SmallVectorImpl<unsigned> &Sig) {
MVT::SimpleValueType VT = getValueType(R->getValueAsDef("VT"));
- if (VT == MVT::iAny || VT == MVT::fAny || VT == MVT::vAny) {
+ if (VT == MVT::iAny || VT == MVT::fAny || VT == MVT::vAny ||
+ VT == MVT::iPTRAny) {
return Sig.push_back(~0U);
/*
// NOTE: The ArgNo variable here is not the absolute argument number, it is
@@ -521,16 +515,6 @@ static void EncodeFixedType(Record *R, SmallVectorImpl<unsigned> &Sig) {
return EncodeFixedType(R->getValueAsDef("ElTy"), Sig);
}
- /*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 << " < Tys.size()) ? Tys[" << ArgNo
- << "] : PointerType::getUnqual(";
- EmitTypeGenerate(OS, ArgType->getValueAsDef("ElTy"), ArgNo);
- OS << ")";
- ++ArgNo;
- }*/
-
assert(VT != MVT::isVoid);
EncodeFixedValueType(VT, Sig);
}