1
0
mirror of https://github.com/c64scene-ar/llvm-6502.git synced 2025-01-01 15:33:33 +00:00

Move a load into the only branch where it is used and eliminate a temporary.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122690 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Cameron Zwarich 2011-01-02 10:50:14 +00:00
parent 2a8c22aa68
commit 63e07d72f8

View 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;