[llvm-commits] CVS: llvm/utils/TableGen/DAGISelEmitter.cpp DAGISelEmitter.h
Chris Lattner
lattner at cs.uiuc.edu
Thu Oct 13 21:54:04 PDT 2005
Changes in directory llvm/utils/TableGen:
DAGISelEmitter.cpp updated: 1.52 -> 1.53
DAGISelEmitter.h updated: 1.30 -> 1.31
---
Log message:
Add basic support for recognizing a new SDTCisOpSmallerThanOp type constraint
---
Diffs of the changes: (+13 -1)
DAGISelEmitter.cpp | 8 ++++++++
DAGISelEmitter.h | 6 +++++-
2 files changed, 13 insertions(+), 1 deletion(-)
Index: llvm/utils/TableGen/DAGISelEmitter.cpp
diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.52 llvm/utils/TableGen/DAGISelEmitter.cpp:1.53
--- llvm/utils/TableGen/DAGISelEmitter.cpp:1.52 Thu Oct 13 23:11:13 2005
+++ llvm/utils/TableGen/DAGISelEmitter.cpp Thu Oct 13 23:53:53 2005
@@ -40,6 +40,10 @@
ConstraintType = SDTCisVTSmallerThanOp;
x.SDTCisVTSmallerThanOp_Info.OtherOperandNum =
R->getValueAsInt("OtherOperandNum");
+ } else if (R->isSubClassOf("SDTCisOpSmallerThanOp")) {
+ ConstraintType = SDTCisOpSmallerThanOp;
+ x.SDTCisOpSmallerThanOp_Info.BigOperandNum =
+ R->getValueAsInt("BigOperandNum");
} else {
std::cerr << "Unrecognized SDTypeConstraint '" << R->getName() << "'!\n";
exit(1);
@@ -157,6 +161,10 @@
OtherNode->UpdateNodeType(MVT::Other, TP); // Throw an error.
return false;
}
+ case SDTCisOpSmallerThanOp: {
+ // TODO
+ return false;
+ }
}
return false;
}
Index: llvm/utils/TableGen/DAGISelEmitter.h
diff -u llvm/utils/TableGen/DAGISelEmitter.h:1.30 llvm/utils/TableGen/DAGISelEmitter.h:1.31
--- llvm/utils/TableGen/DAGISelEmitter.h:1.30 Thu Oct 13 23:11:13 2005
+++ llvm/utils/TableGen/DAGISelEmitter.h Thu Oct 13 23:53:53 2005
@@ -34,7 +34,8 @@
unsigned OperandNo; // The operand # this constraint applies to.
enum {
- SDTCisVT, SDTCisInt, SDTCisFP, SDTCisSameAs, SDTCisVTSmallerThanOp
+ SDTCisVT, SDTCisInt, SDTCisFP, SDTCisSameAs, SDTCisVTSmallerThanOp,
+ SDTCisOpSmallerThanOp
} ConstraintType;
union { // The discriminated union.
@@ -47,6 +48,9 @@
struct {
unsigned OtherOperandNum;
} SDTCisVTSmallerThanOp_Info;
+ struct {
+ unsigned BigOperandNum;
+ } SDTCisOpSmallerThanOp_Info;
} x;
/// ApplyTypeConstraint - Given a node in a pattern, apply this type
More information about the llvm-commits
mailing list