Move a load into the only branch where it is used and eliminate a temporary.
authorCameron Zwarich <zwarich@apple.com>
Sun, 2 Jan 2011 10:50:14 +0000 (10:50 +0000)
committerCameron Zwarich <zwarich@apple.com>
Sun, 2 Jan 2011 10:50:14 +0000 (10:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122690 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/DominatorInternals.h

index 88e7073f84f8b8496866c20cd1777d108006c0b6..b1895b5f18e8f78d2f4747e45a64295830b10ac1 100644 (file)
@@ -238,13 +238,11 @@ void Calculate(DominatorTreeBase<typename GraphTraits<NodeT>::NodeType>& DT,
       }
     }
 
-    typename GraphT::NodeType* WParent = DT.Vertex[WInfo.Parent];
-
     // If V is a non-root vertex and sdom(V) = parent(V), then idom(V) is
     // necessarily parent(V). In this case, set idom(V) here and avoid placing
     // V into a bucket.
     if (WInfo.Semi == WInfo.Parent) {
-      DT.IDoms[W] = WParent;
+      DT.IDoms[W] = DT.Vertex[WInfo.Parent];
     } else {
       Buckets[i] = Buckets[WInfo.Semi];
       Buckets[WInfo.Semi] = i;