mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-23 14:25:07 +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:
@@ -152,7 +152,11 @@ namespace llvm {
|
||||
|
||||
// iPTR - An int value the size of the pointer of the current
|
||||
// target. This should only be used internal to tblgen!
|
||||
iPTR = 255
|
||||
iPTR = 255,
|
||||
|
||||
// Any - Any type. This is used for intrinsics that have overloadings.
|
||||
// This is only for tblgen's consumption!
|
||||
Any = 256
|
||||
};
|
||||
|
||||
SimpleValueType SimpleTy;
|
||||
@@ -245,7 +249,8 @@ namespace llvm {
|
||||
|
||||
/// isOverloaded - Return true if this is an overloaded type for TableGen.
|
||||
bool isOverloaded() const {
|
||||
return (SimpleTy==MVT::iAny || SimpleTy==MVT::fAny ||
|
||||
return (SimpleTy==MVT::Any ||
|
||||
SimpleTy==MVT::iAny || SimpleTy==MVT::fAny ||
|
||||
SimpleTy==MVT::vAny || SimpleTy==MVT::iPTRAny);
|
||||
}
|
||||
|
||||
@@ -380,6 +385,7 @@ namespace llvm {
|
||||
case iAny:
|
||||
case fAny:
|
||||
case vAny:
|
||||
case Any:
|
||||
llvm_unreachable("Value type is overloaded.");
|
||||
case Metadata:
|
||||
llvm_unreachable("Value type is metadata.");
|
||||
|
@@ -98,3 +98,6 @@ def iAny : ValueType<0 , 254>;
|
||||
|
||||
// Pseudo valuetype mapped to the current pointer size.
|
||||
def iPTR : ValueType<0 , 255>;
|
||||
|
||||
// Pseudo valuetype to represent "any type of any size".
|
||||
def Any : ValueType<0 , 256>;
|
||||
|
Reference in New Issue
Block a user