[llvm-commits] [llvm] r55002 - /llvm/trunk/utils/TableGen/FastISelEmitter.cpp

Dan Gohman gohman at apple.com
Tue Aug 19 13:30:55 PDT 2008


Author: djg
Date: Tue Aug 19 15:30:54 2008
New Revision: 55002

URL: http://llvm.org/viewvc/llvm-project?rev=55002&view=rev
Log:
Add more checking to filter out more kinds of things that
FastISel doesn't support yet.

Modified:
    llvm/trunk/utils/TableGen/FastISelEmitter.cpp

Modified: llvm/trunk/utils/TableGen/FastISelEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/FastISelEmitter.cpp?rev=55002&r1=55001&r2=55002&view=diff

==============================================================================
--- llvm/trunk/utils/TableGen/FastISelEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/FastISelEmitter.cpp Tue Aug 19 15:30:54 2008
@@ -180,9 +180,16 @@
     MVT::SimpleValueType VT = InstPatNode->getTypeNum(0);
 
     // For now, filter out instructions which just set a register to
-    // an Operand, like MOV32ri.
+    // an Operand or an immediate, like MOV32ri.
     if (InstPatOp->isSubClassOf("Operand"))
       continue;
+    if (InstPatOp->getName() == "imm" ||
+        InstPatOp->getName() == "fpimm")
+      continue;
+
+    // For now, filter out any instructions with predicates.
+    if (!InstPatNode->getPredicateFn().empty())
+      continue;
 
     // Check all the operands. For now only accept register operands.
     OperandsSignature Operands;
@@ -190,6 +197,9 @@
       TreePatternNode *Op = InstPatNode->getChild(i);
       if (!Op->isLeaf())
         goto continue_label;
+      // For now, filter out any operand with a predicate.
+      if (!Op->getPredicateFn().empty())
+        goto continue_label;
       DefInit *OpDI = dynamic_cast<DefInit*>(Op->getLeafValue());
       if (!OpDI)
         goto continue_label;





More information about the llvm-commits mailing list