[llvm-commits] CVS: llvm/utils/TableGen/DAGISelEmitter.cpp DAGISelEmitter.h
Chris Lattner
lattner at cs.uiuc.edu
Fri Dec 9 14:57:53 PST 2005
Changes in directory llvm/utils/TableGen:
DAGISelEmitter.cpp updated: 1.90 -> 1.91
DAGISelEmitter.h updated: 1.43 -> 1.44
---
Log message:
Add a new SDTCisPtrTy constraint, which indicates that an operand must have
the same type as the pointer type for a target.
---
Diffs of the changes: (+8 -2)
DAGISelEmitter.cpp | 6 ++++++
DAGISelEmitter.h | 4 ++--
2 files changed, 8 insertions(+), 2 deletions(-)
Index: llvm/utils/TableGen/DAGISelEmitter.cpp
diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.90 llvm/utils/TableGen/DAGISelEmitter.cpp:1.91
--- llvm/utils/TableGen/DAGISelEmitter.cpp:1.90 Fri Dec 9 16:45:35 2005
+++ llvm/utils/TableGen/DAGISelEmitter.cpp Fri Dec 9 16:57:42 2005
@@ -58,6 +58,8 @@
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 @@
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 =
Index: llvm/utils/TableGen/DAGISelEmitter.h
diff -u llvm/utils/TableGen/DAGISelEmitter.h:1.43 llvm/utils/TableGen/DAGISelEmitter.h:1.44
--- llvm/utils/TableGen/DAGISelEmitter.h:1.43 Fri Dec 9 16:45:35 2005
+++ llvm/utils/TableGen/DAGISelEmitter.h Fri Dec 9 16:57:42 2005
@@ -45,8 +45,8 @@
unsigned OperandNo; // The operand # this constraint applies to.
enum {
- SDTCisVT, SDTCisInt, SDTCisFP, SDTCisSameAs, SDTCisVTSmallerThanOp,
- SDTCisOpSmallerThanOp
+ SDTCisVT, SDTCisPtrTy, SDTCisInt, SDTCisFP, SDTCisSameAs,
+ SDTCisVTSmallerThanOp, SDTCisOpSmallerThanOp
} ConstraintType;
union { // The discriminated union.
More information about the llvm-commits
mailing list