[llvm-commits] [llvm] r111397 - in /llvm/trunk: include/llvm/ADT/DepthFirstIterator.h lib/CodeGen/SplitKit.cpp

Jakob Stoklund Olesen stoklund at 2pi.dk
Wed Aug 18 13:06:05 PDT 2010


Author: stoklund
Date: Wed Aug 18 15:06:05 2010
New Revision: 111397

URL: http://llvm.org/viewvc/llvm-project?rev=111397&view=rev
Log:
Revert r111394. It was too aggressive.

We must complete the DFS, otherwise we might miss needed phi-defs, and
prematurely color live ranges with a non-dominating value.

This is not a big deal since we get to color more of the CFG and the next
mapValue call will be faster.

Modified:
    llvm/trunk/include/llvm/ADT/DepthFirstIterator.h
    llvm/trunk/lib/CodeGen/SplitKit.cpp

Modified: llvm/trunk/include/llvm/ADT/DepthFirstIterator.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/DepthFirstIterator.h?rev=111397&r1=111396&r2=111397&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/DepthFirstIterator.h (original)
+++ llvm/trunk/include/llvm/ADT/DepthFirstIterator.h Wed Aug 18 15:06:05 2010
@@ -193,15 +193,6 @@
   NodeType *getPath(unsigned n) const {
     return VisitStack[n].first.getPointer();
   }
-
-  /// skipChildren - Skip all children of Node, assuming that Node is on the
-  /// current path. This allows more aggressive pruning than just skipping
-  /// children of the current node.
-  _Self& skipChildren(NodeType *Node) {
-    while (!VisitStack.empty() && **this != Node)
-      VisitStack.pop_back();
-    return skipChildren();
-  }
 };
 
 

Modified: llvm/trunk/lib/CodeGen/SplitKit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SplitKit.cpp?rev=111397&r1=111396&r2=111397&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SplitKit.cpp (original)
+++ llvm/trunk/lib/CodeGen/SplitKit.cpp Wed Aug 18 15:06:05 2010
@@ -446,9 +446,9 @@
     }
 
     // No need to search the children, we found a dominating value.
-    // MBB is either the found dominating value, or the last phi-def we created.
-    // Either way, the children of MBB would be shadowed, so don't search them.
-    IDFI.skipChildren(MBB);
+    // FIXME: We could prune up to the last phi-def we inserted, need df_iterator
+    // for that.
+    IDFI.skipChildren();
   }
 
   // The search should at least find a dominating value for IdxMBB.





More information about the llvm-commits mailing list