Speed up updateDFSNumbers with two observations:
authorChris Lattner <sabre@nondot.org>
Wed, 8 Aug 2007 06:24:20 +0000 (06:24 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 8 Aug 2007 06:24:20 +0000 (06:24 +0000)
commitde0e42d3c07466677dab4b3bbc379302e383083b
treefaabc13d3440fc50cb60b8610e12169b37caf64e
parentc182f17aed0b9d4fa8a87bdbea56fcd3a3e121dc
Speed up updateDFSNumbers with two observations:
1. domtree is a tree, not a graph.  There is no need to avoid revisiting nodes with a set.
2. the worklist can contain the child iterator pointers so we don't get N^2 rescanning of children.

This speeds up updateDFSNumbers significantly, making it basically free.  On the testcase in PR1432,
this speeds up loopsimplify by another 3x, dropping it from the 12th most expensive pass to the to
the 30th. :)  It used to be #1.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40923 91177308-0d34-0410-b5e6-96231b3b80d8
lib/VMCore/Dominators.cpp