handle the case where a node can become ready to process
authorChris Lattner <sabre@nondot.org>
Sun, 3 Feb 2008 07:13:32 +0000 (07:13 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 3 Feb 2008 07:13:32 +0000 (07:13 +0000)
multiple times due to a RAUW.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46680 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
lib/CodeGen/SelectionDAG/LegalizeTypes.h

index 85a96a8e265d1bac1cc5126ee92bfaff33af833b..76b7527f68b555737a83385f408a2f483c7beb52 100644 (file)
@@ -234,7 +234,8 @@ namespace {
       // Node updates can mean pretty much anything.  It is possible that an
       // operand was set to something already processed (f.e.) in which case
       // this node could become ready.  Recompoute its flags.
-      DTL.ReanalyzeNodeFlags(N);
+      if (N->getNodeId() != DAGTypeLegalizer::ReadyToProcess)
+        DTL.ReanalyzeNodeFlags(N);
     }
   };
 }
index 912747df704631d17ca30e5ed519e42ab410cf76..23d9bf125ec1fed702efb29d5c703702ee49cf2c 100644 (file)
@@ -40,7 +40,7 @@ namespace llvm {
 class VISIBILITY_HIDDEN DAGTypeLegalizer {
   TargetLowering &TLI;
   SelectionDAG &DAG;
-  
+public:
   // NodeIDFlags - This pass uses the NodeID on the SDNodes to hold information
   // about the state of the node.  The enum has all the values.
   enum NodeIDFlags {
@@ -57,7 +57,7 @@ class VISIBILITY_HIDDEN DAGTypeLegalizer {
     
     // 1+ - This is a node which has this many unlegalized operands.
   };
-  
+private:
   enum LegalizeAction {
     Legal,      // The target natively supports this type.
     Promote,    // This type should be executed in a larger type.