Add comment about a gotcha I ran across while touching this code.

I haven't looked closely at exactly why the side effect is required, but
this seems better than not mentioning it at all.

llvm-svn: 226030
This commit is contained in:
David Blaikie 2015-01-14 19:59:18 +00:00
parent 4a4f78583e
commit daef1bcfbb
1 changed files with 1 additions and 0 deletions

View File

@ -260,6 +260,7 @@ void Calculate(DominatorTreeBase<typename GraphTraits<NodeT>::NodeType>& DT,
for (unsigned i = 2; i <= N; ++i) {
typename GraphT::NodeType* W = DT.Vertex[i];
// Don't replace this with 'count', the insertion side effect is important
if (DT.DomTreeNodes[W])
continue; // Haven't calculated this node yet?