[llvm-commits] [llvm] r37899 - in /llvm/trunk/utils/TableGen: CodeGenTarget.cpp InstrInfoEmitter.cpp

Evan Cheng evan.cheng at apple.com
Thu Jul 5 00:19:30 PDT 2007


Author: evancheng
Date: Thu Jul  5 02:19:29 2007
New Revision: 37899

URL: http://llvm.org/viewvc/llvm-project?rev=37899&view=rev
Log:
Instructions with ImmutablePredicateOperand aren't really predicable since their predicates are fixed at isel time.

Modified:
    llvm/trunk/utils/TableGen/CodeGenTarget.cpp
    llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp

Modified: llvm/trunk/utils/TableGen/CodeGenTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenTarget.cpp?rev=37899&r1=37898&r2=37899&view=diff

==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenTarget.cpp (original)
+++ llvm/trunk/utils/TableGen/CodeGenTarget.cpp Thu Jul  5 02:19:29 2007
@@ -411,7 +411,10 @@
       if (unsigned NumArgs = MIOpInfo->getNumArgs())
         NumOps = NumArgs;
 
-      isPredicable |= Rec->isSubClassOf("PredicateOperand");
+      if (Rec->isSubClassOf("PredicateOperand")) {
+        if (!Rec->getValueAsBit("isImmutable"))
+          isPredicable = true;
+      }
     } else if (Rec->getName() == "variable_ops") {
       hasVariableNumberOfOperands = true;
       continue;

Modified: llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp?rev=37899&r1=37898&r2=37899&view=diff

==============================================================================
--- llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp Thu Jul  5 02:19:29 2007
@@ -107,7 +107,8 @@
 
       // Predicate operands.  Check to see if the original unexpanded operand
       // was of type PredicateOperand.
-      if (Inst.OperandList[i].Rec->isSubClassOf("PredicateOperand"))
+      if (Inst.OperandList[i].Rec->isSubClassOf("PredicateOperand") &&
+          !Inst.OperandList[i].Rec->getValueAsBit("isImmutable"))
         Res += "|M_PREDICATE_OPERAND";
         
       // Fill in constraint info.





More information about the llvm-commits mailing list