[llvm-commits] [llvm] r156976 - /llvm/trunk/utils/TableGen/IntrinsicEmitter.cpp
Chris Lattner
sabre at nondot.org
Wed May 16 21:07:48 PDT 2012
Author: lattner
Date: Wed May 16 23:07:48 2012
New Revision: 156976
URL: http://llvm.org/viewvc/llvm-project?rev=156976&view=rev
Log:
simplify code generated by tblgen that is not necessary since we dropped
compatibility with LLVM 2.x bitcode files.
Modified:
llvm/trunk/utils/TableGen/IntrinsicEmitter.cpp
Modified: llvm/trunk/utils/TableGen/IntrinsicEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/IntrinsicEmitter.cpp?rev=156976&r1=156975&r2=156976&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/IntrinsicEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/IntrinsicEmitter.cpp Wed May 16 23:07:48 2012
@@ -376,7 +376,8 @@
<< "(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 @@
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 @@
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 @@
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);
}
More information about the llvm-commits
mailing list