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

Evan Cheng evan.cheng at apple.com
Mon Oct 9 14:02:31 PDT 2006



Changes in directory llvm/utils/TableGen:

DAGISelEmitter.cpp updated: 1.263 -> 1.264
---
Log message:

Predicate function on the node should be matched before its childrean' matching
code. This is especially important now matching ISD::LOAD also requires a
Predicate_Load call.


---
Diffs of the changes:  (+4 -4)

 DAGISelEmitter.cpp |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)


Index: llvm/utils/TableGen/DAGISelEmitter.cpp
diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.263 llvm/utils/TableGen/DAGISelEmitter.cpp:1.264
--- llvm/utils/TableGen/DAGISelEmitter.cpp:1.263	Thu Sep 21 15:46:13 2006
+++ llvm/utils/TableGen/DAGISelEmitter.cpp	Mon Oct  9 16:02:17 2006
@@ -2312,6 +2312,10 @@
       }
     }
 
+    // If there is a node predicate for this, emit the call.
+    if (!N->getPredicateFn().empty())
+      emitCheck(N->getPredicateFn() + "(" + RootName + ".Val)");
+
     const ComplexPattern *CP;
     for (unsigned i = 0, e = N->getNumChildren(); i != e; ++i, ++OpNo) {
       emitInit("SDOperand " + RootName + utostr(OpNo) + " = " +
@@ -2420,10 +2424,6 @@
         Code += ", CPTmp" + utostr(i);
       emitCheck(Code + ")");
     }
-
-    // If there is a node predicate for this, emit the call.
-    if (!N->getPredicateFn().empty())
-      emitCheck(N->getPredicateFn() + "(" + RootName + ".Val)");
   }
 
   /// EmitResultCode - Emit the action for a pattern.  Now that it has matched






More information about the llvm-commits mailing list