diff --git a/include/llvm/Analysis/DominatorInternals.h b/include/llvm/Analysis/DominatorInternals.h index 88e7073f84f..b1895b5f18e 100644 --- a/include/llvm/Analysis/DominatorInternals.h +++ b/include/llvm/Analysis/DominatorInternals.h @@ -238,13 +238,11 @@ void Calculate(DominatorTreeBase::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;