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.

llvm-svn: 111397
This commit is contained in:
Jakob Stoklund Olesen 2010-08-18 20:06:05 +00:00
parent 221c0b3c75
commit a94deec1c0
2 changed files with 3 additions and 12 deletions

View File

@ -193,15 +193,6 @@ public:
NodeType *getPath(unsigned n) const { NodeType *getPath(unsigned n) const {
return VisitStack[n].first.getPointer(); 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();
}
}; };

View File

@ -446,9 +446,9 @@ VNInfo *LiveIntervalMap::mapValue(const VNInfo *ParentVNI, SlotIndex Idx) {
} }
// No need to search the children, we found a dominating value. // 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. // FIXME: We could prune up to the last phi-def we inserted, need df_iterator
// Either way, the children of MBB would be shadowed, so don't search them. // for that.
IDFI.skipChildren(MBB); IDFI.skipChildren();
} }
// The search should at least find a dominating value for IdxMBB. // The search should at least find a dominating value for IdxMBB.