mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 21:18:19 +00:00
Intrinsics: introduce llvm_any_ty aka ValueType Any
Specifically, gc.result benefits from this greatly. Instead of: gc.result.int.* gc.result.float.* gc.result.ptr.* ... We now have a gc.result.* that can specialize to literally any type. Differential Revision: http://reviews.llvm.org/D7020 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226857 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -309,7 +309,7 @@ static void EncodeFixedType(Record *R, std::vector<unsigned char> &ArgCodes,
|
||||
Sig.push_back(IIT_HALF_VEC_ARG);
|
||||
else if (R->isSubClassOf("LLVMVectorSameWidth")) {
|
||||
Sig.push_back(IIT_SAME_VEC_WIDTH_ARG);
|
||||
Sig.push_back((Number << 2) | ArgCodes[Number]);
|
||||
Sig.push_back((Number << 3) | ArgCodes[Number]);
|
||||
MVT::SimpleValueType VT = getValueType(R->getValueAsDef("ElTy"));
|
||||
EncodeFixedValueType(VT, Sig);
|
||||
return;
|
||||
@@ -319,7 +319,7 @@ static void EncodeFixedType(Record *R, std::vector<unsigned char> &ArgCodes,
|
||||
}
|
||||
else
|
||||
Sig.push_back(IIT_ARG);
|
||||
return Sig.push_back((Number << 2) | ArgCodes[Number]);
|
||||
return Sig.push_back((Number << 3) | ArgCodes[Number]);
|
||||
}
|
||||
|
||||
MVT::SimpleValueType VT = getValueType(R->getValueAsDef("VT"));
|
||||
@@ -330,7 +330,8 @@ static void EncodeFixedType(Record *R, std::vector<unsigned char> &ArgCodes,
|
||||
case MVT::iPTRAny: ++Tmp; // FALL THROUGH.
|
||||
case MVT::vAny: ++Tmp; // FALL THROUGH.
|
||||
case MVT::fAny: ++Tmp; // FALL THROUGH.
|
||||
case MVT::iAny: {
|
||||
case MVT::iAny: ++Tmp; // FALL THROUGH.
|
||||
case MVT::Any: {
|
||||
// If this is an "any" valuetype, then the type is the type of the next
|
||||
// type in the list specified to getIntrinsic().
|
||||
Sig.push_back(IIT_ARG);
|
||||
@@ -339,8 +340,8 @@ static void EncodeFixedType(Record *R, std::vector<unsigned char> &ArgCodes,
|
||||
unsigned ArgNo = ArgCodes.size();
|
||||
ArgCodes.push_back(Tmp);
|
||||
|
||||
// Encode what sort of argument it must be in the low 2 bits of the ArgNo.
|
||||
return Sig.push_back((ArgNo << 2) | Tmp);
|
||||
// Encode what sort of argument it must be in the low 3 bits of the ArgNo.
|
||||
return Sig.push_back((ArgNo << 3) | Tmp);
|
||||
}
|
||||
|
||||
case MVT::iPTR: {
|
||||
|
||||
Reference in New Issue
Block a user