summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2015-01-14 19:59:18 +0000
committerDavid Blaikie <dblaikie@gmail.com>2015-01-14 19:59:18 +0000
commitdaef1bcfbbf3718411a4a7b97cd4c690122823b9 (patch)
tree95bb674535da92b57c5090d383a19f0e3f3fef5e
parent4a4f78583e8a9466fd376db16e1cf95a734d6780 (diff)
downloadbcm5719-llvm-daef1bcfbbf3718411a4a7b97cd4c690122823b9.tar.gz
bcm5719-llvm-daef1bcfbbf3718411a4a7b97cd4c690122823b9.zip
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
-rw-r--r--llvm/include/llvm/Support/GenericDomTreeConstruction.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/include/llvm/Support/GenericDomTreeConstruction.h b/llvm/include/llvm/Support/GenericDomTreeConstruction.h
index 61fc72de443..7c065f93925 100644
--- a/llvm/include/llvm/Support/GenericDomTreeConstruction.h
+++ b/llvm/include/llvm/Support/GenericDomTreeConstruction.h
@@ -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?
OpenPOWER on IntegriCloud