[llvm-commits] CVS: llvm/utils/TableGen/DAGISelEmitter.cpp

Chris Lattner lattner at cs.uiuc.edu
Mon Mar 20 22:43:10 PST 2006



Changes in directory llvm/utils/TableGen:

DAGISelEmitter.cpp updated: 1.180 -> 1.181
---
Log message:

minor code simplification


---
Diffs of the changes:  (+5 -11)

 DAGISelEmitter.cpp |   16 +++++-----------
 1 files changed, 5 insertions(+), 11 deletions(-)


Index: llvm/utils/TableGen/DAGISelEmitter.cpp
diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.180 llvm/utils/TableGen/DAGISelEmitter.cpp:1.181
--- llvm/utils/TableGen/DAGISelEmitter.cpp:1.180	Mon Mar 20 16:53:06 2006
+++ llvm/utils/TableGen/DAGISelEmitter.cpp	Tue Mar 21 00:42:58 2006
@@ -698,17 +698,11 @@
     if (getNumChildren() != 1)
       TP.error("Node transform '" + getOperator()->getName() +
                "' requires one operand!");
-    unsigned char ExtType0 = getExtTypeNum(0);
-    unsigned char ChildExtType0 = getChild(0)->getExtTypeNum(0);
-    if (ExtType0 == MVT::isInt ||
-        ExtType0 == MVT::isFP ||
-        ExtType0 == MVT::isUnknown ||
-        ChildExtType0 == MVT::isInt ||
-        ChildExtType0 == MVT::isFP ||
-        ChildExtType0 == MVT::isUnknown) {
-      // If either the output or input of the xform does not have exact
-      // type info. We assume they must be the same. Otherwise, it is perfectly
-      // legal to transform from one type to a completely different type.
+
+    // If either the output or input of the xform does not have exact
+    // type info. We assume they must be the same. Otherwise, it is perfectly
+    // legal to transform from one type to a completely different type.
+    if (!hasTypeSet() || !getChild(0)->hasTypeSet()) {
       bool MadeChange = UpdateNodeType(getChild(0)->getExtTypes(), TP);
       MadeChange |= getChild(0)->UpdateNodeType(getExtTypes(), TP);
       return MadeChange;






More information about the llvm-commits mailing list