diff options
author | Chris Lattner <sabre@nondot.org> | 2005-12-09 22:57:42 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-12-09 22:57:42 +0000 |
commit | 5b21be76e1542276983d376c59ce542bcb6c921a (patch) | |
tree | d68fd3efa9835032c43ebd7d9a9fc11352b9cdd4 /utils/TableGen/DAGISelEmitter.cpp | |
parent | ab24ed2a322ec0c8be04ec684c75bc73faa1d346 (diff) | |
download | external_llvm-5b21be76e1542276983d376c59ce542bcb6c921a.zip external_llvm-5b21be76e1542276983d376c59ce542bcb6c921a.tar.gz external_llvm-5b21be76e1542276983d376c59ce542bcb6c921a.tar.bz2 |
Add a new SDTCisPtrTy constraint, which indicates that an operand must have
the same type as the pointer type for a target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24649 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/DAGISelEmitter.cpp')
-rw-r--r-- | utils/TableGen/DAGISelEmitter.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/utils/TableGen/DAGISelEmitter.cpp b/utils/TableGen/DAGISelEmitter.cpp index f663c55..285c10f 100644 --- a/utils/TableGen/DAGISelEmitter.cpp +++ b/utils/TableGen/DAGISelEmitter.cpp @@ -58,6 +58,8 @@ SDTypeConstraint::SDTypeConstraint(Record *R) { if (R->isSubClassOf("SDTCisVT")) { ConstraintType = SDTCisVT; x.SDTCisVT_Info.VT = getValueType(R->getValueAsDef("VT")); + } else if (R->isSubClassOf("SDTCisPtrTy")) { + ConstraintType = SDTCisPtrTy; } else if (R->isSubClassOf("SDTCisInt")) { ConstraintType = SDTCisInt; } else if (R->isSubClassOf("SDTCisFP")) { @@ -120,6 +122,10 @@ bool SDTypeConstraint::ApplyTypeConstraint(TreePatternNode *N, case SDTCisVT: // Operand must be a particular type. return NodeToApply->UpdateNodeType(x.SDTCisVT_Info.VT, TP); + case SDTCisPtrTy: { + // Operand must be same as target pointer type. + return NodeToApply->UpdateNodeType(CGT.getPointerType(), TP); + } case SDTCisInt: { // If there is only one integer type supported, this must be it. std::vector<MVT::ValueType> IntVTs = |