diff options
author | Bob Wilson <bob.wilson@apple.com> | 2009-08-12 22:30:59 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2009-08-12 22:30:59 +0000 |
commit | f7e587fd53fc95866c491e3203c9d9664cf510e8 (patch) | |
tree | 44541a162bcade290b61b5f14350350f91fb912b /llvm/utils/TableGen/CodeGenDAGPatterns.h | |
parent | 1432ef864e363e91890bb1f9678f499f866dda0f (diff) | |
download | bcm5719-llvm-f7e587fd53fc95866c491e3203c9d9664cf510e8.tar.gz bcm5719-llvm-f7e587fd53fc95866c491e3203c9d9664cf510e8.zip |
Add a new "SDTCisVec" SDTypeConstraint. This complements the vAny type.
There have been a few times where I've wanted this but ended up leaving the
operand type unconstrained. It is easy to add this now and should help
catch errors in the future.
llvm-svn: 78849
Diffstat (limited to 'llvm/utils/TableGen/CodeGenDAGPatterns.h')
-rw-r--r-- | llvm/utils/TableGen/CodeGenDAGPatterns.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/llvm/utils/TableGen/CodeGenDAGPatterns.h b/llvm/utils/TableGen/CodeGenDAGPatterns.h index 7c2791d4406..56dcfcff910 100644 --- a/llvm/utils/TableGen/CodeGenDAGPatterns.h +++ b/llvm/utils/TableGen/CodeGenDAGPatterns.h @@ -39,16 +39,21 @@ namespace EEVT { enum DAGISelGenValueType { isFP = MVT::LAST_VALUETYPE, isInt, + isVec, isUnknown }; - /// isExtIntegerVT - Return true if the specified extended value type vector - /// contains isInt or an integer value type. + /// isExtIntegerInVTs - Return true if the specified extended value type + /// vector contains isInt or an integer value type. bool isExtIntegerInVTs(const std::vector<unsigned char> &EVTs); - /// isExtFloatingPointVT - Return true if the specified extended value type - /// vector contains isFP or a FP value type. + /// isExtFloatingPointInVTs - Return true if the specified extended value + /// type vector contains isFP or a FP value type. bool isExtFloatingPointInVTs(const std::vector<unsigned char> &EVTs); + + /// isExtVectorinVTs - Return true if the specified extended value type + /// vector contains isVec or a vector value type. + bool isExtVectorInVTs(const std::vector<unsigned char> &EVTs); } /// Set type used to track multiply used variables in patterns @@ -61,7 +66,7 @@ struct SDTypeConstraint { unsigned OperandNo; // The operand # this constraint applies to. enum { - SDTCisVT, SDTCisPtrTy, SDTCisInt, SDTCisFP, SDTCisSameAs, + SDTCisVT, SDTCisPtrTy, SDTCisInt, SDTCisFP, SDTCisVec, SDTCisSameAs, SDTCisVTSmallerThanOp, SDTCisOpSmallerThanOp, SDTCisEltOfVec } ConstraintType; |